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 !




Reply via email to