summaryrefslogtreecommitdiff
path: root/net/dsa/dsa_priv.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2015-07-31 21:42:56 +0300
committerDavid S. Miller <davem@davemloft.net>2015-08-01 01:45:37 +0300
commit4ed70ce9f01c998999e48642a768d9013bee2c4f (patch)
treea46d1aafd6b3f82cb854052ff24916ee8a8888af /net/dsa/dsa_priv.h
parent6cec4f5e00a34a1c7407af302470246dd4f8be28 (diff)
downloadlinux-4ed70ce9f01c998999e48642a768d9013bee2c4f.tar.xz
net: dsa: Refactor transmit path to eliminate duplication
All tagging protocols do the same thing: increment device statistics, make room for the tag to be inserted, create the tag, invoke the parent network device transmit function. In order to prepare for adding netpoll support, which requires the tag creation, but not using the parent network device transmit function, do some little refactoring which eliminates duplication between the 4 tagging protocols supported. We need to return a sk_buff pointer back to the caller because the tag specific transmit function may have to reallocate the original skb (e.g: tag_trailer.c) and this is the one we should be transmitting, not the original sk_buff we were passed. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa_priv.h')
-rw-r--r--net/dsa/dsa_priv.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index d5f1f9b862ea..eeade901e67a 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -15,7 +15,7 @@
#include <linux/netdevice.h>
struct dsa_device_ops {
- netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev);
+ struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
int (*rcv)(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev);
};
@@ -26,7 +26,7 @@ struct dsa_slave_priv {
* switch port.
*/
struct net_device *dev;
- netdev_tx_t (*xmit)(struct sk_buff *skb,
+ struct sk_buff * (*xmit)(struct sk_buff *skb,
struct net_device *dev);
/*