mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Yafang Shao <laoar.shao@gmail.com>,
	edumazet@google.com, davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] tcp: minor optimization for calculating packets_out in tcp connect
Date: Sat, 15 Dec 2018 04:59:00 -0800	[thread overview]
Message-ID: <48971720-96e1-a48f-a1f5-3a96aa3fae7a@gmail.com> (raw)
In-Reply-To: <1544866389-11168-1-git-send-email-laoar.shao@gmail.com>



On 12/15/2018 01:33 AM, Yafang Shao wrote:
> When we building a syn packet, the tcp_skb_pcount(skb) is always 1,
> which is set in tcp_init_nondata_skb().
> Regarding the syn_data, it is set through
> memcpy(syn_data->cb, syn->cb, sizeof(syn->cb)),
> which is always 1 as well.
> 
> So we don't need to use tcp_skb_pcount(skb), that could give us a
> little improvement.
>

I dunno, I find current code more self-documented.

This is not fast path, so I would suggest we keep it.

Thanks.


  reply	other threads:[~2018-12-15 12:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-15  9:33 Yafang Shao
2018-12-15 12:59 ` Eric Dumazet [this message]
2018-12-15 19:27   ` David Miller

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=48971720-96e1-a48f-a1f5-3a96aa3fae7a@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=laoar.shao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®