net: fix return type of ndo_start_xmit function
Subsystems (24)
cover net: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
YueHaibing (22):
net: micrel: fix return type of ndo_start_xmit function
net: freescale: fix return type of ndo_start_xmit function
net: seeq: fix return type of ndo_start_xmit function
net: cirrus: fix return type of ndo_start_xmit function
net: sgi: fix return type of ndo_start_xmit function
net: wiznet: fix return type of ndo_start_xmit function
net: i825xx: fix return type of ndo_start_xmit function
net: apple: fix return type of ndo_start_xmit function
net: smsc: fix return type of ndo_start_xmit function
net: ti: fix return type of ndo_start_xmit function
net: faraday: fix return type of ndo_start_xmit function
net: ovs: fix return type of ndo_start_xmit function
net: xen-netback: fix return type of ndo_start_xmit function
net: caif: fix return type of ndo_start_xmit function
net: hamradio: fix return type of ndo_start_xmit function
usbnet: ipheth: fix return type of ndo_start_xmit function
hv_netvsc: fix return type of ndo_start_xmit function
can: xilinx: fix return type of ndo_start_xmit function
net: plip: fix return type of ndo_start_xmit function
rionet: fix return type of ndo_start_xmit function
l2tp: fix return type of ndo_start_xmit function
net: hsr: fix return type of ndo_start_xmit function
drivers/net/caif/caif_hsi.c | 10 +++++----- drivers/net/caif/caif_serial.c | 7 +++++-- drivers/net/caif/caif_spi.c | 6 +++--- drivers/net/caif/caif_virtio.c | 2 +- drivers/net/can/xilinx_can.c | 2 +- drivers/net/ethernet/apple/bmac.c | 4 ++-- drivers/net/ethernet/apple/mace.c | 4 ++-- drivers/net/ethernet/apple/macmace.c | 4 ++-- drivers/net/ethernet/cirrus/ep93xx_eth.c | 2 +- drivers/net/ethernet/cirrus/mac89x0.c | 4 ++-- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- drivers/net/ethernet/faraday/ftmac100.c | 7 ++++--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 ++- drivers/net/ethernet/freescale/fec_mpc52xx.c | 3 ++- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- drivers/net/ethernet/freescale/gianfar.c | 4 ++-- drivers/net/ethernet/freescale/ucc_geth.c | 3 ++- drivers/net/ethernet/i825xx/ether1.c | 5 +++-- drivers/net/ethernet/i825xx/lib82596.c | 4 ++-- drivers/net/ethernet/i825xx/sun3_82586.c | 6 ++++-- drivers/net/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++-- drivers/net/ethernet/seeq/ether3.c | 5 +++-- drivers/net/ethernet/seeq/sgiseeq.c | 3 ++- drivers/net/ethernet/sgi/ioc3-eth.c | 4 ++-- drivers/net/ethernet/sgi/meth.c | 2 +- drivers/net/ethernet/smsc/smc911x.c | 3 ++- drivers/net/ethernet/smsc/smc91x.c | 3 ++- drivers/net/ethernet/smsc/smsc911x.c | 3 ++- drivers/net/ethernet/ti/cpmac.c | 2 +- drivers/net/ethernet/ti/davinci_emac.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 8 ++++---- drivers/net/ethernet/wiznet/w5100.c | 2 +- drivers/net/ethernet/wiznet/w5300.c | 2 +- drivers/net/hamradio/baycom_epp.c | 3 ++- drivers/net/hamradio/dmascc.c | 4 ++-- drivers/net/hyperv/netvsc_drv.c | 10 +++++++--- drivers/net/plip/plip.c | 4 ++-- drivers/net/rionet.c | 3 ++- drivers/net/usb/ipheth.c | 2 +- drivers/net/xen-netback/interface.c | 3 ++- net/caif/chnl_net.c | 3 ++- net/hsr/hsr_device.c | 2 +- net/l2tp/l2tp_eth.c | 3 ++- net/openvswitch/vport-internal_dev.c | 5 +++-- 45 files changed, 100 insertions(+), 74 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 1/22 net: micrel: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/micrel/ks8695net.c +1 -1
@@ -1164,7 +1164,7 @@ static int ks8695_poll(struct napi_struct *napi, int budget)* sk_buff and adds it to the TX ring. It then kicks the TX DMA * engine to ensure transmission begins. */ -static int +static netdev_tx_t ks8695_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct ks8695_priv *ksp =netdev_priv (ndev);
drivers/net/ethernet/micrel/ks8851_mll.c +2 -2
@@ -1021,9 +1021,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)* spin_lock_irqsave is required because tx and rx should be mutual exclusive. * So while tx is in-progress, prevent IRQ interrupt from happenning. */ -static int ks_start_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t ks_start_xmit (struct sk_buff *skb,struct net_device *netdev) { -int retv =NETDEV_TX_OK ; +netdev_tx_t retv =NETDEV_TX_OK ;struct ks_net *ks =netdev_priv (netdev);disable_irq (netdev->irq);
Signature · 1 line
1.8.3.1
PATCH 2/22 net: freescale: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 ++- drivers/net/ethernet/freescale/fec_mpc52xx.c | 3 ++- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- drivers/net/ethernet/freescale/gianfar.c | 4 ++-- drivers/net/ethernet/freescale/ucc_geth.c | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-)
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +2 -1
@@ -2044,7 +2044,8 @@ static inline int dpaa_xmit(struct dpaa_priv *priv,return 0 ; } -static int dpaa_start_xmit (struct sk_buff *skb,struct net_device *net_dev) +static netdev_tx_t +dpaa_start_xmit (struct sk_buff *skb,struct net_device *net_dev) {const int queue_mapping =skb_get_queue_mapping (skb);bool nonlinear =skb_is_nonlinear (skb);
drivers/net/ethernet/freescale/fec_mpc52xx.c +2 -1
@@ -305,7 +305,8 @@ static int mpc52xx_fec_close(struct net_device *dev)* invariant will hold if you make sure that the netif_*_queue() * calls are done at the proper times. */ -static int mpc52xx_fec_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +mpc52xx_fec_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct mpc52xx_fec_priv *priv =netdev_priv (dev);struct bcom_fec_bd *bd;
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +2 -1
@@ -481,7 +481,8 @@ static struct sk_buff *tx_skb_align_workaround(struct net_device *dev, }#endif -static int fs_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +fs_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct fs_enet_private *fep =netdev_priv (dev);cbd_t __iomem *bdp;
drivers/net/ethernet/freescale/gianfar.c +2 -2
@@ -110,7 +110,7 @@const char gfar_driver_version[] ="2.0" ;static int gfar_enet_open (struct net_device *dev); -static int gfar_start_xmit (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t gfar_start_xmit (struct sk_buff *skb,struct net_device *dev);static void gfar_reset_task (struct work_struct *work);static void gfar_timeout (struct net_device *dev);static int gfar_close (struct net_device *dev);
@@ -2332,7 +2332,7 @@ static inline bool gfar_csum_errata_76(struct gfar_private *priv,/* This is called by the kernel when a frame is ready for transmission. * It is pointed to by the dev->hard_start_xmit function pointer */ -static int gfar_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t gfar_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct gfar_private *priv =netdev_priv (dev);struct gfar_priv_tx_q *tx_queue =NULL ;
drivers/net/ethernet/freescale/ucc_geth.c +2 -1
@@ -3078,7 +3078,8 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)/* This is called by the kernel when a frame is ready for transmission. */ /* It is pointed to by the dev->hard_start_xmit function pointer */ -static int ucc_geth_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +ucc_geth_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct ucc_geth_private *ugeth =netdev_priv (dev);#ifdef CONFIG_UGETH_TX_ON_DEMAND
Signature · 1 line
1.8.3.1
PATCH 3/22 net: seeq: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/seeq/ether3.c | 5 +++-- drivers/net/ethernet/seeq/sgiseeq.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/net/ethernet/seeq/ether3.c +3 -2
@@ -77,7 +77,8 @@static int ether3_rx (struct net_device *dev,unsigned int maxcnt);static void ether3_tx (struct net_device *dev);static int ether3_open (struct net_device *dev); -static int ether3_sendpacket (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t ether3_sendpacket (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t ether3_interrupt (int irq,void *dev_id);static int ether3_close (struct net_device *dev);static void ether3_setmulticastlist (struct net_device *dev);
@@ -481,7 +482,7 @@ static void ether3_timeout(struct net_device *dev)/* * Transmit a packet */ -static int +static netdev_tx_t ether3_sendpacket (struct sk_buff *skb,struct net_device *dev) {unsigned long flags;
drivers/net/ethernet/seeq/sgiseeq.c +2 -1
@@ -578,7 +578,8 @@ static inline int sgiseeq_reset(struct net_device *dev)return 0 ; } -static int sgiseeq_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +sgiseeq_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct sgiseeq_private *sp =netdev_priv (dev);struct hpc3_ethregs *hregs = sp->hregs;
Signature · 1 line
1.8.3.1
PATCH 4/22 net: cirrus: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/cirrus/ep93xx_eth.c | 2 +- drivers/net/ethernet/cirrus/mac89x0.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/cirrus/ep93xx_eth.c +1 -1
@@ -332,7 +332,7 @@ static int ep93xx_poll(struct napi_struct *napi, int budget)return rx; } -static int ep93xx_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t ep93xx_xmit (struct sk_buff *skb,struct net_device *dev) {struct ep93xx_priv *ep =netdev_priv (dev);struct ep93xx_tdesc *txd;
drivers/net/ethernet/cirrus/mac89x0.c +2 -2
@@ -113,7 +113,7 @@ struct net_local {/* Index to functions, as function prototypes. */ static int net_open (struct net_device *dev); -static int net_send_packet (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t net_send_packet (struct sk_buff *skb,struct net_device *dev);static irqreturn_t net_interrupt (int irq,void *dev_id);static void set_multicast_list (struct net_device *dev);static void net_rx (struct net_device *dev);
@@ -324,7 +324,7 @@ static int mac89x0_device_probe(struct platform_device *pdev)return 0 ; } -static int +static netdev_tx_t net_send_packet (struct sk_buff *skb,struct net_device *dev) {struct net_local *lp =netdev_priv (dev);
Signature · 1 line
1.8.3.1
PATCH 5/22 net: sgi: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/sgi/ioc3-eth.c | 4 ++-- drivers/net/ethernet/sgi/meth.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/sgi/ioc3-eth.c +2 -2
@@ -99,7 +99,7 @@ struct ioc3_private {static int ioc3_ioctl (struct net_device *dev,struct ifreq *rq,int cmd);static void ioc3_set_multicast_list (struct net_device *dev); -static int ioc3_start_xmit (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t ioc3_start_xmit (struct sk_buff *skb,struct net_device *dev);static void ioc3_timeout (struct net_device *dev);static inline unsigned int ioc3_hash (const unsigned char *addr);static inline void ioc3_stop (struct ioc3_private *ip);
@@ -1390,7 +1390,7 @@ static void ioc3_remove_one(struct pci_dev *pdev) .remove = ioc3_remove_one, }; -static int ioc3_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t ioc3_start_xmit (struct sk_buff *skb,struct net_device *dev) {unsigned long data;struct ioc3_private *ip =netdev_priv (dev);
drivers/net/ethernet/sgi/meth.c +1 -1
@@ -697,7 +697,7 @@ static void meth_add_to_tx_ring(struct meth_private *priv, struct sk_buff *skb)/* * Transmit a packet (called by the kernel) */ -static int meth_tx (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t meth_tx (struct sk_buff *skb,struct net_device *dev) {struct meth_private *priv =netdev_priv (dev);unsigned long flags;
Signature · 1 line
1.8.3.1
PATCH 6/22 net: wiznet: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/wiznet/w5100.c | 2 +- drivers/net/ethernet/wiznet/w5300.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/wiznet/w5100.c +1 -1
@@ -835,7 +835,7 @@ static void w5100_tx_work(struct work_struct *work)w5100_tx_skb (priv->ndev, skb); } -static int w5100_start_tx (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t w5100_start_tx (struct sk_buff *skb,struct net_device *ndev) {struct w5100_priv *priv =netdev_priv (ndev);
drivers/net/ethernet/wiznet/w5300.c +1 -1
@@ -365,7 +365,7 @@ static void w5300_tx_timeout(struct net_device *ndev)netif_wake_queue (ndev); } -static int w5300_start_tx (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t w5300_start_tx (struct sk_buff *skb,struct net_device *ndev) {struct w5300_priv *priv =netdev_priv (ndev);
Signature · 1 line
1.8.3.1
PATCH 7/22 net: i825xx: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/i825xx/ether1.c | 5 +++-- drivers/net/ethernet/i825xx/lib82596.c | 4 ++-- drivers/net/ethernet/i825xx/sun3_82586.c | 6 ++++-- 3 files changed, 9 insertions(+), 6 deletions(-)
drivers/net/ethernet/i825xx/ether1.c +3 -2
@@ -64,7 +64,8 @@#define RX_AREA_END 0x0fc00static int ether1_open (struct net_device *dev); -static int ether1_sendpacket (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t ether1_sendpacket (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t ether1_interrupt (int irq,void *dev_id);static int ether1_close (struct net_device *dev);static void ether1_setmulticastlist (struct net_device *dev);
@@ -667,7 +668,7 @@netif_wake_queue (dev); } -static int +static netdev_tx_t ether1_sendpacket (struct sk_buff *skb,struct net_device *dev) {int tmp, tst, nopaddr, txaddr, tbdaddr, dataddr;
drivers/net/ethernet/i825xx/lib82596.c +2 -2
@@ -347,7 +347,7 @@ struct i596_private { 0x7f /* *multi IA */ };static int i596_open (struct net_device *dev); -static int i596_start_xmit (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t i596_start_xmit (struct sk_buff *skb,struct net_device *dev);static irqreturn_t i596_interrupt (int irq,void *dev_id);static int i596_close (struct net_device *dev);static void i596_add_cmd (struct net_device *dev,struct i596_cmd *cmd);
@@ -966,7 +966,7 @@ static void i596_tx_timeout (struct net_device *dev) } -static int i596_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t i596_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct i596_private *lp =netdev_priv (dev);struct tx_cmd *tx_cmd;
drivers/net/ethernet/i825xx/sun3_82586.c +4 -2
@@ -121,7 +121,8 @@static irqreturn_t sun3_82586_interrupt (int irq,void *dev_id);static int sun3_82586_open (struct net_device *dev);static int sun3_82586_close (struct net_device *dev); -static int sun3_82586_send_packet (struct sk_buff *,struct net_device *); +static netdev_tx_t sun3_82586_send_packet (struct sk_buff *, +struct net_device *);static struct net_device_stats *sun3_82586_get_stats (struct net_device *dev);static void set_multicast_list (struct net_device *dev);static void sun3_82586_timeout (struct net_device *dev);
@@ -1002,7 +1003,8 @@ static void sun3_82586_timeout(struct net_device *dev)* send frame */ -static int sun3_82586_send_packet (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +sun3_82586_send_packet (struct sk_buff *skb,struct net_device *dev) {int len,i;#ifndef NO_NOPCOMMANDS
Signature · 1 line
1.8.3.1
PATCH 8/22 net: apple: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/apple/bmac.c | 4 ++-- drivers/net/ethernet/apple/mace.c | 4 ++-- drivers/net/ethernet/apple/macmace.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/ethernet/apple/bmac.c +2 -2
@@ -154,7 +154,7 @@ struct bmac_data {static irqreturn_t bmac_rxdma_intr (int irq,void *dev_id);static void bmac_set_timeout (struct net_device *dev);static void bmac_tx_timeout (struct timer_list *t); -static int bmac_output (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t bmac_output (struct sk_buff *skb,struct net_device *dev);static void bmac_start (struct net_device *dev);#define DBDMA_SET (x) ( ((x) | (x) << 16) )
@@ -1456,7 +1456,7 @@ static int bmac_close(struct net_device *dev)spin_unlock_irqrestore (&bp->lock, flags); } -static int +static netdev_tx_t bmac_output (struct sk_buff *skb,struct net_device *dev) {struct bmac_data *bp =netdev_priv (dev);
drivers/net/ethernet/apple/mace.c +2 -2
@@ -78,7 +78,7 @@ struct mace_data {static int mace_open (struct net_device *dev);static int mace_close (struct net_device *dev); -static int mace_xmit_start (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t mace_xmit_start (struct sk_buff *skb,struct net_device *dev);static void mace_set_multicast (struct net_device *dev);static void mace_reset (struct net_device *dev);static int mace_set_address (struct net_device *dev,void *addr);
@@ -525,7 +525,7 @@ static inline void mace_set_timeout(struct net_device *dev) mp->timeout_active =1 ; } -static int mace_xmit_start (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t mace_xmit_start (struct sk_buff *skb,struct net_device *dev) {struct mace_data *mp =netdev_priv (dev);volatile struct dbdma_regs __iomem *td = mp->tx_dma;
drivers/net/ethernet/apple/macmace.c +2 -2
@@ -89,7 +89,7 @@ struct mace_frame {static int mace_open (struct net_device *dev);static int mace_close (struct net_device *dev); -static int mace_xmit_start (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t mace_xmit_start (struct sk_buff *skb,struct net_device *dev);static void mace_set_multicast (struct net_device *dev);static int mace_set_address (struct net_device *dev,void *addr);static void mace_reset (struct net_device *dev);
@@ -444,7 +444,7 @@ static int mace_close(struct net_device *dev)* Transmit a frame */ -static int mace_xmit_start (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t mace_xmit_start (struct sk_buff *skb,struct net_device *dev) {struct mace_data *mp =netdev_priv (dev);unsigned long flags;
Signature · 1 line
1.8.3.1
PATCH 9/22 net: smsc: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/smsc/smc911x.c | 3 ++- drivers/net/ethernet/smsc/smc91x.c | 3 ++- drivers/net/ethernet/smsc/smsc911x.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/smsc/smc911x.c +2 -1
@@ -513,7 +513,8 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)* now, or set the card to generates an interrupt when ready * for the packet. */ -static int smc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +smc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct smc911x_local *lp =netdev_priv (dev);unsigned int free;
drivers/net/ethernet/smsc/smc91x.c +2 -1
@@ -638,7 +638,8 @@ static void smc_hardware_send_pkt(unsigned long data)* now, or set the card to generates an interrupt when ready * for the packet. */ -static int smc_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +smc_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct smc_local *lp =netdev_priv (dev);void __iomem *ioaddr = lp->base;
drivers/net/ethernet/smsc/smsc911x.c +2 -1
@@ -1786,7 +1786,8 @@ static int smsc911x_stop(struct net_device *dev) }/* Entry point for transmitting a packet */ -static int smsc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +smsc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct smsc911x_data *pdata =netdev_priv (dev);unsigned int freespace;
Signature · 1 line
1.8.3.1
PATCH 10/22 net: ti: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/ti/cpmac.c | 2 +- drivers/net/ethernet/ti/davinci_emac.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/ethernet/ti/cpmac.c +1 -1
@@ -544,7 +544,7 @@ static int cpmac_poll(struct napi_struct *napi, int budget) } -static int cpmac_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t cpmac_start_xmit (struct sk_buff *skb,struct net_device *dev) {int queue;unsigned int len;
drivers/net/ethernet/ti/davinci_emac.c +1 -1
@@ -943,7 +943,7 @@ static void emac_tx_handler(void *token, int len, int status)* * Returns success(NETDEV_TX_OK) or error code (typically out of desc's) */ -static int emac_dev_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t emac_dev_xmit (struct sk_buff *skb,struct net_device *ndev) {struct device *emac_dev = &ndev->dev;int ret_code;
drivers/net/ethernet/ti/netcp_core.c +4 -4
@@ -1270,7 +1270,8 @@ static int netcp_tx_submit_skb(struct netcp_intf *netcp, }/* Submit the packet */ -static int netcp_ndo_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t +netcp_ndo_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct netcp_intf *netcp =netdev_priv (ndev);struct netcp_stats *tx_stats = &netcp->stats;
@@ -1290,7 +1291,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev)dev_warn (netcp->ndev_dev,"padding failed (%d), packet dropped\n" , ret); tx_stats->tx_dropped++; -return ret; +return NETDEV_TX_BUSY ; } skb->len =NETCP_MIN_PACKET_SIZE ; }
@@ -1298,7 +1299,6 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) desc =netcp_tx_map_skb (skb, netcp);if (unlikely (!desc)) {netif_stop_subqueue (ndev, subqueue); - ret = -ENOBUFS ; goto drop; }
@@ -1319,7 +1319,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev)if (desc)netcp_free_tx_desc_chain (netcp, desc,sizeof (*desc));dev_kfree_skb (skb); -return ret; +return NETDEV_TX_BUSY ; }int netcp_txpipe_close (struct netcp_tx_pipe *tx_pipe)
Signature · 1 line
1.8.3.1
PATCH 11/22 net: faraday: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Found by coccinelle.
--- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- drivers/net/ethernet/faraday/ftmac100.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/net/ethernet/faraday/ftgmac100.c +2 -2
@@ -712,8 +712,8 @@ static bool ftgmac100_prep_tx_csum(struct sk_buff *skb, u32 *csum_vlan)return skb_checksum_help (skb) ==0 ; } -static int ftgmac100_hard_start_xmit (struct sk_buff *skb, -struct net_device *netdev) +static netdev_tx_t ftgmac100_hard_start_xmit (struct sk_buff *skb, +struct net_device *netdev) {struct ftgmac100 *priv =netdev_priv (netdev);struct ftgmac100_txdes *txdes, *first;
drivers/net/ethernet/faraday/ftmac100.c +4 -3
@@ -634,8 +634,8 @@ static void ftmac100_tx_complete(struct ftmac100 *priv) ; } -static int ftmac100_xmit (struct ftmac100 *priv,struct sk_buff *skb, -dma_addr_t map) +static netdev_tx_t ftmac100_xmit (struct ftmac100 *priv,struct sk_buff *skb, +dma_addr_t map) {struct net_device *netdev = priv->netdev;struct ftmac100_txdes *txdes;
@@ -1016,7 +1016,8 @@ static int ftmac100_stop(struct net_device *netdev)return 0 ; } -static int ftmac100_hard_start_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t +ftmac100_hard_start_xmit (struct sk_buff *skb,struct net_device *netdev) {struct ftmac100 *priv =netdev_priv (netdev);dma_addr_t map;
Signature · 1 line
1.8.3.1
PATCH 12/22 net: ovs: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- net/openvswitch/vport-internal_dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/openvswitch/vport-internal_dev.c +3 -2
@@ -43,7 +43,8 @@ static struct internal_dev *internal_dev_priv(struct net_device *netdev) }/* Called with rcu_read_lock_bh. */ -static int internal_dev_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t +internal_dev_xmit (struct sk_buff *skb,struct net_device *netdev) {int len, err;
@@ -62,7 +63,7 @@ static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) }else { netdev->stats.tx_errors++; } -return 0 ; +return NETDEV_TX_OK ; }static int internal_dev_open (struct net_device *netdev)
Signature · 1 line
1.8.3.1
PATCH 13/22 net: xen-netback: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/xen-netback/interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/xen-netback/interface.c +2 -1
@@ -165,7 +165,8 @@ static u16 xenvif_select_queue(struct net_device *dev, struct sk_buff *skb,return vif->hash.mapping[skb_get_hash_raw (skb) % size]; } -static int xenvif_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +xenvif_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct xenvif *vif =netdev_priv (dev);struct xenvif_queue *queue =NULL ;
Signature · 1 line
1.8.3.1
PATCH 14/22 net: caif: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/caif/caif_hsi.c | 10 +++++----- drivers/net/caif/caif_serial.c | 7 +++++-- drivers/net/caif/caif_spi.c | 6 +++--- drivers/net/caif/caif_virtio.c | 2 +- net/caif/chnl_net.c | 3 ++- 5 files changed, 16 insertions(+), 12 deletions(-)
drivers/net/caif/caif_hsi.c +5 -5
@@ -1006,7 +1006,7 @@ static void cfhsi_aggregation_tout(struct timer_list *t)cfhsi_start_tx (cfhsi); } -static int cfhsi_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t cfhsi_xmit (struct sk_buff *skb,struct net_device *dev) {struct cfhsi *cfhsi =NULL ;int start_xfer =0 ;
@@ -1014,7 +1014,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)int prio;if (!dev) -return -EINVAL ; +return NETDEV_TX_BUSY ; cfhsi =netdev_priv (dev);
@@ -1048,7 +1048,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)if (WARN_ON (test_bit (CFHSI_SHUTDOWN , &cfhsi->bits))) {spin_unlock_bh (&cfhsi->lock);cfhsi_abort_tx (cfhsi); -return -EINVAL ; +return NETDEV_TX_BUSY ; }/* Send flow off if number of packets is above high water mark. */
@@ -1072,7 +1072,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)spin_unlock_bh (&cfhsi->lock);if (aggregate_ready)cfhsi_start_tx (cfhsi); -return 0 ; +return NETDEV_TX_OK ; }/* Delete inactivity timer if started. */
@@ -1102,7 +1102,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)queue_work (cfhsi->wq, &cfhsi->wake_up_work); } -return 0 ; +return NETDEV_TX_OK ; }static const struct net_device_ops cfhsi_netdevops;
drivers/net/caif/caif_serial.c +5 -2
@@ -275,7 +275,7 @@ static int handle_tx(struct ser_device *ser)return tty_wr; } -static int caif_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t caif_xmit (struct sk_buff *skb,struct net_device *dev) {struct ser_device *ser;
@@ -290,7 +290,10 @@ static int caif_xmit(struct sk_buff *skb, struct net_device *dev) ser->common.flowctrl (ser->dev,OFF );skb_queue_tail (&ser->head, skb); -return handle_tx (ser); +if (handle_tx (ser)) +return NETDEV_TX_BUSY ; + +return NETDEV_TX_OK ; }
drivers/net/caif/caif_spi.c +3 -3
@@ -486,12 +486,12 @@ static void cfspi_xfer_done_cb(struct cfspi_ifc *ifc)complete (&cfspi->comp); } -static int cfspi_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t cfspi_xmit (struct sk_buff *skb,struct net_device *dev) {struct cfspi *cfspi =NULL ;unsigned long flags;if (!dev) -return -EINVAL ; +return NETDEV_TX_BUSY ; cfspi =netdev_priv (dev);
@@ -512,7 +512,7 @@ static int cfspi_xmit(struct sk_buff *skb, struct net_device *dev) cfspi->cfdev.flowctrl (cfspi->ndev,0 ); } -return 0 ; +return NETDEV_TX_OK ; }int cfspi_rxfrm (struct cfspi *cfspi,u8 *buf,size_t len)
drivers/net/caif/caif_virtio.c +1 -1
@@ -519,7 +519,7 @@ static struct buf_info *cfv_alloc_and_copy_to_shm(struct cfv_info *cfv, }/* Put the CAIF packet on the virtio ring and kick the receiver */ -static int cfv_netdev_tx (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t cfv_netdev_tx (struct sk_buff *skb,struct net_device *netdev) {struct cfv_info *cfv =netdev_priv (netdev);struct buf_info *buf_info;
net/caif/chnl_net.c +2 -1
@@ -211,7 +211,8 @@ static void chnl_flowctrl_cb(struct cflayer *layr, enum caif_ctrlcmd flow, } } -static int chnl_net_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +chnl_net_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct chnl_net *priv;struct cfpkt *pkt =NULL ;
Signature · 1 line
1.8.3.1
PATCH 15/22 net: hamradio: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/hamradio/baycom_epp.c | 3 ++- drivers/net/hamradio/dmascc.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/net/hamradio/baycom_epp.c +2 -1
@@ -772,7 +772,8 @@ static void epp_bh(struct work_struct *work)* ===================== network driver interface ========================= */ -static int baycom_send_packet (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +baycom_send_packet (struct sk_buff *skb,struct net_device *dev) {struct baycom_state *bc =netdev_priv (dev);
drivers/net/hamradio/dmascc.c +2 -2
@@ -239,7 +239,7 @@ struct scc_info {static int scc_open (struct net_device *dev);static int scc_close (struct net_device *dev);static int scc_ioctl (struct net_device *dev,struct ifreq *ifr,int cmd); -static int scc_send_packet (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t scc_send_packet (struct sk_buff *skb,struct net_device *dev);static int scc_set_mac_address (struct net_device *dev,void *sa);static inline void tx_on (struct scc_priv *priv);
@@ -921,7 +921,7 @@ static int scc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) } -static int scc_send_packet (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t scc_send_packet (struct sk_buff *skb,struct net_device *dev) {struct scc_priv *priv = dev->ml_priv;unsigned long flags;
Signature · 1 line
1.8.3.1
PATCH 16/22 usbnet: ipheth: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/usb/ipheth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/ipheth.c +1 -1
@@ -413,7 +413,7 @@ static int ipheth_close(struct net_device *net)return 0 ; } -static int ipheth_tx (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t ipheth_tx (struct sk_buff *skb,struct net_device *net) {struct ipheth_device *dev =netdev_priv (net);struct usb_device *udev = dev->udev;
Signature · 1 line
1.8.3.1
PATCH 17/22 hv_netvsc: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/hyperv/netvsc_drv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/net/hyperv/netvsc_drv.c +7 -3
@@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, struct net_device *vf_netdev,return rc; } -static int netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t +netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) {struct net_device_context *net_device_ctx =netdev_priv (net);struct hv_netvsc_packet *packet =NULL ;
@@ -528,8 +529,11 @@ static 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 ; + }/* We will atmost need two pages to describe the rndis * header. We can only transmit MAX_PAGE_BUFFER_COUNT number
Signature · 1 line
1.8.3.1
PATCH 18/22 can: xilinx: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/can/xilinx_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/xilinx_can.c +1 -1
@@ -612,7 +612,7 @@ static int xcan_start_xmit_mailbox(struct sk_buff *skb, struct net_device *ndev)* * Return: NETDEV_TX_OK on success and NETDEV_TX_BUSY when the tx queue is full */ -static int xcan_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t xcan_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct xcan_priv *priv =netdev_priv (ndev);int ret;
Signature · 1 line
1.8.3.1
PATCH 19/22 net: plip: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/plip/plip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/plip/plip.c +2 -2
@@ -146,7 +146,7 @@static void plip_interrupt (void *dev_id);/* Functions for DEV methods */ -static int plip_tx_packet (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t plip_tx_packet (struct sk_buff *skb,struct net_device *dev);static int plip_hard_header (struct sk_buff *skb,struct net_device *dev,unsigned short type,const void *daddr,const void *saddr,unsigned len);
@@ -962,7 +962,7 @@ static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev)spin_unlock_irqrestore (&nl->lock, flags); } -static int +static netdev_tx_t plip_tx_packet (struct sk_buff *skb,struct net_device *dev) {struct net_local *nl =netdev_priv (dev);
Signature · 1 line
1.8.3.1
PATCH 20/22 rionet: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/rionet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/rionet.c +2 -1
@@ -170,7 +170,8 @@ static int rionet_queue_tx_msg(struct sk_buff *skb, struct net_device *ndev,return 0 ; } -static int rionet_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t +rionet_start_xmit (struct sk_buff *skb,struct net_device *ndev) {int i;struct rionet_private *rnet =netdev_priv (ndev);
Signature · 1 line
1.8.3.1
PATCH 21/22 l2tp: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- net/l2tp/l2tp_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/l2tp/l2tp_eth.c +2 -1
@@ -77,7 +77,8 @@ static void l2tp_eth_dev_uninit(struct net_device *dev)*/ } -static int l2tp_eth_dev_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +l2tp_eth_dev_xmit (struct sk_buff *skb,struct net_device *dev) {struct l2tp_eth *priv =netdev_priv (dev);struct l2tp_session *session = priv->session;
Signature · 1 line
1.8.3.1
PATCH 22/22 net: hsr: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- net/hsr/hsr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/hsr/hsr_device.c +1 -1
@@ -233,7 +233,7 @@ static netdev_features_t hsr_fix_features(struct net_device *dev, } -static int hsr_dev_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t hsr_dev_xmit (struct sk_buff *skb,struct net_device *dev) {struct hsr_priv *hsr =netdev_priv (dev);struct hsr_port *master;
Signature · 1 line
1.8.3.1
PATCH 1/22 net: micrel: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/micrel/ks8695net.c +1 -1
@@ -1164,7 +1164,7 @@ static int ks8695_poll(struct napi_struct *napi, int budget)* sk_buff and adds it to the TX ring. It then kicks the TX DMA * engine to ensure transmission begins. */ -static int +static netdev_tx_t ks8695_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct ks8695_priv *ksp =netdev_priv (ndev);
drivers/net/ethernet/micrel/ks8851_mll.c +2 -2
@@ -1021,9 +1021,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)* spin_lock_irqsave is required because tx and rx should be mutual exclusive. * So while tx is in-progress, prevent IRQ interrupt from happenning. */ -static int ks_start_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t ks_start_xmit (struct sk_buff *skb,struct net_device *netdev) { -int retv =NETDEV_TX_OK ; +netdev_tx_t retv =NETDEV_TX_OK ;struct ks_net *ks =netdev_priv (netdev);disable_irq (netdev->irq);
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 2/22 net: freescale: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 ++- drivers/net/ethernet/freescale/fec_mpc52xx.c | 3 ++- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- drivers/net/ethernet/freescale/gianfar.c | 4 ++-- drivers/net/ethernet/freescale/ucc_geth.c | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-)
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +2 -1
@@ -2044,7 +2044,8 @@ static inline int dpaa_xmit(struct dpaa_priv *priv,return 0 ; } -static int dpaa_start_xmit (struct sk_buff *skb,struct net_device *net_dev) +static netdev_tx_t +dpaa_start_xmit (struct sk_buff *skb,struct net_device *net_dev) {const int queue_mapping =skb_get_queue_mapping (skb);bool nonlinear =skb_is_nonlinear (skb);
drivers/net/ethernet/freescale/fec_mpc52xx.c +2 -1
@@ -305,7 +305,8 @@ static int mpc52xx_fec_close(struct net_device *dev)* invariant will hold if you make sure that the netif_*_queue() * calls are done at the proper times. */ -static int mpc52xx_fec_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +mpc52xx_fec_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct mpc52xx_fec_priv *priv =netdev_priv (dev);struct bcom_fec_bd *bd;
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +2 -1
@@ -481,7 +481,8 @@ static struct sk_buff *tx_skb_align_workaround(struct net_device *dev, }#endif -static int fs_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +fs_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct fs_enet_private *fep =netdev_priv (dev);cbd_t __iomem *bdp;
drivers/net/ethernet/freescale/gianfar.c +2 -2
@@ -110,7 +110,7 @@const char gfar_driver_version[] ="2.0" ;static int gfar_enet_open (struct net_device *dev); -static int gfar_start_xmit (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t gfar_start_xmit (struct sk_buff *skb,struct net_device *dev);static void gfar_reset_task (struct work_struct *work);static void gfar_timeout (struct net_device *dev);static int gfar_close (struct net_device *dev);
@@ -2332,7 +2332,7 @@ static inline bool gfar_csum_errata_76(struct gfar_private *priv,/* This is called by the kernel when a frame is ready for transmission. * It is pointed to by the dev->hard_start_xmit function pointer */ -static int gfar_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t gfar_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct gfar_private *priv =netdev_priv (dev);struct gfar_priv_tx_q *tx_queue =NULL ;
drivers/net/ethernet/freescale/ucc_geth.c +2 -1
@@ -3078,7 +3078,8 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)/* This is called by the kernel when a frame is ready for transmission. */ /* It is pointed to by the dev->hard_start_xmit function pointer */ -static int ucc_geth_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +ucc_geth_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct ucc_geth_private *ugeth =netdev_priv (dev);#ifdef CONFIG_UGETH_TX_ON_DEMAND
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 3/22 net: seeq: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/seeq/ether3.c | 5 +++-- drivers/net/ethernet/seeq/sgiseeq.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/net/ethernet/seeq/ether3.c +3 -2
@@ -77,7 +77,8 @@static int ether3_rx (struct net_device *dev,unsigned int maxcnt);static void ether3_tx (struct net_device *dev);static int ether3_open (struct net_device *dev); -static int ether3_sendpacket (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t ether3_sendpacket (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t ether3_interrupt (int irq,void *dev_id);static int ether3_close (struct net_device *dev);static void ether3_setmulticastlist (struct net_device *dev);
@@ -481,7 +482,7 @@ static void ether3_timeout(struct net_device *dev)/* * Transmit a packet */ -static int +static netdev_tx_t ether3_sendpacket (struct sk_buff *skb,struct net_device *dev) {unsigned long flags;
drivers/net/ethernet/seeq/sgiseeq.c +2 -1
@@ -578,7 +578,8 @@ static inline int sgiseeq_reset(struct net_device *dev)return 0 ; } -static int sgiseeq_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +sgiseeq_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct sgiseeq_private *sp =netdev_priv (dev);struct hpc3_ethregs *hregs = sp->hregs;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 4/22 net: cirrus: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/cirrus/ep93xx_eth.c | 2 +- drivers/net/ethernet/cirrus/mac89x0.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/cirrus/ep93xx_eth.c +1 -1
@@ -332,7 +332,7 @@ static int ep93xx_poll(struct napi_struct *napi, int budget)return rx; } -static int ep93xx_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t ep93xx_xmit (struct sk_buff *skb,struct net_device *dev) {struct ep93xx_priv *ep =netdev_priv (dev);struct ep93xx_tdesc *txd;
drivers/net/ethernet/cirrus/mac89x0.c +2 -2
@@ -113,7 +113,7 @@ struct net_local {/* Index to functions, as function prototypes. */ static int net_open (struct net_device *dev); -static int net_send_packet (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t net_send_packet (struct sk_buff *skb,struct net_device *dev);static irqreturn_t net_interrupt (int irq,void *dev_id);static void set_multicast_list (struct net_device *dev);static void net_rx (struct net_device *dev);
@@ -324,7 +324,7 @@ static int mac89x0_device_probe(struct platform_device *pdev)return 0 ; } -static int +static netdev_tx_t net_send_packet (struct sk_buff *skb,struct net_device *dev) {struct net_local *lp =netdev_priv (dev);
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 5/22 net: sgi: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/sgi/ioc3-eth.c | 4 ++-- drivers/net/ethernet/sgi/meth.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/sgi/ioc3-eth.c +2 -2
@@ -99,7 +99,7 @@ struct ioc3_private {static int ioc3_ioctl (struct net_device *dev,struct ifreq *rq,int cmd);static void ioc3_set_multicast_list (struct net_device *dev); -static int ioc3_start_xmit (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t ioc3_start_xmit (struct sk_buff *skb,struct net_device *dev);static void ioc3_timeout (struct net_device *dev);static inline unsigned int ioc3_hash (const unsigned char *addr);static inline void ioc3_stop (struct ioc3_private *ip);
@@ -1390,7 +1390,7 @@ static void ioc3_remove_one(struct pci_dev *pdev) .remove = ioc3_remove_one, }; -static int ioc3_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t ioc3_start_xmit (struct sk_buff *skb,struct net_device *dev) {unsigned long data;struct ioc3_private *ip =netdev_priv (dev);
drivers/net/ethernet/sgi/meth.c +1 -1
@@ -697,7 +697,7 @@ static void meth_add_to_tx_ring(struct meth_private *priv, struct sk_buff *skb)/* * Transmit a packet (called by the kernel) */ -static int meth_tx (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t meth_tx (struct sk_buff *skb,struct net_device *dev) {struct meth_private *priv =netdev_priv (dev);unsigned long flags;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 6/22 net: wiznet: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/wiznet/w5100.c | 2 +- drivers/net/ethernet/wiznet/w5300.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/wiznet/w5100.c +1 -1
@@ -835,7 +835,7 @@ static void w5100_tx_work(struct work_struct *work)w5100_tx_skb (priv->ndev, skb); } -static int w5100_start_tx (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t w5100_start_tx (struct sk_buff *skb,struct net_device *ndev) {struct w5100_priv *priv =netdev_priv (ndev);
drivers/net/ethernet/wiznet/w5300.c +1 -1
@@ -365,7 +365,7 @@ static void w5300_tx_timeout(struct net_device *ndev)netif_wake_queue (ndev); } -static int w5300_start_tx (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t w5300_start_tx (struct sk_buff *skb,struct net_device *ndev) {struct w5300_priv *priv =netdev_priv (ndev);
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 7/22 net: i825xx: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/i825xx/ether1.c | 5 +++-- drivers/net/ethernet/i825xx/lib82596.c | 4 ++-- drivers/net/ethernet/i825xx/sun3_82586.c | 6 ++++-- 3 files changed, 9 insertions(+), 6 deletions(-)
drivers/net/ethernet/i825xx/ether1.c +3 -2
@@ -64,7 +64,8 @@#define RX_AREA_END 0x0fc00static int ether1_open (struct net_device *dev); -static int ether1_sendpacket (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t ether1_sendpacket (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t ether1_interrupt (int irq,void *dev_id);static int ether1_close (struct net_device *dev);static void ether1_setmulticastlist (struct net_device *dev);
@@ -667,7 +668,7 @@netif_wake_queue (dev); } -static int +static netdev_tx_t ether1_sendpacket (struct sk_buff *skb,struct net_device *dev) {int tmp, tst, nopaddr, txaddr, tbdaddr, dataddr;
drivers/net/ethernet/i825xx/lib82596.c +2 -2
@@ -347,7 +347,7 @@ struct i596_private { 0x7f /* *multi IA */ };static int i596_open (struct net_device *dev); -static int i596_start_xmit (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t i596_start_xmit (struct sk_buff *skb,struct net_device *dev);static irqreturn_t i596_interrupt (int irq,void *dev_id);static int i596_close (struct net_device *dev);static void i596_add_cmd (struct net_device *dev,struct i596_cmd *cmd);
@@ -966,7 +966,7 @@ static void i596_tx_timeout (struct net_device *dev) } -static int i596_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t i596_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct i596_private *lp =netdev_priv (dev);struct tx_cmd *tx_cmd;
drivers/net/ethernet/i825xx/sun3_82586.c +4 -2
@@ -121,7 +121,8 @@static irqreturn_t sun3_82586_interrupt (int irq,void *dev_id);static int sun3_82586_open (struct net_device *dev);static int sun3_82586_close (struct net_device *dev); -static int sun3_82586_send_packet (struct sk_buff *,struct net_device *); +static netdev_tx_t sun3_82586_send_packet (struct sk_buff *, +struct net_device *);static struct net_device_stats *sun3_82586_get_stats (struct net_device *dev);static void set_multicast_list (struct net_device *dev);static void sun3_82586_timeout (struct net_device *dev);
@@ -1002,7 +1003,8 @@ static void sun3_82586_timeout(struct net_device *dev)* send frame */ -static int sun3_82586_send_packet (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +sun3_82586_send_packet (struct sk_buff *skb,struct net_device *dev) {int len,i;#ifndef NO_NOPCOMMANDS
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 8/22 net: apple: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/apple/bmac.c | 4 ++-- drivers/net/ethernet/apple/mace.c | 4 ++-- drivers/net/ethernet/apple/macmace.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/ethernet/apple/bmac.c +2 -2
@@ -154,7 +154,7 @@ struct bmac_data {static irqreturn_t bmac_rxdma_intr (int irq,void *dev_id);static void bmac_set_timeout (struct net_device *dev);static void bmac_tx_timeout (struct timer_list *t); -static int bmac_output (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t bmac_output (struct sk_buff *skb,struct net_device *dev);static void bmac_start (struct net_device *dev);#define DBDMA_SET (x) ( ((x) | (x) << 16) )
@@ -1456,7 +1456,7 @@ static int bmac_close(struct net_device *dev)spin_unlock_irqrestore (&bp->lock, flags); } -static int +static netdev_tx_t bmac_output (struct sk_buff *skb,struct net_device *dev) {struct bmac_data *bp =netdev_priv (dev);
drivers/net/ethernet/apple/mace.c +2 -2
@@ -78,7 +78,7 @@ struct mace_data {static int mace_open (struct net_device *dev);static int mace_close (struct net_device *dev); -static int mace_xmit_start (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t mace_xmit_start (struct sk_buff *skb,struct net_device *dev);static void mace_set_multicast (struct net_device *dev);static void mace_reset (struct net_device *dev);static int mace_set_address (struct net_device *dev,void *addr);
@@ -525,7 +525,7 @@ static inline void mace_set_timeout(struct net_device *dev) mp->timeout_active =1 ; } -static int mace_xmit_start (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t mace_xmit_start (struct sk_buff *skb,struct net_device *dev) {struct mace_data *mp =netdev_priv (dev);volatile struct dbdma_regs __iomem *td = mp->tx_dma;
drivers/net/ethernet/apple/macmace.c +2 -2
@@ -89,7 +89,7 @@ struct mace_frame {static int mace_open (struct net_device *dev);static int mace_close (struct net_device *dev); -static int mace_xmit_start (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t mace_xmit_start (struct sk_buff *skb,struct net_device *dev);static void mace_set_multicast (struct net_device *dev);static int mace_set_address (struct net_device *dev,void *addr);static void mace_reset (struct net_device *dev);
@@ -444,7 +444,7 @@ static int mace_close(struct net_device *dev)* Transmit a frame */ -static int mace_xmit_start (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t mace_xmit_start (struct sk_buff *skb,struct net_device *dev) {struct mace_data *mp =netdev_priv (dev);unsigned long flags;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 9/22 net: smsc: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/smsc/smc911x.c | 3 ++- drivers/net/ethernet/smsc/smc91x.c | 3 ++- drivers/net/ethernet/smsc/smsc911x.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/smsc/smc911x.c +2 -1
@@ -513,7 +513,8 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)* now, or set the card to generates an interrupt when ready * for the packet. */ -static int smc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +smc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct smc911x_local *lp =netdev_priv (dev);unsigned int free;
drivers/net/ethernet/smsc/smc91x.c +2 -1
@@ -638,7 +638,8 @@ static void smc_hardware_send_pkt(unsigned long data)* now, or set the card to generates an interrupt when ready * for the packet. */ -static int smc_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +smc_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct smc_local *lp =netdev_priv (dev);void __iomem *ioaddr = lp->base;
drivers/net/ethernet/smsc/smsc911x.c +2 -1
@@ -1786,7 +1786,8 @@ static int smsc911x_stop(struct net_device *dev) }/* Entry point for transmitting a packet */ -static int smsc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +smsc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct smsc911x_data *pdata =netdev_priv (dev);unsigned int freespace;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 10/22 net: ti: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/ti/cpmac.c | 2 +- drivers/net/ethernet/ti/davinci_emac.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/ethernet/ti/cpmac.c +1 -1
@@ -544,7 +544,7 @@ static int cpmac_poll(struct napi_struct *napi, int budget) } -static int cpmac_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t cpmac_start_xmit (struct sk_buff *skb,struct net_device *dev) {int queue;unsigned int len;
drivers/net/ethernet/ti/davinci_emac.c +1 -1
@@ -943,7 +943,7 @@ static void emac_tx_handler(void *token, int len, int status)* * Returns success(NETDEV_TX_OK) or error code (typically out of desc's) */ -static int emac_dev_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t emac_dev_xmit (struct sk_buff *skb,struct net_device *ndev) {struct device *emac_dev = &ndev->dev;int ret_code;
drivers/net/ethernet/ti/netcp_core.c +4 -4
@@ -1270,7 +1270,8 @@ static int netcp_tx_submit_skb(struct netcp_intf *netcp, }/* Submit the packet */ -static int netcp_ndo_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t +netcp_ndo_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct netcp_intf *netcp =netdev_priv (ndev);struct netcp_stats *tx_stats = &netcp->stats;
@@ -1290,7 +1291,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev)dev_warn (netcp->ndev_dev,"padding failed (%d), packet dropped\n" , ret); tx_stats->tx_dropped++; -return ret; +return NETDEV_TX_BUSY ; } skb->len =NETCP_MIN_PACKET_SIZE ; }
@@ -1298,7 +1299,6 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) desc =netcp_tx_map_skb (skb, netcp);if (unlikely (!desc)) {netif_stop_subqueue (ndev, subqueue); - ret = -ENOBUFS ; goto drop; }
@@ -1319,7 +1319,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev)if (desc)netcp_free_tx_desc_chain (netcp, desc,sizeof (*desc));dev_kfree_skb (skb); -return ret; +return NETDEV_TX_BUSY ; }int netcp_txpipe_close (struct netcp_tx_pipe *tx_pipe)
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 11/22 net: faraday: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Found by coccinelle.
--- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- drivers/net/ethernet/faraday/ftmac100.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/net/ethernet/faraday/ftgmac100.c +2 -2
@@ -712,8 +712,8 @@ static bool ftgmac100_prep_tx_csum(struct sk_buff *skb, u32 *csum_vlan)return skb_checksum_help (skb) ==0 ; } -static int ftgmac100_hard_start_xmit (struct sk_buff *skb, -struct net_device *netdev) +static netdev_tx_t ftgmac100_hard_start_xmit (struct sk_buff *skb, +struct net_device *netdev) {struct ftgmac100 *priv =netdev_priv (netdev);struct ftgmac100_txdes *txdes, *first;
drivers/net/ethernet/faraday/ftmac100.c +4 -3
@@ -634,8 +634,8 @@ static void ftmac100_tx_complete(struct ftmac100 *priv) ; } -static int ftmac100_xmit (struct ftmac100 *priv,struct sk_buff *skb, -dma_addr_t map) +static netdev_tx_t ftmac100_xmit (struct ftmac100 *priv,struct sk_buff *skb, +dma_addr_t map) {struct net_device *netdev = priv->netdev;struct ftmac100_txdes *txdes;
@@ -1016,7 +1016,8 @@ static int ftmac100_stop(struct net_device *netdev)return 0 ; } -static int ftmac100_hard_start_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t +ftmac100_hard_start_xmit (struct sk_buff *skb,struct net_device *netdev) {struct ftmac100 *priv =netdev_priv (netdev);dma_addr_t map;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 12/22 net: ovs: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- net/openvswitch/vport-internal_dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/openvswitch/vport-internal_dev.c +3 -2
@@ -43,7 +43,8 @@ static struct internal_dev *internal_dev_priv(struct net_device *netdev) }/* Called with rcu_read_lock_bh. */ -static int internal_dev_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t +internal_dev_xmit (struct sk_buff *skb,struct net_device *netdev) {int len, err;
@@ -62,7 +63,7 @@ static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) }else { netdev->stats.tx_errors++; } -return 0 ; +return NETDEV_TX_OK ; }static int internal_dev_open (struct net_device *netdev)
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 13/22 net: xen-netback: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/xen-netback/interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/xen-netback/interface.c +2 -1
@@ -165,7 +165,8 @@ static u16 xenvif_select_queue(struct net_device *dev, struct sk_buff *skb,return vif->hash.mapping[skb_get_hash_raw (skb) % size]; } -static int xenvif_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +xenvif_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct xenvif *vif =netdev_priv (dev);struct xenvif_queue *queue =NULL ;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 14/22 net: caif: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/caif/caif_hsi.c | 10 +++++----- drivers/net/caif/caif_serial.c | 7 +++++-- drivers/net/caif/caif_spi.c | 6 +++--- drivers/net/caif/caif_virtio.c | 2 +- net/caif/chnl_net.c | 3 ++- 5 files changed, 16 insertions(+), 12 deletions(-)
drivers/net/caif/caif_hsi.c +5 -5
@@ -1006,7 +1006,7 @@ static void cfhsi_aggregation_tout(struct timer_list *t)cfhsi_start_tx (cfhsi); } -static int cfhsi_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t cfhsi_xmit (struct sk_buff *skb,struct net_device *dev) {struct cfhsi *cfhsi =NULL ;int start_xfer =0 ;
@@ -1014,7 +1014,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)int prio;if (!dev) -return -EINVAL ; +return NETDEV_TX_BUSY ; cfhsi =netdev_priv (dev);
@@ -1048,7 +1048,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)if (WARN_ON (test_bit (CFHSI_SHUTDOWN , &cfhsi->bits))) {spin_unlock_bh (&cfhsi->lock);cfhsi_abort_tx (cfhsi); -return -EINVAL ; +return NETDEV_TX_BUSY ; }/* Send flow off if number of packets is above high water mark. */
@@ -1072,7 +1072,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)spin_unlock_bh (&cfhsi->lock);if (aggregate_ready)cfhsi_start_tx (cfhsi); -return 0 ; +return NETDEV_TX_OK ; }/* Delete inactivity timer if started. */
@@ -1102,7 +1102,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)queue_work (cfhsi->wq, &cfhsi->wake_up_work); } -return 0 ; +return NETDEV_TX_OK ; }static const struct net_device_ops cfhsi_netdevops;
drivers/net/caif/caif_serial.c +5 -2
@@ -275,7 +275,7 @@ static int handle_tx(struct ser_device *ser)return tty_wr; } -static int caif_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t caif_xmit (struct sk_buff *skb,struct net_device *dev) {struct ser_device *ser;
@@ -290,7 +290,10 @@ static int caif_xmit(struct sk_buff *skb, struct net_device *dev) ser->common.flowctrl (ser->dev,OFF );skb_queue_tail (&ser->head, skb); -return handle_tx (ser); +if (handle_tx (ser)) +return NETDEV_TX_BUSY ; + +return NETDEV_TX_OK ; }
drivers/net/caif/caif_spi.c +3 -3
@@ -486,12 +486,12 @@ static void cfspi_xfer_done_cb(struct cfspi_ifc *ifc)complete (&cfspi->comp); } -static int cfspi_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t cfspi_xmit (struct sk_buff *skb,struct net_device *dev) {struct cfspi *cfspi =NULL ;unsigned long flags;if (!dev) -return -EINVAL ; +return NETDEV_TX_BUSY ; cfspi =netdev_priv (dev);
@@ -512,7 +512,7 @@ static int cfspi_xmit(struct sk_buff *skb, struct net_device *dev) cfspi->cfdev.flowctrl (cfspi->ndev,0 ); } -return 0 ; +return NETDEV_TX_OK ; }int cfspi_rxfrm (struct cfspi *cfspi,u8 *buf,size_t len)
drivers/net/caif/caif_virtio.c +1 -1
@@ -519,7 +519,7 @@ static struct buf_info *cfv_alloc_and_copy_to_shm(struct cfv_info *cfv, }/* Put the CAIF packet on the virtio ring and kick the receiver */ -static int cfv_netdev_tx (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t cfv_netdev_tx (struct sk_buff *skb,struct net_device *netdev) {struct cfv_info *cfv =netdev_priv (netdev);struct buf_info *buf_info;
net/caif/chnl_net.c +2 -1
@@ -211,7 +211,8 @@ static void chnl_flowctrl_cb(struct cflayer *layr, enum caif_ctrlcmd flow, } } -static int chnl_net_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +chnl_net_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct chnl_net *priv;struct cfpkt *pkt =NULL ;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 15/22 net: hamradio: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/hamradio/baycom_epp.c | 3 ++- drivers/net/hamradio/dmascc.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/net/hamradio/baycom_epp.c +2 -1
@@ -772,7 +772,8 @@ static void epp_bh(struct work_struct *work)* ===================== network driver interface ========================= */ -static int baycom_send_packet (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +baycom_send_packet (struct sk_buff *skb,struct net_device *dev) {struct baycom_state *bc =netdev_priv (dev);
drivers/net/hamradio/dmascc.c +2 -2
@@ -239,7 +239,7 @@ struct scc_info {static int scc_open (struct net_device *dev);static int scc_close (struct net_device *dev);static int scc_ioctl (struct net_device *dev,struct ifreq *ifr,int cmd); -static int scc_send_packet (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t scc_send_packet (struct sk_buff *skb,struct net_device *dev);static int scc_set_mac_address (struct net_device *dev,void *sa);static inline void tx_on (struct scc_priv *priv);
@@ -921,7 +921,7 @@ static int scc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) } -static int scc_send_packet (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t scc_send_packet (struct sk_buff *skb,struct net_device *dev) {struct scc_priv *priv = dev->ml_priv;unsigned long flags;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 16/22 usbnet: ipheth: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/usb/ipheth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/ipheth.c +1 -1
@@ -413,7 +413,7 @@ static int ipheth_close(struct net_device *net)return 0 ; } -static int ipheth_tx (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t ipheth_tx (struct sk_buff *skb,struct net_device *net) {struct ipheth_device *dev =netdev_priv (net);struct usb_device *udev = dev->udev;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 17/22 hv_netvsc: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/hyperv/netvsc_drv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/net/hyperv/netvsc_drv.c +7 -3
@@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, struct net_device *vf_netdev,return rc; } -static int netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t +netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) {struct net_device_context *net_device_ctx =netdev_priv (net);struct hv_netvsc_packet *packet =NULL ;
@@ -528,8 +529,11 @@ static 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 ; + }/* We will atmost need two pages to describe the rndis * header. We can only transmit MAX_PAGE_BUFFER_COUNT number
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 18/22 can: xilinx: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/can/xilinx_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/xilinx_can.c +1 -1
@@ -612,7 +612,7 @@ static int xcan_start_xmit_mailbox(struct sk_buff *skb, struct net_device *ndev)* * Return: NETDEV_TX_OK on success and NETDEV_TX_BUSY when the tx queue is full */ -static int xcan_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t xcan_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct xcan_priv *priv =netdev_priv (ndev);int ret;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 19/22 net: plip: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/plip/plip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/plip/plip.c +2 -2
@@ -146,7 +146,7 @@static void plip_interrupt (void *dev_id);/* Functions for DEV methods */ -static int plip_tx_packet (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t plip_tx_packet (struct sk_buff *skb,struct net_device *dev);static int plip_hard_header (struct sk_buff *skb,struct net_device *dev,unsigned short type,const void *daddr,const void *saddr,unsigned len);
@@ -962,7 +962,7 @@ static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev)spin_unlock_irqrestore (&nl->lock, flags); } -static int +static netdev_tx_t plip_tx_packet (struct sk_buff *skb,struct net_device *dev) {struct net_local *nl =netdev_priv (dev);
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 21/22 l2tp: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- net/l2tp/l2tp_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/l2tp/l2tp_eth.c +2 -1
@@ -77,7 +77,8 @@ static void l2tp_eth_dev_uninit(struct net_device *dev)*/ } -static int l2tp_eth_dev_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +l2tp_eth_dev_xmit (struct sk_buff *skb,struct net_device *dev) {struct l2tp_eth *priv =netdev_priv (dev);struct l2tp_session *session = priv->session;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 20/22 rionet: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/rionet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/rionet.c +2 -1
@@ -170,7 +170,8 @@ static int rionet_queue_tx_msg(struct sk_buff *skb, struct net_device *ndev,return 0 ; } -static int rionet_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t +rionet_start_xmit (struct sk_buff *skb,struct net_device *ndev) {int i;struct rionet_private *rnet =netdev_priv (ndev);
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 22/22 net: hsr: fix return type of ndo_start_xmit function
In reply to YueHaibingThe method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- net/hsr/hsr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/hsr/hsr_device.c +1 -1
@@ -233,7 +233,7 @@ static netdev_features_t hsr_fix_features(struct net_device *dev, } -static int hsr_dev_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t hsr_dev_xmit (struct sk_buff *skb,struct net_device *dev) {struct hsr_priv *hsr =netdev_priv (dev);struct hsr_port *master;
Signature · 8 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH net-next 13/22] net: xen-netback: fix return type of ndo_start_xmit function
In reply to YueHaibingQuoted 8 lines · YueHaibing
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.Found by coccinelle.
Signed-off-by YueHaibing <[email protected]>
Re: [PATCH net-next 13/22] net: xen-netback: fix return type of ndo_start_xmit function
In reply to YueHaibingQuoted 8 lines · YueHaibing
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.Found by coccinelle.
Signed-off-by YueHaibing <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Haiyang Zhang
maintainerRE: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to YueHaibingQuoted 51 lines
-----Original Message-----
From: YueHaibing <[email protected]>
Sent: Thursday, September 20, 2018 8:33 AM
To: davem at davemloft.net; dmitry.tarnyagin at lockless.no;
wg at grandegger.com; mkl at pengutronix.de; michal.simek at xilinx.com; hsweeten at visionengravers.com; madalin.bucur at nxp.com; pantelis.antoniou at gmail.com; claudiu.manoil at nxp.com; leoyang.li at nxp.com; linux at armlinux.org.uk; sammy at sammy.net; ralf at linux-mips.org; nico at fluxnic.net; steve.glendinning at shawell.net; f.fainelli at gmail.com; grygorii.strashko at ti.com; w-kwok2 at ti.com; m-karicheri2 at ti.com; t.sailer at alumni.ethz.ch; jreuter at yaina.de; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; wei.liu2 at citrix.com; paul.durrant at citrix.com; arvid.brodin at alten.se; pshelar at ovn.org
Cc: linux-kernel at vger.kernel.org; netdev at vger.kernel.org; linux- can at vger.kernel.org; linux-arm-kernel at lists.infradead.org; linuxppc- dev at lists.ozlabs.org; linux-mips at linux-mips.org; linux-omap at vger.kernel.org; linux-hams at vger.kernel.org; devel at linuxdriverproject.org; linux- usb at vger.kernel.org; xen-devel at lists.xenproject.org; dev at openvswitch.org; YueHaibing <[email protected]>
Subject: [PATCH net-next 17/22]hv_netvsc: fix return type ofndo_start_xmitfunctionThe method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.Found by coccinelle.
Signed-off-by YueHaibing <[email protected]>--- drivers/net/hyperv/netvsc_drv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/hyperv/netvsc_drv.c +2
-1@@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, structnet_device *vf_netdev, return rc; } -static int netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t +netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) {struct net_device_context *net_device_ctx =netdev_priv (net);struct
hv_netvsc_packet*packet = NULL; @@ -528,8 +529,11 @@
static intnetvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 535
Quoted 9 lines
drivers/net/hyperv/netvsc_drv.c +4
-2*/ 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 ;
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.
Thanks,
- Haiyang
Haiyang Zhang
maintainerRe: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to YueHaibingQuoted 51 lines
-----Original Message-----
From: YueHaibing <[email protected]>
Sent: Thursday, September 20, 2018 8:33 AM
To: [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]
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; linuxppc- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; YueHaibing <[email protected]>
Subject: [PATCH net-next 17/22]hv_netvsc: fix return type ofndo_start_xmitfunctionThe method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.Found by coccinelle.
Signed-off-by YueHaibing <[email protected]>--- drivers/net/hyperv/netvsc_drv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/hyperv/netvsc_drv.c +2
-1@@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, structnet_device *vf_netdev, return rc; } -static int netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t +netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) {struct net_device_context *net_device_ctx =netdev_priv (net);struct
hv_netvsc_packet*packet = NULL; @@ -528,8 +529,11 @@
static intnetvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 535
Quoted 9 lines
drivers/net/hyperv/netvsc_drv.c +4
-2*/ 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 ;
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.
Thanks,
- Haiyang
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to YueHaibingQuoted 27 lines · On Thu, 20 Sep 2018 20:33:01 +0800 YueHaibing <[email protected]> wrote:
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.Found by coccinelle.
Signed-off-by YueHaibing <[email protected]>--- drivers/net/hyperv/netvsc_drv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/hyperv/netvsc_drv.c +2
-1@@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, struct net_device *vf_netdev,return rc; } -static int netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t +netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) {struct net_device_context *net_device_ctx =netdev_priv (net);struct hv_netvsc_packet *packet =NULL ;
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 536
Quoted 10 lines
drivers/net/hyperv/netvsc_drv.c +5
-2@@ -528,8 +529,11 @@ static 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.
Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to YueHaibingQuoted 27 lines · On Thu, 20 Sep 2018 20:33:01 +0800 YueHaibing <[email protected]> wrote:
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.Found by coccinelle.
Signed-off-by YueHaibing <[email protected]>--- drivers/net/hyperv/netvsc_drv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/hyperv/netvsc_drv.c +2
-1@@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, struct net_device *vf_netdev,return rc; } -static int netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t +netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) {struct net_device_context *net_device_ctx =netdev_priv (net);struct hv_netvsc_packet *packet =NULL ;
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 536
Quoted 10 lines
drivers/net/hyperv/netvsc_drv.c +5
-2@@ -528,8 +529,11 @@ static 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.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to Stephen HemmingerQuoted 27 lines
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Thursday, September 20, 2018 10:44 AM
To: YueHaibing <[email protected]>
Cc: davem at davemloft.net; dmitry.tarnyagin at lockless.no;
wg at grandegger.com; mkl at pengutronix.de; michal.simek at xilinx.com; hsweeten at visionengravers.com; madalin.bucur at nxp.com; pantelis.antoniou at gmail.com; claudiu.manoil at nxp.com; leoyang.li at nxp.com; linux at armlinux.org.uk; sammy at sammy.net; ralf at linux-mips.org; nico at fluxnic.net; steve.glendinning at shawell.net; f.fainelli at gmail.com; grygorii.strashko at ti.com; w-kwok2 at ti.com; m-karicheri2 at ti.com; t.sailer at alumni.ethz.ch; jreuter at yaina.de; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; wei.liu2 at citrix.com; paul.durrant at citrix.com; arvid.brodin at alten.se; pshelar at ovn.org; dev at openvswitch.org; linux-mips at linux-mips.org; xen-
devel at lists.xenproject.org; netdev at vger.kernel.org; linux-usb at vger.kernel.org; linux-kernel at vger.kernel.org; linux-can at vger.kernel.org;
devel at linuxdriverproject.org; linux-hams at vger.kernel.org; linux- omap at vger.kernel.org; linuxppc-dev at lists.ozlabs.org; linux-arm- kernel at lists.infradead.org
Subject: Re: [PATCH net-next 17/22]hv_netvsc: fix return type ofndo_start_xmitfunctionOn Thu, 20 Sep 2018 20:33:01 +0800
YueHaibing <[email protected]> wrote:
Quoted 14 lines
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 536
Quoted 11 lines
int
netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)drivers/net/hyperv/netvsc_drv.c +5
-2*/ 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
Haiyang Zhang
maintainerRe: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to Stephen HemmingerQuoted 27 lines
-----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 ofndo_start_xmitfunctionOn Thu, 20 Sep 2018 20:33:01 +0800
YueHaibing <[email protected]> wrote:
Quoted 14 lines
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 536
Quoted 11 lines
int
netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)drivers/net/hyperv/netvsc_drv.c +5
-2*/ 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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
David Miller
maintainerFrom: YueHaibing <[email protected]>
Date: Thu, 20 Sep 2018 20:32:44 +0800
Quoted 4 lines
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.
I would advise you not to send so many of these changes as a group.
If one of the patches needs feedback addressed, which is already the case, you will have to resubmit the entire series all over again with the fixes.
David Miller
maintainerFrom: YueHaibing <[email protected]>
Date: Thu, 20 Sep 2018 20:32:44 +0800
Quoted 4 lines
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.
I would advise you not to send so many of these changes as a group.
If one of the patches needs feedback addressed, which is already the case, you will have to resubmit the entire series all over again with the fixes.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines · YueHaibing
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.
May be I missed smth, but it's acceptable to report standard error codes from .xmit() callback as per dev_xmit_complete().
Signature · 2 lines
regards, -grygorii
Quoted 5 lines · YueHaibing
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.
May be I missed smth, but it's acceptable to report standard error codes from .xmit() callback as per dev_xmit_complete().
Signature · 7 lines
regards, -grygorii _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 8 lines · David Miller
From: YueHaibing <[email protected]>
Date: Thu, 20 Sep 2018 20:32:44 +0800Quoted 4 lines
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.
Quoted 6 lines
I would advise you not to send so many of these changes as a group.
If one of the patches needs feedback addressed, which is already the case, you will have to resubmit the entire series all over again with the fixes.
Yes, I will send it separately after test and review again.
Thank you for your advice.
Quoted 2 lines
.
Quoted 8 lines · David Miller
From: YueHaibing <[email protected]>
Date: Thu, 20 Sep 2018 20:32:44 +0800Quoted 4 lines
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.
Quoted 6 lines
I would advise you not to send so many of these changes as a group.
If one of the patches needs feedback addressed, which is already the case, you will have to resubmit the entire series all over again with the fixes.
Yes, I will send it separately after test and review again.
Thank you for your advice.
Quoted 2 lines
.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to Haiyang Zhang via devQuoted 42 lines · Haiyang Zhang
Quoted 27 lines
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Thursday, September 20, 2018 10:44 AM
To: YueHaibing <[email protected]>
Cc: davem at davemloft.net; dmitry.tarnyagin at lockless.no;
wg at grandegger.com; mkl at pengutronix.de; michal.simek at xilinx.com; hsweeten at visionengravers.com; madalin.bucur at nxp.com; pantelis.antoniou at gmail.com; claudiu.manoil at nxp.com; leoyang.li at nxp.com; linux at armlinux.org.uk; sammy at sammy.net; ralf at linux-mips.org; nico at fluxnic.net; steve.glendinning at shawell.net; f.fainelli at gmail.com; grygorii.strashko at ti.com; w-kwok2 at ti.com; m-karicheri2 at ti.com; t.sailer at alumni.ethz.ch; jreuter at yaina.de; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; wei.liu2 at citrix.com; paul.durrant at citrix.com; arvid.brodin at alten.se; pshelar at ovn.org; dev at openvswitch.org; linux-mips at linux-mips.org; xen-
devel at lists.xenproject.org; netdev at vger.kernel.org; linux-usb at vger.kernel.org; linux-kernel at vger.kernel.org; linux-can at vger.kernel.org;
devel at linuxdriverproject.org; linux-hams at vger.kernel.org; linux- omap at vger.kernel.org; linuxppc-dev at lists.ozlabs.org; linux-arm- kernel at lists.infradead.org
Subject: Re: [PATCH net-next 17/22]hv_netvsc: fix return type ofndo_start_xmitfunctionOn Thu, 20 Sep 2018 20:33:01 +0800
YueHaibing <[email protected]> wrote:Quoted 14 lines
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 536
Quoted 11 lines
int
netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)drivers/net/hyperv/netvsc_drv.c +5
-2*/ 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.
Quoted 7 lines
Plus consideration of -- For error case, please just return
NETDEV_TX_OK. We are not sure if the error can go away after retrying, returningNETDEV_TX_BUSYmay cause infinite retry from the upper layer.So, let's just always return
NETDEV_TX_OKlike this:netvsc_vf_xmit(net, vf_netdev, skb); return NETDEV_TX_OK;
Thank you for review.
Will do that in v2.
Quoted 6 lines
Thanks,
- Haiyang.
Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to Haiyang Zhang via devQuoted 42 lines · Haiyang Zhang
Quoted 27 lines
-----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 ofndo_start_xmitfunctionOn Thu, 20 Sep 2018 20:33:01 +0800
YueHaibing <[email protected]> wrote:Quoted 14 lines
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 536
Quoted 11 lines
int
netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)drivers/net/hyperv/netvsc_drv.c +5
-2*/ 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.
Quoted 7 lines
Plus consideration of -- For error case, please just return
NETDEV_TX_OK. We are not sure if the error can go away after retrying, returningNETDEV_TX_BUSYmay cause infinite retry from the upper layer.So, let's just always return
NETDEV_TX_OKlike this:netvsc_vf_xmit(net, vf_netdev, skb); return NETDEV_TX_OK;
Thank you for review.
Will do that in v2.
Quoted 6 lines
Thanks,
- Haiyang.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to Stephen HemmingerQuoted 35 lines · Stephen Hemminger
Quoted 32 lines · On Thu, 20 Sep 2018 20:33:01 +0800 YueHaibing <[email protected]> wrote:
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.Found by coccinelle.
Signed-off-by YueHaibing <[email protected]>--- drivers/net/hyperv/netvsc_drv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/hyperv/netvsc_drv.c +2
-3@@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, struct net_device *vf_netdev,return rc; } -static int netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t +netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) {struct net_device_context *net_device_ctx =netdev_priv (net);struct hv_netvsc_packet *packet =NULL ;@@ -528,8 +529,11 @@ static 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);
Quoted 8 lines
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 536
Quoted 5 lines
drivers/net/hyperv/netvsc_drv.c +5
-0+ !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.
I'm sorry for this, will correct it as Haiyang's suggestion.
Quoted 3 lines
.
Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
In reply to Stephen HemmingerQuoted 35 lines · Stephen Hemminger
Quoted 32 lines · On Thu, 20 Sep 2018 20:33:01 +0800 YueHaibing <[email protected]> wrote:
The method
ndo_start_xmit()is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type tonetdev_tx_t.Found by coccinelle.
Signed-off-by YueHaibing <[email protected]>--- drivers/net/hyperv/netvsc_drv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/hyperv/netvsc_drv.c +2
-3@@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, struct net_device *vf_netdev,return rc; } -static int netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) +static netdev_tx_t +netvsc_start_xmit (struct sk_buff *skb,struct net_device *net) {struct net_device_context *net_device_ctx =netdev_priv (net);struct hv_netvsc_packet *packet =NULL ;@@ -528,8 +529,11 @@ static 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);
Quoted 8 lines
drivers/net/hyperv/netvsc_drv.c static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) · line 536
Quoted 5 lines
drivers/net/hyperv/netvsc_drv.c +5
-0+ !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.
I'm sorry for this, will correct it as Haiyang's suggestion.
Quoted 3 lines
.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel