[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1508940057.30291.122.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Wed, 25 Oct 2017 07:00:57 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>,
Tom Herbert <tom@...bertland.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 4/4] net: qualcomm: rmnet: Add support for GRO
On Tue, 2017-10-24 at 22:55 -0600, Subash Abhinov Kasiviswanathan wrote:
> Add gro_cells so that rmnet devices can call gro_cells_receive
> instead of netif_receive_skb.
>
> void rmnet_vnd_setup(struct net_device *rmnet_dev)
> {
> + struct rmnet_priv *priv = netdev_priv(rmnet_dev);
> +
> rmnet_dev->netdev_ops = &rmnet_vnd_ops;
> rmnet_dev->mtu = RMNET_DFLT_PACKET_SIZE;
> rmnet_dev->needed_headroom = RMNET_NEEDED_HEADROOM;
> @@ -162,6 +164,8 @@ void rmnet_vnd_setup(struct net_device *rmnet_dev)
> rmnet_dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
>
> rmnet_dev->needs_free_netdev = true;
> +
> + gro_cells_init(&priv->gro_cells, rmnet_dev);
> }
You need to check return code and abort if memory could not be
allocated.
There is a reason this helper has _init() prefix, it does not belong to
_setup() since a _setup() is not expected to fail.
Please take a look at other gro_cells_init() callers, and you will
notice that it is called from ndo_init()
You might have copied the only buggy caller (vxlan).
Tom, if you read me fix vxlan, thanks !
Powered by blists - more mailing lists