team: add multiqueue support
Largely copied from bonding code. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
8a540ff9e1
commit
6c85f2bdda
@@ -14,6 +14,7 @@
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/netpoll.h>
|
||||
#include <net/sch_generic.h>
|
||||
|
||||
struct team_pcpu_stats {
|
||||
u64 rx_packets;
|
||||
@@ -98,6 +99,10 @@ static inline void team_netpoll_send_skb(struct team_port *port,
|
||||
static inline int team_dev_queue_xmit(struct team *team, struct team_port *port,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
BUILD_BUG_ON(sizeof(skb->queue_mapping) !=
|
||||
sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping));
|
||||
skb_set_queue_mapping(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping);
|
||||
|
||||
skb->dev = port->dev;
|
||||
if (unlikely(netpoll_tx_running(port->dev))) {
|
||||
team_netpoll_send_skb(port, skb);
|
||||
@@ -236,6 +241,9 @@ extern void team_options_unregister(struct team *team,
|
||||
extern int team_mode_register(const struct team_mode *mode);
|
||||
extern void team_mode_unregister(const struct team_mode *mode);
|
||||
|
||||
#define TEAM_DEFAULT_NUM_TX_QUEUES 16
|
||||
#define TEAM_DEFAULT_NUM_RX_QUEUES 16
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#define TEAM_STRING_MAX_LEN 32
|
||||
|
Reference in New Issue
Block a user