All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 02/19] netdev: convert pseudo-devices to netdev_tx_t
Date: Mon, 31 Aug 2009 22:50:41 -0700	[thread overview]
Message-ID: <20090901055128.581112223@vyatta.com> (raw)
In-Reply-To: 20090901055039.824876937@vyatta.com

[-- Attachment #1: misc-tx.patch --]
[-- Type: text/plain, Size: 10256 bytes --]

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


---
 drivers/ieee1394/eth1394.c  |   14 ++++----------
 net/8021q/vlan_dev.c        |    7 ++++---
 net/bluetooth/bnep/netdev.c |    3 ++-
 net/bridge/br_device.c      |    2 +-
 net/bridge/br_private.h     |    3 ++-
 net/core/pktgen.c           |    2 +-
 net/dsa/dsa_priv.h          |    6 +++---
 net/dsa/tag_dsa.c           |    2 +-
 net/dsa/tag_edsa.c          |    2 +-
 net/dsa/tag_trailer.c       |    2 +-
 net/ipv4/ip_gre.c           |    2 +-
 net/ipv4/ipip.c             |    2 +-
 net/ipv4/ipmr.c             |    2 +-
 net/ipv6/ip6_tunnel.c       |    2 +-
 net/ipv6/ip6mr.c            |    3 ++-
 net/ipv6/sit.c              |    3 ++-
 net/sched/sch_teql.c        |    4 ++--
 17 files changed, 30 insertions(+), 31 deletions(-)

--- a/net/core/pktgen.c	2009-08-31 16:20:50.093609481 -0700
+++ b/net/core/pktgen.c	2009-08-31 16:21:06.923607987 -0700
@@ -3381,7 +3381,7 @@ static void idle(struct pktgen_dev *pkt_
 static void pktgen_xmit(struct pktgen_dev *pkt_dev)
 {
 	struct net_device *odev = pkt_dev->odev;
-	int (*xmit)(struct sk_buff *, struct net_device *)
+	netdev_tx_t (*xmit)(struct sk_buff *, struct net_device *)
 		= odev->netdev_ops->ndo_start_xmit;
 	struct netdev_queue *txq;
 	u16 queue_map;
--- a/net/dsa/tag_dsa.c	2009-08-31 16:20:50.213591561 -0700
+++ b/net/dsa/tag_dsa.c	2009-08-31 16:21:06.923607987 -0700
@@ -15,7 +15,7 @@
 
 #define DSA_HLEN	4
 
-int dsa_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct dsa_slave_priv *p = netdev_priv(dev);
 	u8 *dsa_header;
--- a/net/dsa/tag_edsa.c	2009-08-31 16:20:50.193589159 -0700
+++ b/net/dsa/tag_edsa.c	2009-08-31 16:21:06.923607987 -0700
@@ -16,7 +16,7 @@
 #define DSA_HLEN	4
 #define EDSA_HLEN	8
 
-int edsa_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct dsa_slave_priv *p = netdev_priv(dev);
 	u8 *edsa_header;
--- a/net/dsa/tag_trailer.c	2009-08-31 16:20:50.183591100 -0700
+++ b/net/dsa/tag_trailer.c	2009-08-31 16:21:06.923607987 -0700
@@ -13,7 +13,7 @@
 #include <linux/netdevice.h>
 #include "dsa_priv.h"
 
-int trailer_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct dsa_slave_priv *p = netdev_priv(dev);
 	struct sk_buff *nskb;
--- a/net/ipv4/ip_gre.c	2009-08-31 16:20:50.163606647 -0700
+++ b/net/ipv4/ip_gre.c	2009-08-31 16:21:06.923607987 -0700
@@ -662,7 +662,7 @@ drop_nolock:
 	return(0);
 }
 
-static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ip_tunnel *tunnel = netdev_priv(dev);
 	struct net_device_stats *stats = &tunnel->dev->stats;
--- a/net/ipv4/ipip.c	2009-08-31 16:20:50.143591673 -0700
+++ b/net/ipv4/ipip.c	2009-08-31 16:21:06.923607987 -0700
@@ -387,7 +387,7 @@ static int ipip_rcv(struct sk_buff *skb)
  *	and that skb is filled properly by that function.
  */
 
-static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ip_tunnel *tunnel = netdev_priv(dev);
 	struct net_device_stats *stats = &tunnel->dev->stats;
--- a/net/ipv4/ipmr.c	2009-08-31 16:20:50.153591757 -0700
+++ b/net/ipv4/ipmr.c	2009-08-31 16:21:06.923607987 -0700
@@ -201,7 +201,7 @@ failure:
 
 #ifdef CONFIG_IP_PIMSM
 
-static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct net *net = dev_net(dev);
 
--- a/net/ipv6/ip6_tunnel.c	2009-08-31 16:20:50.123607428 -0700
+++ b/net/ipv6/ip6_tunnel.c	2009-08-31 16:21:06.923607987 -0700
@@ -1036,7 +1036,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
 	return 0;
 }
 
-static int
+static netdev_tx_t
 ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ip6_tnl *t = netdev_priv(dev);
--- a/net/ipv6/ip6mr.c	2009-08-31 16:20:50.113591560 -0700
+++ b/net/ipv6/ip6mr.c	2009-08-31 16:21:06.923607987 -0700
@@ -416,7 +416,8 @@ static struct inet6_protocol pim6_protoc
 
 /* Service routines creating virtual interfaces: PIMREG */
 
-static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t reg_vif_xmit(struct sk_buff *skb,
+				      struct net_device *dev)
 {
 	struct net *net = dev_net(dev);
 
--- a/net/ipv6/sit.c	2009-08-31 16:20:50.133591239 -0700
+++ b/net/ipv6/sit.c	2009-08-31 16:21:35.458276003 -0700
@@ -609,7 +609,8 @@ static inline __be32 try_6to4(struct in6
  *	and that skb is filled properly by that function.
  */
 
-static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
+				     struct net_device *dev)
 {
 	struct ip_tunnel *tunnel = netdev_priv(dev);
 	struct net_device_stats *stats = &tunnel->dev->stats;
--- a/net/dsa/dsa_priv.h	2009-08-31 16:20:50.193589159 -0700
+++ b/net/dsa/dsa_priv.h	2009-08-31 16:21:06.923607987 -0700
@@ -169,13 +169,13 @@ struct net_device *dsa_slave_create(stru
 				    int port, char *name);
 
 /* tag_dsa.c */
-int dsa_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev);
 
 /* tag_edsa.c */
-int edsa_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev);
 
 /* tag_trailer.c */
-int trailer_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev);
 
 
 #endif
--- a/net/bluetooth/bnep/netdev.c	2009-08-31 16:20:50.183591100 -0700
+++ b/net/bluetooth/bnep/netdev.c	2009-08-31 16:21:48.651094787 -0700
@@ -165,7 +165,8 @@ static inline int bnep_net_proto_filter(
 }
 #endif
 
-static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,
+				 struct net_device *dev)
 {
 	struct bnep_session *s = netdev_priv(dev);
 	struct sock *sk = s->sock->sk;
--- a/net/sched/sch_teql.c	2009-08-31 16:20:50.163606647 -0700
+++ b/net/sched/sch_teql.c	2009-08-31 16:21:06.923607987 -0700
@@ -268,7 +268,7 @@ static inline int teql_resolve(struct sk
 	return __teql_resolve(skb, skb_res, dev);
 }
 
-static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct teql_master *master = netdev_priv(dev);
 	struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
@@ -307,7 +307,7 @@ restart:
 
 				if (!netif_tx_queue_stopped(slave_txq) &&
 				    !netif_tx_queue_frozen(slave_txq) &&
-				    slave_ops->ndo_start_xmit(skb, slave) == 0) {
+				    slave_ops->ndo_start_xmit(skb, slave) == NETDEV_TX_OK) {
 					txq_trans_update(slave_txq);
 					__netif_tx_unlock(slave_txq);
 					master->slaves = NEXT_SLAVE(q);
--- a/net/8021q/vlan_dev.c	2009-08-31 16:20:50.103590218 -0700
+++ b/net/8021q/vlan_dev.c	2009-08-31 16:22:27.058282849 -0700
@@ -288,7 +288,8 @@ static int vlan_dev_hard_header(struct s
 	return rc;
 }
 
-static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
+					    struct net_device *dev)
 {
 	struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
 	struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
@@ -325,8 +326,8 @@ static int vlan_dev_hard_start_xmit(stru
 	return NETDEV_TX_OK;
 }
 
-static int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
-					    struct net_device *dev)
+static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
+						    struct net_device *dev)
 {
 	struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
 	u16 vlan_tci;
--- a/drivers/ieee1394/eth1394.c	2009-08-31 16:20:50.223592344 -0700
+++ b/drivers/ieee1394/eth1394.c	2009-08-31 16:22:48.811086205 -0700
@@ -169,7 +169,8 @@ static int ether1394_header_cache(const 
 static void ether1394_header_cache_update(struct hh_cache *hh,
 					  const struct net_device *dev,
 					  const unsigned char *haddr);
-static int ether1394_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ether1394_tx(struct sk_buff *skb,
+				struct net_device *dev);
 static void ether1394_iso(struct hpsb_iso *iso);
 
 static struct ethtool_ops ethtool_ops;
@@ -1555,7 +1556,8 @@ static void ether1394_complete_cb(void *
 }
 
 /* Transmit a packet (called by kernel) */
-static int ether1394_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ether1394_tx(struct sk_buff *skb,
+				struct net_device *dev)
 {
 	struct eth1394hdr hdr_buf;
 	struct eth1394_priv *priv = netdev_priv(dev);
@@ -1694,14 +1696,6 @@ fail:
 	dev->stats.tx_errors++;
 	spin_unlock_irqrestore(&priv->lock, flags);
 
-	/*
-	 * FIXME: According to a patch from 2003-02-26, "returning non-zero
-	 * causes serious problems" here, allegedly.  Before that patch,
-	 * -ERRNO was returned which is not appropriate under Linux 2.6.
-	 * Perhaps more needs to be done?  Stop the queue in serious
-	 * conditions and restart it elsewhere?
-	 */
-	/* return NETDEV_TX_BUSY; */
 	return NETDEV_TX_OK;
 }
 
--- a/net/bridge/br_device.c	2009-08-31 16:20:50.093609481 -0700
+++ b/net/bridge/br_device.c	2009-08-31 16:21:06.923607987 -0700
@@ -20,7 +20,7 @@
 #include "br_private.h"
 
 /* net device transmit always called with no BH (preempt_disabled) */
-int br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct net_bridge *br = netdev_priv(dev);
 	const unsigned char *dest = skb->data;
--- a/net/bridge/br_private.h	2009-08-31 16:20:50.103590218 -0700
+++ b/net/bridge/br_private.h	2009-08-31 16:23:10.522293080 -0700
@@ -143,7 +143,8 @@ static inline int br_is_root_bridge(cons
 
 /* br_device.c */
 extern void br_dev_setup(struct net_device *dev);
-extern int br_dev_xmit(struct sk_buff *skb, struct net_device *dev);
+extern netdev_tx_t br_dev_xmit(struct sk_buff *skb,
+			       struct net_device *dev);
 
 /* br_fdb.c */
 extern int br_fdb_init(void);

-- 


  parent reply	other threads:[~2009-09-01  5:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01  5:50 [PATCH 00/19] net_tx_t: network device transmit return value change Stephen Hemminger
2009-09-01  5:50 ` [PATCH 01/19] netdev: change transmit to limited range type Stephen Hemminger
2009-09-01  7:39   ` Eric Dumazet
2009-09-01  8:18     ` David Miller
2009-09-01  5:50 ` Stephen Hemminger [this message]
2009-09-01  5:50 ` [PATCH 03/19] convert ATM drivers to netdev_tx_t Stephen Hemminger
2009-09-01  5:50 ` [PATCH 04/19] convert hamradio drivers to netdev_txreturnt_t Stephen Hemminger
2009-09-01 15:30   ` Thomas Sailer
2009-09-01  5:50 ` [PATCH 05/19] isdn: convert to netdev_tx_t Stephen Hemminger
2009-09-01  5:50 ` [PATCH 06/19] usbnet: " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 07/19] tokenring: " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 08/19] wan: convert drivers " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 09/19] hdlc: convert " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 10/19] netdev: convert pcmcia drivers " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 11/19] irda: convert " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 12/19] netdev: convert pseudo drivers " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 13/19] uwb: convert " Stephen Hemminger
     [not found]   ` <20090901055129.729527950-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2009-09-14 10:47     ` David Vrabel
2009-09-01  5:50 ` [PATCH 14/19] tulip: convert drivers " Stephen Hemminger
2009-09-02  5:48   ` Grant Grundler
2009-09-02  6:04     ` Stephen Hemminger
2009-09-02  6:08     ` Grant Grundler
2009-09-01  5:50 ` [PATCH 15/19] 3com: " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 16/19] intel: " Stephen Hemminger
2009-09-02  1:03   ` Jeff Kirsher
2009-09-01  5:50 ` [PATCH 17/19] appletalk: " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 18/19] wireless: " Stephen Hemminger
2009-09-01  5:50   ` Stephen Hemminger
2009-09-01 13:18   ` John W. Linville
2009-09-01 13:18     ` John W. Linville
2009-09-01  5:50 ` [PATCH 19/19] netdev: convert bulk of " Stephen Hemminger
2009-09-01 16:21   ` David Dillow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090901055128.581112223@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.