On Thu, Mar 04, 2010 at 03:16:52PM +0200, Or Gerlitz wrote:
>
> +static int ipoib_set_tso(struct net_device *dev, u32 data)
> +{
> + struct ipoib_dev_priv *priv = netdev_priv(dev);
> +
> + if (data) {
> + if (!test_bit(IPOIB_FLAG_ADMIN_CM, &priv->flags) &&
> + (dev->features & NETIF_F_SG) &&
> + (priv->hca_caps & IB_DEVICE_UD_TSO))
> + dev->features |= NETIF_F_TSO;
> + else {
> + ipoib_warn(priv, "can't set TSO on\n");
> + return -EOPNOTSUPP;
> + }
> + } else
> + dev->features &= ~NETIF_F_TSO;
> + return 0;
> +}
> +
I believe dev->features should be protected by rtnl lock.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html