From: Paolo Abeni <pabeni@redhat.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Willem de Bruijn <willemb@google.com>,
Steffen Klassert <steffen.klassert@secunet.com>,
Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Subject: Re: [PATCH net-next 05/10] ipv6: factor out protocol delivery helper
Date: Thu, 08 Nov 2018 11:13:47 +0100 [thread overview]
Message-ID: <0c668ae869c111bbfce9c9ba04e5c6ab2ce3c10a.camel@redhat.com> (raw)
In-Reply-To: <34872c3b-eba8-d7eb-22da-ee74b52b0610@cogentembedded.com>
Hi,
On Thu, 2018-11-08 at 12:01 +0300, Sergei Shtylyov wrote:
> On 11/7/2018 2:38 PM, Paolo Abeni wrote:
>
> > So that we can re-use it at the UDP level in the next patch
> >
> > rfc v3 -> v1:
> > - add the helper declaration into the ipv6 header
> >
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > ---
> > include/net/ipv6.h | 2 ++
> > net/ipv6/ip6_input.c | 28 ++++++++++++++++------------
> > 2 files changed, 18 insertions(+), 12 deletions(-)
> >
> > diff --git a/include/net/ipv6.h b/include/net/ipv6.h
> > index 829650540780..daf80863d3a5 100644
> > --- a/include/net/ipv6.h
> > +++ b/include/net/ipv6.h
>
> [...]
> > @@ -319,28 +319,26 @@ void ipv6_list_rcv(struct list_head *head, struct packet_type *pt,
> > /*
> > * Deliver the packet to the host
> > */
> > -
> > -
> > -static int ip6_input_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
> > +void ip6_protocol_deliver_rcu(struct net *net, struct sk_buff *skb, int nexthdr,
> > + bool have_final)
> > {
> > const struct inet6_protocol *ipprot;
> > struct inet6_dev *idev;
> > unsigned int nhoff;
> > - int nexthdr;
> > bool raw;
> > - bool have_final = false;
> >
> > /*
> > * Parse extension headers
> > */
> >
> > - rcu_read_lock();
> > resubmit:
> > idev = ip6_dst_idev(skb_dst(skb));
> > - if (!pskb_pull(skb, skb_transport_offset(skb)))
> > - goto discard;
> > nhoff = IP6CB(skb)->nhoff;
> > - nexthdr = skb_network_header(skb)[nhoff];
> > + if (!have_final) {
>
> Haven't you removed this variable above?
>
> > + if (!pskb_pull(skb, skb_transport_offset(skb)))
> > + goto discard;
> > + nexthdr = skb_network_header(skb)[nhoff];
>
> And this?
Thanks for reviewing.
Both local variables are now function arguments (see the function
signature, far above in this chunk).
Cheers,
Paolo
next prev parent reply other threads:[~2018-11-08 19:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 11:38 [PATCH net-next 00/10] udp: implement GRO support Paolo Abeni
2018-11-07 11:38 ` [PATCH net-next 01/10] udp: implement complete book-keeping for encap_needed Paolo Abeni
2018-11-14 7:08 ` Eric Dumazet
2018-11-07 11:38 ` [PATCH net-next 02/10] udp: implement GRO for plain UDP sockets Paolo Abeni
2018-11-07 11:38 ` [PATCH net-next 03/10] udp: add support for UDP_GRO cmsg Paolo Abeni
2018-11-07 11:38 ` [PATCH net-next 04/10] ip: factor out protocol delivery helper Paolo Abeni
2018-11-07 11:38 ` [PATCH net-next 05/10] ipv6: " Paolo Abeni
2018-11-08 9:01 ` Sergei Shtylyov
2018-11-08 10:13 ` Paolo Abeni [this message]
2018-11-08 10:29 ` Sergei Shtylyov
2018-11-07 11:38 ` [PATCH net-next 06/10] udp: cope with UDP GRO packet misdirection Paolo Abeni
2018-11-07 11:38 ` [PATCH net-next 07/10] selftests: add GRO support to udp bench rx program Paolo Abeni
2018-11-07 11:38 ` [PATCH net-next 08/10] selftests: add dummy xdp test helper Paolo Abeni
2018-11-07 11:38 ` [PATCH net-next 09/10] selftests: add some benchmark for UDP GRO Paolo Abeni
2018-11-07 11:38 ` [PATCH net-next 10/10] selftests: add functionals test " Paolo Abeni
2018-11-07 19:56 ` [PATCH net-next 00/10] udp: implement GRO support Willem de Bruijn
2018-11-07 20:03 ` David Miller
2018-11-08 0:23 ` 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=0c668ae869c111bbfce9c9ba04e5c6ab2ce3c10a.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=steffen.klassert@secunet.com \
--cc=subashab@codeaurora.org \
--cc=willemb@google.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).