From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH net-next RFC 6/8] net: make gro configurable Date: Fri, 14 Sep 2018 11:38:48 -0700 Message-ID: <20180914113848.14b931df@xeon-e3> References: <20180914175941.213950-1-willemdebruijn.kernel@gmail.com> <20180914175941.213950-7-willemdebruijn.kernel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, pabeni@redhat.com, steffen.klassert@secunet.com, davem@davemloft.net, Willem de Bruijn To: Willem de Bruijn Return-path: Received: from mail-pg1-f193.google.com ([209.85.215.193]:46909 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726748AbeINXyr (ORCPT ); Fri, 14 Sep 2018 19:54:47 -0400 Received: by mail-pg1-f193.google.com with SMTP id b129-v6so4775899pga.13 for ; Fri, 14 Sep 2018 11:39:04 -0700 (PDT) In-Reply-To: <20180914175941.213950-7-willemdebruijn.kernel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 14 Sep 2018 13:59:39 -0400 Willem de Bruijn wrote: > diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c > index e5d236595206..8cb8e02c8ab6 100644 > --- a/drivers/net/vxlan.c > +++ b/drivers/net/vxlan.c > @@ -572,6 +572,7 @@ static struct sk_buff *vxlan_gro_receive(struct sock *sk, > struct list_head *head, > struct sk_buff *skb) > { > + const struct net_offload *ops; > struct sk_buff *pp = NULL; > struct sk_buff *p; > struct vxlanhdr *vh, *vh2; > @@ -606,6 +607,12 @@ static struct sk_buff *vxlan_gro_receive(struct sock *sk, > goto out; > } > > + rcu_read_lock(); > + ops = net_gro_receive(dev_offloads, ETH_P_TEB); > + rcu_read_unlock(); > + if (!ops) > + goto out; Isn't rcu_read_lock already held here? RCU read lock is always held in the receive handler path > + > skb_gro_pull(skb, sizeof(struct vxlanhdr)); /* pull vxlan header */ > > list_for_each_entry(p, head, list) { > @@ -621,6 +628,7 @@ static struct sk_buff *vxlan_gro_receive(struct sock *sk, > } > > pp = call_gro_receive(eth_gro_receive, head, skb); > + > flush = 0; whitespace change crept into this patch.