lkml.org 
[lkml]   [2015]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next 3/3] RDS-TCP: Set up MSG_MORE and MSG_SENDPAGE_NOTLAST as appropriate in rds_tcp_xmit
From
Date
Hello.

On 09/30/2015 04:45 PM, Sowmini Varadhan wrote:

> For the same reasons as 2f53384424 and 35f9c09fe9, rds_tcp_xmit
> may have multiple pages to send, so use the MSG_MORE and
> MSG_SENDPAGE_NOTLAST as hints to tcp_sendpage()
>
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
> net/rds/tcp_send.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c
> index 53b17ca..5f3e3fa 100644
> --- a/net/rds/tcp_send.c
> +++ b/net/rds/tcp_send.c
[...]
> @@ -116,12 +117,15 @@ int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm,
> goto out;
> }
>
> + more = (rm->data.op_nents > 1 ? (MSG_MORE | MSG_SENDPAGE_NOTLAST) : 0);

No need for either inner or outer parens.

> while (sg < rm->data.op_nents) {
> + int flags = (MSG_DONTWAIT | MSG_NOSIGNAL | more);

Parens not needed as well.

[...]

MBR, Sergei



\
 
 \ /
  Last update: 2015-09-30 17:21    [W:0.080 / U:3.588 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site