linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Alexander Duyck <alexander.duyck@gmail.com>,
	Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
	"linux-sctp @ vger . kernel . org" <linux-sctp@vger.kernel.org>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [PATCHv3 net-next 1/2] net: move the hsize check to the else block in skb_segment
Date: Sat, 16 Jan 2021 19:13:00 -0800	[thread overview]
Message-ID: <20210116191300.25c2bf27@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <CAKgT0Uc1iObzmeFL8G91jxKxvWARb4z2bJJxv6yJ+5QOYPJQsQ@mail.gmail.com>

On Fri, 15 Jan 2021 17:39:02 -0800 Alexander Duyck wrote:
> On Fri, Jan 15, 2021 at 1:36 AM Xin Long <lucien.xin@gmail.com> wrote:
> >
> > After commit 89319d3801d1 ("net: Add frag_list support to skb_segment"),
> > it goes to process frag_list when !hsize in skb_segment(). However, when
> > using skb frag_list, sg normally should not be set. In this case, hsize
> > will be set with len right before !hsize check, then it won't go to
> > frag_list processing code.
> >
> > So the right thing to do is move the hsize check to the else block, so
> > that it won't affect the !hsize check for frag_list processing.
> >
> > v1->v2:
> >   - change to do "hsize <= 0" check instead of "!hsize", and also move
> >     "hsize < 0" into else block, to save some cycles, as Alex suggested.
> >
> > Signed-off-by: Xin Long <lucien.xin@gmail.com>  
> 
> Looks good to me.
> 
> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>

Applied, thanks!

      reply	other threads:[~2021-01-17  3:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15  9:36 [PATCHv3 net-next 0/2] net: fix the features flag in sctp_gso_segment Xin Long
2021-01-15  9:36 ` [PATCHv3 net-next 1/2] net: move the hsize check to the else block in skb_segment Xin Long
2021-01-15  9:36   ` [PATCHv3 net-next 2/2] sctp: remove the NETIF_F_SG flag before calling skb_segment Xin Long
2021-01-16  1:39   ` [PATCHv3 net-next 1/2] net: move the hsize check to the else block in skb_segment Alexander Duyck
2021-01-17  3:13     ` Jakub Kicinski [this message]

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=20210116191300.25c2bf27@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=alexander.duyck@gmail.com \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --subject='Re: [PATCHv3 net-next 1/2] net: move the hsize check to the else block in skb_segment' \
    /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

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).