Message ID | 1474300400-32362-2-git-send-email-shmulik.ladkani@gmail.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
On Mon, 2016-09-19 at 18:53 +0300, Shmulik Ladkani wrote: > Fix 'skb_vlan_pop' to use eth_type_vlan instead of directly comparing > skb->protocol to ETH_P_8021Q or ETH_P_8021AD. > > Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> > --- You forgot to explicitly state this was targeting net-next tree. This is detailed in Documentation/networking/netdev-FAQ.tx Q: How do I indicate which tree (net vs. net-next) my patch should be in?
On Mon, 19 Sep 2016 09:20:55 -0700 Eric Dumazet <eric.dumazet@gmail.com> wrote: > On Mon, 2016-09-19 at 18:53 +0300, Shmulik Ladkani wrote: > > Fix 'skb_vlan_pop' to use eth_type_vlan instead of directly comparing > > skb->protocol to ETH_P_8021Q or ETH_P_8021AD. > > > > Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> > > --- > > You forgot to explicitly state this was targeting net-next tree. Thanks, was an oversight. Requires resubmission?
On Mon, 2016-09-19 at 19:23 +0300, Shmulik Ladkani wrote: > On Mon, 19 Sep 2016 09:20:55 -0700 Eric Dumazet <eric.dumazet@gmail.com> wrote: > > On Mon, 2016-09-19 at 18:53 +0300, Shmulik Ladkani wrote: > > > Fix 'skb_vlan_pop' to use eth_type_vlan instead of directly comparing > > > skb->protocol to ETH_P_8021Q or ETH_P_8021AD. > > > > > > Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> > > > --- > > > > You forgot to explicitly state this was targeting net-next tree. > > Thanks, was an oversight. > Requires resubmission? I do not think so. I only reminded it because it seems many netdev submissions are forgetting this, and it does not help David Miller job. Thanks
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 4dbaedb745..1369faa182 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4535,8 +4535,7 @@ int skb_vlan_pop(struct sk_buff *skb) if (likely(skb_vlan_tag_present(skb))) { skb->vlan_tci = 0; } else { - if (unlikely(skb->protocol != htons(ETH_P_8021Q) && - skb->protocol != htons(ETH_P_8021AD))) + if (unlikely(!eth_type_vlan(skb->protocol))) return 0; err = __skb_vlan_pop(skb, &vlan_tci); @@ -4544,8 +4543,7 @@ int skb_vlan_pop(struct sk_buff *skb) return err; } /* move next vlan tag to hw accel tag */ - if (likely(skb->protocol != htons(ETH_P_8021Q) && - skb->protocol != htons(ETH_P_8021AD))) + if (likely(!eth_type_vlan(skb->protocol))) return 0; vlan_proto = skb->protocol;
Fix 'skb_vlan_pop' to use eth_type_vlan instead of directly comparing skb->protocol to ETH_P_8021Q or ETH_P_8021AD. Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> --- net/core/skbuff.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)