On 2018/9/20 22:50, Haiyang Zhang wrote:
> 
> 
>> -----Original Message-----
>> From: Stephen Hemminger <[email protected]>
>> Sent: Thursday, September 20, 2018 10:44 AM
>> To: YueHaibing <[email protected]>
>> Cc: [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; KY Srinivasan 
>> <[email protected]>;
>> Haiyang Zhang <[email protected]>; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; xen-
>> [email protected]; [email protected]; 
>> [email protected];
>> [email protected]; [email protected];
>> [email protected]; [email protected]; linux-
>> [email protected]; [email protected]; linux-arm-
>> [email protected]
>> Subject: Re: [PATCH net-next 17/22] hv_netvsc: fix return type of
>> ndo_start_xmit function
>>
>> On Thu, 20 Sep 2018 20:33:01 +0800
>> YueHaibing <[email protected]> wrote:
>>> int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
>>>      */
>>>     vf_netdev = rcu_dereference_bh(net_device_ctx->vf_netdev);
>>>     if (vf_netdev && netif_running(vf_netdev) &&
>>> -       !netpoll_tx_running(net))
>>> -           return netvsc_vf_xmit(net, vf_netdev, skb);
>>> +       !netpoll_tx_running(net)) {
>>> +           ret = netvsc_vf_xmit(net, vf_netdev, skb);
>>> +           if (ret)
>>> +                   return NETDEV_TX_BUSY;
>>> +   }
>>
>> Sorry, the new code is wrong. It will fall through if ret == 0 (NETDEV_TX_OK)
>> Please review and test your patches.
> 
> Plus consideration of -- For error case, please just return NETDEV_TX_OK. We 
> are not sure if the error can go away after retrying, returning 
> NETDEV_TX_BUSY 
> may cause infinite retry from the upper layer.
> 
> So, let's just always return NETDEV_TX_OK like this:
>               netvsc_vf_xmit(net, vf_netdev, skb);
>               return NETDEV_TX_OK;

Thank you for review.

Will do that in v2.

> 
> Thanks,
> - Haiyang
> 
> .
> 

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to