netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: doronrk@fb.com
Cc: davejwatson@fb.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] tls: Skip zerocopy path for ITER_KVEC
Date: Tue, 24 Jul 2018 14:40:21 -0700 (PDT)	[thread overview]
Message-ID: <20180724.144021.1381304664084169581.davem@davemloft.net> (raw)
In-Reply-To: <20180724.143802.309217898930041106.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Tue, 24 Jul 2018 14:38:02 -0700 (PDT)

> From: Doron Roberts-Kedes <doronrk@fb.com>
> Date: Fri, 20 Jul 2018 11:19:00 -0700
> 
>> The zerocopy path ultimately calls iov_iter_get_pages, which defines the
>> step function for ITER_KVECs as simply, return -EFAULT. Taking the
>> non-zerocopy path for ITER_KVECs avoids the unnecessary fallback. 
>> 
>> See https://lore.kernel.org/lkml/20150401023311.GL29656@ZenIV.linux.org.uk/T/#u
>> for a discussion of why zerocopy for vmalloc data is not a good idea. 
>> 
>> Discovered while testing NBD traffic encrypted with ktls.
>> 
>> Fixes: c46234ebb4d1 ("tls: RX path for ktls")
>> Signed-off-by: Doron Roberts-Kedes <doronrk@fb.com>
> 
> Applied to net-next, thanks.

Actually, I reverted.  Please fix this warning:

net/tls/tls_sw.c: In function ‘tls_sw_sendmsg’:
net/tls/tls_sw.c:414:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   bool iskvec = msg->msg_iter.type & ITER_KVEC;
   ^~~~
net/tls/tls_sw.c: In function ‘tls_sw_recvmsg’:
net/tls/tls_sw.c:823:4: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    bool iskvec = msg->msg_iter.type & ITER_KVEC;
    ^~~~

  reply	other threads:[~2018-07-24 22:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 18:19 [PATCH net-next] tls: Skip zerocopy path for ITER_KVEC Doron Roberts-Kedes
2018-07-24 21:38 ` David Miller
2018-07-24 21:40   ` David Miller [this message]
2018-07-25 21:48 ` [PATCH net-next v2] " Doron Roberts-Kedes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180724.144021.1381304664084169581.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=davejwatson@fb.com \
    --cc=doronrk@fb.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).