From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
Tariq Toukan <tariqt@nvidia.com>,
borisp@nvidia.com, john.fastabend@gmail.com, dhowells@redhat.com
Subject: Re: [PATCH net] net: tls: set MSG_SPLICE_PAGES consistently
Date: Tue, 8 Aug 2023 23:58:06 +0300 [thread overview]
Message-ID: <bb5ec7f9-6170-1608-745f-363d3ad19cc5@gmail.com> (raw)
In-Reply-To: <20230808180917.1243540-1-kuba@kernel.org>
On 08/08/2023 21:09, Jakub Kicinski wrote:
> We used to change the flags for the last segment, because
> non-last segments had the MSG_SENDPAGE_NOTLAST flag set.
> That flag is no longer a thing so remove the setting.
>
> Since flags most likely don't have MSG_SPLICE_PAGES set
> this avoids passing parts of the sg as splice and parts
> as non-splice. Before commit under Fixes we'd have called
> tcp_sendpage() which would add the MSG_SPLICE_PAGES.
>
> Why this leads to trouble remains unclear but Tariq
> reports hitting the WARN_ON(!sendpage_ok()) due to
> page refcount of 0.
>
> Fixes: e117dcfd646e ("tls: Inline do_tcp_sendpages()")
> Reported-by: Tariq Toukan <tariqt@nvidia.com>
> Link: https://lore.kernel.org/all/4c49176f-147a-4283-f1b1-32aac7b4b996@gmail.com/
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: borisp@nvidia.com
> CC: john.fastabend@gmail.com
> CC: dhowells@redhat.com
> ---
> net/tls/tls_main.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
> index 7dbb8cd8f809..f550c84f3408 100644
> --- a/net/tls/tls_main.c
> +++ b/net/tls/tls_main.c
> @@ -139,9 +139,6 @@ int tls_push_sg(struct sock *sk,
>
> ctx->splicing_pages = true;
> while (1) {
> - if (sg_is_last(sg))
> - msg.msg_flags = flags;
> -
> /* is sending application-limited? */
> tcp_rate_check_app_limited(sk);
> p = sg_page(sg);
Thanks for your patch.
Tested-by: Tariq Toukan <tariqt@nvidia.com>
next prev parent reply other threads:[~2023-08-08 20:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 18:09 [PATCH net] net: tls: set MSG_SPLICE_PAGES consistently Jakub Kicinski
2023-08-08 20:58 ` Tariq Toukan [this message]
2023-08-10 18:50 ` patchwork-bot+netdevbpf
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=bb5ec7f9-6170-1608-745f-363d3ad19cc5@gmail.com \
--to=ttoukan.linux@gmail.com \
--cc=borisp@nvidia.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=edumazet@google.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tariqt@nvidia.com \
/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).