[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function



On 2018/9/20 22:50, Haiyang Zhang wrote:
> 
> 
>> -----Original Message-----
>> From: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
>> Sent: Thursday, September 20, 2018 10:44 AM
>> To: YueHaibing <yuehaibing@xxxxxxxxxx>
>> Cc: davem@xxxxxxxxxxxxx; dmitry.tarnyagin@xxxxxxxxxxx;
>> wg@xxxxxxxxxxxxxx; mkl@xxxxxxxxxxxxxx; michal.simek@xxxxxxxxxx;
>> hsweeten@xxxxxxxxxxxxxxxxxxx; madalin.bucur@xxxxxxx;
>> pantelis.antoniou@xxxxxxxxx; claudiu.manoil@xxxxxxx; leoyang.li@xxxxxxx;
>> linux@xxxxxxxxxxxxxxx; sammy@xxxxxxxxx; ralf@xxxxxxxxxxxxxx;
>> nico@xxxxxxxxxxx; steve.glendinning@xxxxxxxxxxx; f.fainelli@xxxxxxxxx;
>> grygorii.strashko@xxxxxx; w-kwok2@xxxxxx; m-karicheri2@xxxxxx;
>> t.sailer@xxxxxxxxxxxxxx; jreuter@xxxxxxxx; KY Srinivasan <kys@xxxxxxxxxxxxx>;
>> Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>; wei.liu2@xxxxxxxxxx;
>> paul.durrant@xxxxxxxxxx; arvid.brodin@xxxxxxxx; pshelar@xxxxxxx;
>> dev@xxxxxxxxxxxxxxx; linux-mips@xxxxxxxxxxxxxx; xen-
>> devel@xxxxxxxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; 
>> linux-usb@xxxxxxxxxxxxxxx;
>> linux-kernel@xxxxxxxxxxxxxxx; linux-can@xxxxxxxxxxxxxxx;
>> devel@xxxxxxxxxxxxxxxxxxxxxx; linux-hams@xxxxxxxxxxxxxxx; linux-
>> omap@xxxxxxxxxxxxxxx; linuxppc-dev@xxxxxxxxxxxxxxxx; linux-arm-
>> kernel@xxxxxxxxxxxxxxxxxxx
>> 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 <yuehaibing@xxxxxxxxxx> 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
> 
> .
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.