* [PATCH] rapidio/rionet: fix rionet_start_xmit()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:17 UTC (permalink / raw)
To: linux-kernel
Cc: Luc Van Oostenryck, Reshetova, Elena, David S. Miller,
Hans Liljestrand, David Windsor, Kees Cook, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/net/rionet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c
index e9f101c9b..8696f9376 100644
--- a/drivers/net/rionet.c
+++ b/drivers/net/rionet.c
@@ -170,7 +170,7 @@ 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);
--
2.17.0
^ permalink raw reply related
* [PATCH] net: plip: fix plip_tx_packet()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:17 UTC (permalink / raw)
To: linux-kernel
Cc: Luc Van Oostenryck, David S. Miller, Gustavo A. R. Silva, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/net/plip/plip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c
index feb92ecd1..0b354e65f 100644
--- a/drivers/net/plip/plip.c
+++ b/drivers/net/plip/plip.c
@@ -146,7 +146,7 @@ static void plip_timer_bh(struct work_struct *work);
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 @@ plip_interrupt(void *dev_id)
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);
--
2.17.0
^ permalink raw reply related
* [PATCH] usbnet: ipheth: fix ipheth_tx()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:17 UTC (permalink / raw)
To: linux-kernel
Cc: Luc Van Oostenryck, David S. Miller, Gustavo A. R. Silva,
Arvind Yadav, Johannes Berg, Alexander Kappner, linux-usb, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/net/usb/ipheth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
index 7275761a1..53eab6fb9 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -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;
--
2.17.0
^ permalink raw reply related
* [PATCH] mwifiex: fix mwifiex_hard_start_xmit()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel
Cc: Luc Van Oostenryck, Amitkumar Karwar, Nishant Sarmukadam,
Ganapathi Bhat, Xinming Hu, Kalle Valo, linux-wireless, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/net/wireless/marvell/mwifiex/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index b64845828..802fb3ecc 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -858,7 +858,7 @@ mwifiex_clone_skb_for_tx_status(struct mwifiex_private *priv,
/*
* CFG802.11 network device handler for data transmission.
*/
-static int
+static netdev_tx_t
mwifiex_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
--
2.17.0
^ permalink raw reply related
* [PATCH] qtnfmac: fix qtnf_netdev_hard_start_xmit()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel
Cc: Luc Van Oostenryck, Igor Mitsyanko, Avinash Patil,
Sergey Matyukevich, Kalle Valo, Vasily Ulyanov, Kees Cook,
linux-wireless, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/net/wireless/quantenna/qtnfmac/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c
index cf26c15a8..b3bfb4faa 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/core.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/core.c
@@ -76,7 +76,7 @@ static int qtnf_netdev_close(struct net_device *ndev)
/* Netdev handler for data transmission.
*/
-static int
+static netdev_tx_t
qtnf_netdev_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{
struct qtnf_vif *vif;
--
2.17.0
^ permalink raw reply related
* [PATCH] xen-netfront: fix xennet_start_xmit()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel
Cc: Juergen Gross, xen-devel, Boris Ostrovsky, Luc Van Oostenryck,
netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/net/xen-netfront.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 4dd066800..679da1abd 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -564,7 +564,7 @@ static u16 xennet_select_queue(struct net_device *dev, struct sk_buff *skb,
#define MAX_XEN_SKB_FRAGS (65536 / XEN_PAGE_SIZE + 1)
-static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct netfront_info *np = netdev_priv(dev);
struct netfront_stats *tx_stats = this_cpu_ptr(np->tx_stats);
--
2.17.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related
* [PATCH] xen-netback: fix xenvif_start_xmit()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel; +Cc: Luc Van Oostenryck, Wei Liu, Paul Durrant, xen-devel, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/net/xen-netback/interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 78ebe494f..bb944aa09 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -165,7 +165,7 @@ 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;
--
2.17.0
^ permalink raw reply related
* [PATCH] batman-adv: fix batadv_interface_tx()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel
Cc: Luc Van Oostenryck, Marek Lindner, Simon Wunderlich,
Antonio Quartulli, David S. Miller, b.a.t.m.a.n, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
net/batman-adv/soft-interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index edeffcb9f..e6c800b06 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -188,7 +188,7 @@ static void batadv_interface_set_rx_mode(struct net_device *dev)
{
}
-static int batadv_interface_tx(struct sk_buff *skb,
+static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,
struct net_device *soft_iface)
{
struct ethhdr *ethhdr;
--
2.17.0
^ permalink raw reply related
* [PATCH] net: caif: fix chnl_net_start_xmit()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel
Cc: Luc Van Oostenryck, Dmitry Tarnyagin, David S. Miller, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
net/caif/chnl_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
index 53ecda10b..d9712247f 100644
--- a/net/caif/chnl_net.c
+++ b/net/caif/chnl_net.c
@@ -211,7 +211,7 @@ 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;
--
2.17.0
^ permalink raw reply related
* [PATCH] net/hsr: fix hsr_dev_xmit()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel; +Cc: Luc Van Oostenryck, Arvid Brodin, David S. Miller, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
net/hsr/hsr_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index b8cd43c9e..a067150f0 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -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;
--
2.17.0
^ permalink raw reply related
* [PATCH] l2tp: fix l2tp_eth_dev_xmit()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel
Cc: Luc Van Oostenryck, David S. Miller, Guillaume Nault,
James Chapman, Dominik Heidler, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
net/l2tp/l2tp_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
index 5c366ecfa..e027f8b54 100644
--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -77,7 +77,7 @@ 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;
--
2.17.0
^ permalink raw reply related
* [PATCH] cxgb4vf: fix t4vf_eth_xmit()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:19 UTC (permalink / raw)
To: linux-kernel; +Cc: Luc Van Oostenryck, Casey Leedom, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/net/ethernet/chelsio/cxgb4vf/adapter.h | 2 +-
drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
index 5883f09e3..e29fc4699 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
@@ -560,7 +560,7 @@ int t4vf_sge_alloc_eth_txq(struct adapter *, struct sge_eth_txq *,
unsigned int);
void t4vf_free_sge_resources(struct adapter *);
-int t4vf_eth_xmit(struct sk_buff *, struct net_device *);
+netdev_tx_t t4vf_eth_xmit(struct sk_buff *, struct net_device *);
int t4vf_ethrx_handler(struct sge_rspq *, const __be64 *,
const struct pkt_gl *);
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index dfce5df75..9ce901f49 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -1159,7 +1159,7 @@ static inline void txq_advance(struct sge_txq *tq, unsigned int n)
*
* Add a packet to an SGE Ethernet TX queue. Runs with softirqs disabled.
*/
-int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
{
u32 wr_mid;
u64 cntrl, *end;
--
2.17.0
^ permalink raw reply related
* [PATCH] ath6kl: fix ath6kl_data_tx()'s return type
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel; +Cc: Luc Van Oostenryck, Kalle Valo, linux-wireless, netdev
The 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'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/net/wireless/ath/ath6kl/core.h | 2 +-
drivers/net/wireless/ath/ath6kl/txrx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index e23d450ba..0d30e762c 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -914,7 +914,7 @@ void ath6kl_tx_data_cleanup(struct ath6kl *ar);
struct ath6kl_cookie *ath6kl_alloc_cookie(struct ath6kl *ar);
void ath6kl_free_cookie(struct ath6kl *ar, struct ath6kl_cookie *cookie);
-int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev);
struct aggr_info *aggr_init(struct ath6kl_vif *vif);
void aggr_conn_init(struct ath6kl_vif *vif, struct aggr_info *aggr_info,
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 8da9506f8..618d12ed4 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -353,7 +353,7 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb,
return status;
}
-int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
{
struct ath6kl *ar = ath6kl_priv(dev);
struct ath6kl_cookie *cookie = NULL;
--
2.17.0
^ permalink raw reply related
* [PATCH] openvswitch: make vport_ops:send()'s return type consistent
From: Luc Van Oostenryck @ 2018-04-24 13:19 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
David S. Miller, Luc Van Oostenryck
The method struct vport_ops:send() is defined as returning an
'netdev_tx_t', which is defined as a typedef for a bitwise type
and otherwise used for the start_xmit() methods.
However, most openvswitch drivers use for this method dev_queue_xmit()
which returns an 'int' and the return value of vport_ops:send() is
in fact never used.
Make things typewise consistent and use 'int' for vport_ops:send()
as well for internal_dev_recv() (which is the only proper send method)
as using 'netdev_tx_t' doesn't offer any advantages and in fact seems,
if not wrong at least, inadequate.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
net/openvswitch/vport-internal_dev.c | 6 +++---
net/openvswitch/vport.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
index 3ea55618e..2fd68c2fb 100644
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
@@ -231,7 +231,7 @@ static void internal_dev_destroy(struct vport *vport)
rtnl_unlock();
}
-static netdev_tx_t internal_dev_recv(struct sk_buff *skb)
+static int internal_dev_recv(struct sk_buff *skb)
{
struct net_device *netdev = skb->dev;
struct pcpu_sw_netstats *stats;
@@ -239,7 +239,7 @@ static netdev_tx_t internal_dev_recv(struct sk_buff *skb)
if (unlikely(!(netdev->flags & IFF_UP))) {
kfree_skb(skb);
netdev->stats.rx_dropped++;
- return NETDEV_TX_OK;
+ return 0;
}
skb_dst_drop(skb);
@@ -257,7 +257,7 @@ static netdev_tx_t internal_dev_recv(struct sk_buff *skb)
u64_stats_update_end(&stats->syncp);
netif_rx(skb);
- return NETDEV_TX_OK;
+ return 0;
}
static struct vport_ops ovs_internal_vport_ops = {
diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
index cda66c26a..8dcb48fe8 100644
--- a/net/openvswitch/vport.h
+++ b/net/openvswitch/vport.h
@@ -141,7 +141,7 @@ struct vport_ops {
int (*set_options)(struct vport *, struct nlattr *);
int (*get_options)(const struct vport *, struct sk_buff *);
- netdev_tx_t (*send) (struct sk_buff *skb);
+ int (*send) (struct sk_buff *skb);
struct module *owner;
struct list_head list;
};
--
2.17.0
^ permalink raw reply related
* Re: [PATCH] xen-netback: fix xenvif_start_xmit()'s return type
From: Wei Liu @ 2018-04-24 13:20 UTC (permalink / raw)
To: Luc Van Oostenryck; +Cc: linux-kernel, Wei Liu, Paul Durrant, xen-devel, netdev
In-Reply-To: <20180424131812.5014-1-luc.vanoostenryck@gmail.com>
On Tue, Apr 24, 2018 at 03:18:12PM +0200, Luc Van Oostenryck wrote:
> The 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'.
>
> Fix this by returning 'netdev_tx_t' in this driver too.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
^ permalink raw reply
* Re: [Xen-devel] [PATCH] xen-netfront: fix xennet_start_xmit()'s return type
From: Wei Liu @ 2018-04-24 13:31 UTC (permalink / raw)
To: Luc Van Oostenryck
Cc: linux-kernel, Juergen Gross, xen-devel, Boris Ostrovsky, netdev,
Wei Liu
In-Reply-To: <20180424131815.5064-1-luc.vanoostenryck@gmail.com>
On Tue, Apr 24, 2018 at 03:18:14PM +0200, Luc Van Oostenryck wrote:
> The 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'.
>
> Fix this by returning 'netdev_tx_t' in this driver too.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
^ permalink raw reply
* Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM
From: Michal Hocko @ 2018-04-24 13:31 UTC (permalink / raw)
To: Mikulas Patocka
Cc: Matthew Wilcox, David Miller, Andrew Morton, linux-mm,
eric.dumazet, edumazet, netdev, linux-kernel, mst, jasowang,
virtualization, dm-devel, Vlastimil Babka
In-Reply-To: <alpine.LRH.2.02.1804232006540.2299@file01.intranet.prod.int.rdu2.redhat.com>
On Mon 23-04-18 20:25:15, Mikulas Patocka wrote:
>
>
> On Mon, 23 Apr 2018, Michal Hocko wrote:
>
> > On Mon 23-04-18 10:06:08, Mikulas Patocka wrote:
> >
> > > > > He didn't want to fix vmalloc(GFP_NOIO)
> > > >
> > > > I don't remember that conversation, so I don't know whether I agree with
> > > > his reasoning or not. But we are supposed to be moving away from GFP_NOIO
> > > > towards marking regions with memalloc_noio_save() / restore. If you do
> > > > that, you won't need vmalloc(GFP_NOIO).
> > >
> > > He said the same thing a year ago. And there was small progress. 6 out of
> > > 27 __vmalloc calls were converted to memalloc_noio_save in a year - 5 in
> > > infiniband and 1 in btrfs. (the whole discussion is here
> > > http://lkml.iu.edu/hypermail/linux/kernel/1706.3/04681.html )
> >
> > Well this is not that easy. It requires a cooperation from maintainers.
> > I can only do as much. I've posted patches in the past and actively
> > bringing up this topic at LSFMM last two years...
>
> You're right - but you have chosen the uneasy path.
Yes.
> Fixing __vmalloc code
> is easy and it doesn't require cooperation with maintainers.
But it is a hack against the intention of the scope api. It also alows
maintainers to not care about their broken code.
> > > He refuses 15-line patch to fix GFP_NOIO bug because he believes that in 4
> > > years, the kernel will be refactored and GFP_NOIO will be eliminated. Why
> > > does he have veto over this part of the code? I'd much rather argue with
> > > people who have constructive comments about fixing bugs than with him.
> >
> > I didn't NACK the patch AFAIR. I've said it is not a good idea longterm.
> > I would be much more willing to change my mind if you would back your
> > patch by a real bug report. Hacks are acceptable when we have a real
> > issue in hands. But if we want to fix potential issue then better make
> > it properly.
>
> Developers should fix bugs in advance, not to wait until a crash hapens,
> is analyzed and reported.
I agree. But are those existing users broken in the first place? I have
seen so many GFP_NOFS abuses that I would dare to guess that most of
those vmalloc NOFS abusers can be simply turned into GFP_KERNEL. Maybe
that is the reason we haven't heard any complains in years.
--
Michal Hocko
SUSE Labs
^ permalink raw reply
* Re: [PATCH] net: ks8851: fix ks_start_xmit()'s return type
From: Yuval Shaia @ 2018-04-24 13:36 UTC (permalink / raw)
To: Luc Van Oostenryck; +Cc: linux-kernel, David S. Miller, netdev
In-Reply-To: <20180424131705.4155-1-luc.vanoostenryck@gmail.com>
On Tue, Apr 24, 2018 at 03:17:02PM +0200, Luc Van Oostenryck wrote:
> The 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'.
>
> Fix this by returning 'netdev_tx_t' in this driver too.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
> drivers/net/ethernet/micrel/ks8851_mll.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
> index f3e9dd47b..a732fdeb5 100644
> --- a/drivers/net/ethernet/micrel/ks8851_mll.c
> +++ b/drivers/net/ethernet/micrel/ks8851_mll.c
> @@ -1020,7 +1020,7 @@ 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;
> struct ks_net *ks = netdev_priv(netdev);
> --
> 2.17.0
>
^ permalink raw reply
* Re: [PATCH] batman-adv: fix batadv_interface_tx()'s return type
From: Sven Eckelmann @ 2018-04-24 13:45 UTC (permalink / raw)
To: Luc Van Oostenryck
Cc: Marek Lindner, netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r, Antonio Quartulli,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, David S. Miller
In-Reply-To: <20180424131847.5469-1-luc.vanoostenryck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
On Dienstag, 24. April 2018 15:18:46 CEST Luc Van Oostenryck wrote:
[...]
> -static int batadv_interface_tx(struct sk_buff *skb,
> +static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,
> struct net_device *soft_iface)
> {
> struct ethhdr *ethhdr;
>
CHECK: Alignment should match open parenthesis
#76: FILE: net/batman-adv/soft-interface.c:192:
+static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,
struct net_device *soft_iface)
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCHv2 net] team: fix netconsole setup over team
From: David Miller @ 2018-04-24 13:48 UTC (permalink / raw)
To: lucien.xin; +Cc: netdev, jiri, stephen, xiyou.wangcong
In-Reply-To: <9c47c72ba2e0a16d61a6d150b5f85adce88de439.1524551617.git.lucien.xin@gmail.com>
From: Xin Long <lucien.xin@gmail.com>
Date: Tue, 24 Apr 2018 14:33:37 +0800
> The same fix in Commit dbe173079ab5 ("bridge: fix netconsole
> setup over bridge") is also needed for team driver.
>
> While at it, remove the unnecessary parameter *team from
> team_port_enable_netpoll().
>
> v1->v2:
> - fix it in a better way, as does bridge.
>
> Fixes: 0fb52a27a04a ("team: cleanup netpoll clode")
> Reported-by: João Avelino Bellomo Filho <jbellomo@redhat.com>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
Applied and queued up for -stable, thanks Xin.
^ permalink raw reply
* Re: [PATCH bpf-next v4 1/2] bpf: allow map helpers access to map values directly
From: Paul Chaignon via iovisor-dev @ 2018-04-24 13:50 UTC (permalink / raw)
To: Daniel Borkmann, Alexei Starovoitov,
netdev-u79uwXL29TY76Z2rM5mHXA
Cc: iovisor-dev-9jONkmmOlFHEE9lA1F8Ukti2O/JbrIOy
In-Reply-To: <a71a2e2d-ca39-b351-a62d-315c034f1ea1-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
On 04/23/2018 11:18 PM +0200, Daniel Borkmann wrote:
> On 04/22/2018 11:52 PM, Paul Chaignon wrote:
> > Helpers that expect ARG_PTR_TO_MAP_KEY and ARG_PTR_TO_MAP_VALUE can only
> > access stack and packet memory. Allow these helpers to directly access
> > map values by passing registers of type PTR_TO_MAP_VALUE.
> >
> > This change removes the need for an extra copy to the stack when using a
> > map value to perform a second map lookup, as in the following:
> >
> > struct bpf_map_def SEC("maps") infobyreq = {
> > .type = BPF_MAP_TYPE_HASHMAP,
> > .key_size = sizeof(struct request *),
> > .value_size = sizeof(struct info_t),
> > .max_entries = 1024,
> > };
> > struct bpf_map_def SEC("maps") counts = {
> > .type = BPF_MAP_TYPE_HASHMAP,
> > .key_size = sizeof(struct info_t),
> > .value_size = sizeof(u64),
> > .max_entries = 1024,
> > };
> > SEC("kprobe/blk_account_io_start")
> > int bpf_blk_account_io_start(struct pt_regs *ctx)
> > {
> > struct info_t *info = bpf_map_lookup_elem(&infobyreq, &ctx->di);
> > u64 *count = bpf_map_lookup_elem(&counts, info);
> > (*count)++;
> > }
> >
> > Signed-off-by: Paul Chaignon <paul.chaignon-C0LM0jrOve7QT0dZR+AlfA@public.gmane.org>
> > ---
> > kernel/bpf/verifier.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> > index 5dd1dcb902bf..70e00beade03 100644
> > --- a/kernel/bpf/verifier.c
> > +++ b/kernel/bpf/verifier.c
> > @@ -1914,7 +1914,7 @@ static int check_func_arg(struct bpf_verifier_env *env, u32 regno,
> > if (arg_type == ARG_PTR_TO_MAP_KEY ||
> > arg_type == ARG_PTR_TO_MAP_VALUE) {
> > expected_type = PTR_TO_STACK;
> > - if (!type_is_pkt_pointer(type) &&
> > + if (!type_is_pkt_pointer(type) && type != PTR_TO_MAP_VALUE &&
> > type != expected_type)
> > goto err_type;
> > } else if (arg_type == ARG_CONST_SIZE ||
> > @@ -1970,6 +1970,9 @@ static int check_func_arg(struct bpf_verifier_env *env, u32 regno,
> > err = check_packet_access(env, regno, reg->off,
> > meta->map_ptr->key_size,
> > false);
> > + else if (type == PTR_TO_MAP_VALUE)
> > + err = check_map_access(env, regno, reg->off,
> > + meta->map_ptr->key_size, false);
> > else
> > err = check_stack_boundary(env, regno,
> > meta->map_ptr->key_size,
>
> We should reuse check_helper_mem_access() here which covers all three cases
> from above already and simplifies the code a bit.
Thanks for the review.
I've sent a refactored patchset that uses check_helper_mem_access().
>
> > @@ -1987,6 +1990,10 @@ static int check_func_arg(struct bpf_verifier_env *env, u32 regno,
> > err = check_packet_access(env, regno, reg->off,
> > meta->map_ptr->value_size,
> > false);
> > + else if (type == PTR_TO_MAP_VALUE)
> > + err = check_map_access(env, regno, reg->off,
> > + meta->map_ptr->value_size,
> > + false);
> > else
> > err = check_stack_boundary(env, regno,
> > meta->map_ptr->value_size,
> >
>
> Ditto.
>
> Thanks,
> Daniel
^ permalink raw reply
* Re: [RFC v3 net-next 13/18] net/sched: Introduce the TBS Qdisc
From: David Miller @ 2018-04-24 13:50 UTC (permalink / raw)
To: tglx
Cc: jesus.sanchez-palencia, netdev, jhs, xiyou.wangcong, jiri,
vinicius.gomes, richardcochran, intel-wired-lan, anna-maria,
henrik, john.stultz, levi.pearson, edumazet, willemb, mlichvar
In-Reply-To: <alpine.DEB.2.21.1804241012020.5261@nanos.tec.linutronix.de>
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 24 Apr 2018 10:50:04 +0200 (CEST)
> So adding 8 bytes to spare duplicated code will not change the kmem_cache
> object size and I really doubt that anyone will notice.
It's about where the cache lines end up when each and every byte is added
to the structure, not just the slab object size.
^ permalink raw reply
* Re: [PATCH] vhost_net: use packet weight for rx handler, too
From: David Miller @ 2018-04-24 14:02 UTC (permalink / raw)
To: pabeni; +Cc: kvm, haibinzhang, mst, jasowang, virtualization, netdev
In-Reply-To: <11f2a27cee0c660a611af381ac1b68d9526095e3.1524556673.git.pabeni@redhat.com>
From: Paolo Abeni <pabeni@redhat.com>
Date: Tue, 24 Apr 2018 10:34:36 +0200
> Similar to commit a2ac99905f1e ("vhost-net: set packet weight of
> tx polling to 2 * vq size"), we need a packet-based limit for
> handler_rx, too - elsewhere, under rx flood with small packets,
> tx can be delayed for a very long time, even without busypolling.
>
> The pkt limit applied to handle_rx must be the same applied by
> handle_tx, or we will get unfair scheduling between rx and tx.
> Tying such limit to the queue length makes it less effective for
> large queue length values and can introduce large process
> scheduler latencies, so a constant valued is used - likewise
> the existing bytes limit.
>
> The selected limit has been validated with PVP[1] performance
> test with different queue sizes:
>
> queue size 256 512 1024
>
> baseline 366 354 362
> weight 128 715 723 670
> weight 256 740 745 733
> weight 512 600 460 583
> weight 1024 423 427 418
>
> A packet weight of 256 gives peek performances in under all the
> tested scenarios.
>
> No measurable regression in unidirectional performance tests has
> been detected.
>
> [1] https://developers.redhat.com/blog/2017/06/05/measuring-and-comparing-open-vswitch-performance/
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Applied to net-next, thanks.
^ permalink raw reply
* [PATCH iproute2] ipaddress: strengthen check on 'label' input
From: Patrick Talbert @ 2018-04-24 14:08 UTC (permalink / raw)
To: netdev; +Cc: stephen
As mentioned in the ip-address man page, an address label must
be equal to the device name or prefixed by the device name
followed by a colon. Currently the only check on this input is
to see if the device name appears at the beginning of the label
string.
This commit adds an additional check to ensure label == dev or
continues with a colon.
Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
---
ip/ipaddress.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index aecc9a1..edcf821 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -2168,9 +2168,14 @@ static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
fprintf(stderr, "Not enough information: \"dev\" argument is required.\n");
return -1;
}
- if (l && matches(d, l) != 0) {
- fprintf(stderr, "\"dev\" (%s) must match \"label\" (%s).\n", d, l);
- return -1;
+ if (l) {
+ size_t d_len = strlen(d);
+
+ if (!(matches(d, l) == 0 && (l[d_len] == '\0' || l[d_len] == ':'))) {
+ fprintf(stderr, "\"label\" (%s) must match \"dev\" (%s) or be prefixed by"
+ " \"dev\" with a colon.\n", l, d);
+ return -1;
+ }
}
if (peer_len == 0 && local_len) {
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH 20/39] afs: simplify procfs code
From: Christoph Hellwig @ 2018-04-24 14:12 UTC (permalink / raw)
To: David Howells
Cc: Christoph Hellwig, Andrew Morton, Alexander Viro, linux-kernel,
linux-afs, netdev, Alexey Dobriyan
In-Reply-To: <22726.1524227374@warthog.procyon.org.uk>
On Fri, Apr 20, 2018 at 01:29:34PM +0100, David Howells wrote:
> David Howells <dhowells@redhat.com> wrote:
>
> > > Use remove_proc_subtree to remove the whole subtree on cleanup, and
> > > unwind the registration loop into individual calls. Switch to use
> > > proc_create_seq where applicable.
> >
> > Note that this is likely going to clash with my patch to net-namespace all of
> > the afs proc files:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?h=mount-context&id=f60c26c827c073583107ebf19d87bc5c0e71c3d2
> >
> > If it helps, I should be able to disentangle this from the mount-api changes
> > since the subsequent patch connects the dots to propagate the network
> > namespace over automount using the new fs_context to do it.
>
> Okay, I'll follow up this mail with a pair of patches to just use network
> namespacing in AFS. The first exports a function from core code only; the
> second is the actual modifications to AFS.
I don't think you should need any of these. seq_file_net or
seq_file_single_net will return you the net_ns based on a struct
seq_file. And even from your write routines you can reach the
seq_file in file->private pretty easily.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox