[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
- To: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>, YueHaibing <yuehaibing@xxxxxxxxxx>
- From: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
- Date: Thu, 20 Sep 2018 14:50:23 +0000
- Accept-language: en-US
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=haiyangz@xxxxxxxxxxxxx;
- Cc: "dmitry.tarnyagin@xxxxxxxxxxx" <dmitry.tarnyagin@xxxxxxxxxxx>, "madalin.bucur@xxxxxxx" <madalin.bucur@xxxxxxx>, "linux-mips@xxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxx>, "linux@xxxxxxxxxxxxxxx" <linux@xxxxxxxxxxxxxxx>, "pantelis.antoniou@xxxxxxxxx" <pantelis.antoniou@xxxxxxxxx>, KY Srinivasan <kys@xxxxxxxxxxxxx>, "t.sailer@xxxxxxxxxxxxxx" <t.sailer@xxxxxxxxxxxxxx>, "dev@xxxxxxxxxxxxxxx" <dev@xxxxxxxxxxxxxxx>, "f.fainelli@xxxxxxxxx" <f.fainelli@xxxxxxxxx>, "arvid.brodin@xxxxxxxx" <arvid.brodin@xxxxxxxx>, "michal.simek@xxxxxxxxxx" <michal.simek@xxxxxxxxxx>, "pshelar@xxxxxxx" <pshelar@xxxxxxx>, "m-karicheri2@xxxxxx" <m-karicheri2@xxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "jreuter@xxxxxxxx" <jreuter@xxxxxxxx>, "sammy@xxxxxxxxx" <sammy@xxxxxxxxx>, "grygorii.strashko@xxxxxx" <grygorii.strashko@xxxxxx>, "w-kwok2@xxxxxx" <w-kwok2@xxxxxx>, "steve.glendinning@xxxxxxxxxxx" <steve.glendinning@xxxxxxxxxxx>, "linux-can@xxxxxxxxxxxxxxx" <linux-can@xxxxxxxxxxxxxxx>, "claudiu.manoil@xxxxxxx" <claudiu.manoil@xxxxxxx>, "paul.durrant@xxxxxxxxxx" <paul.durrant@xxxxxxxxxx>, "mkl@xxxxxxxxxxxxxx" <mkl@xxxxxxxxxxxxxx>, "linux-hams@xxxxxxxxxxxxxxx" <linux-hams@xxxxxxxxxxxxxxx>, "linux-omap@xxxxxxxxxxxxxxx" <linux-omap@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "wei.liu2@xxxxxxxxxx" <wei.liu2@xxxxxxxxxx>, "nico@xxxxxxxxxxx" <nico@xxxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, "linux-usb@xxxxxxxxxxxxxxx" <linux-usb@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "ralf@xxxxxxxxxxxxxx" <ralf@xxxxxxxxxxxxxx>, "leoyang.li@xxxxxxx" <leoyang.li@xxxxxxx>, "hsweeten@xxxxxxxxxxxxxxxxxxx" <hsweeten@xxxxxxxxxxxxxxxxxxx>, "wg@xxxxxxxxxxxxxx" <wg@xxxxxxxxxxxxxx>, "devel@xxxxxxxxxxxxxxxxxxxxxx" <devel@xxxxxxxxxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>, "davem@xxxxxxxxxxxxx" <davem@xxxxxxxxxxxxx>
- Delivery-date: Thu, 20 Sep 2018 15:53:21 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=haiyangz@xxxxxxxxxxxxx; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-09-20T14:50:22.4293057Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
- Thread-index: AQHUUOBQeas9dNOwnEmY1OLbKFqIU6T5PuSAgAAA3gA=
- Thread-topic: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
> -----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;
Thanks,
- Haiyang
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|