summaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2018-07-09 12:19:48 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-07-09 15:53:58 -0400
commiteadec877ce9ca46a94e9036b5a44e7941d4fc501 (patch)
tree1771ab980c8ddc4fdfe0523bd62f52c7b1ace5ab /drivers/net/macvlan.c
parent58b0b3ed4c226f62fcdf82df366d644b7a2226ca (diff)
net: Add support for subordinate traffic classes to netdev_pick_tx
This change makes it so that we can support the concept of subordinate device traffic classes to the core networking code. In doing this we can start pulling out the driver specific bits needed to support selecting a queue based on an upper device. The solution at is currently stands is only partially implemented. I have the start of some XPS bits in here, but I would still need to allow for configuration of the XPS maps on the queues reserved for the subordinate devices. For now I am using the reference to the sb_dev XPS map as just a way to skip the lookup of the lower device XPS map for now as that would result in the wrong queue being picked. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index adde8fc45588..401e1d1ce1ec 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -514,7 +514,6 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)
514 const struct macvlan_dev *vlan = netdev_priv(dev); 514 const struct macvlan_dev *vlan = netdev_priv(dev);
515 const struct macvlan_port *port = vlan->port; 515 const struct macvlan_port *port = vlan->port;
516 const struct macvlan_dev *dest; 516 const struct macvlan_dev *dest;
517 void *accel_priv = NULL;
518 517
519 if (vlan->mode == MACVLAN_MODE_BRIDGE) { 518 if (vlan->mode == MACVLAN_MODE_BRIDGE) {
520 const struct ethhdr *eth = (void *)skb->data; 519 const struct ethhdr *eth = (void *)skb->data;
@@ -533,15 +532,10 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)
533 return NET_XMIT_SUCCESS; 532 return NET_XMIT_SUCCESS;
534 } 533 }
535 } 534 }
536
537 /* For packets that are non-multicast and not bridged we will pass
538 * the necessary information so that the lowerdev can distinguish
539 * the source of the packets via the accel_priv value.
540 */
541 accel_priv = vlan->accel_priv;
542xmit_world: 535xmit_world:
543 skb->dev = vlan->lowerdev; 536 skb->dev = vlan->lowerdev;
544 return dev_queue_xmit_accel(skb, accel_priv); 537 return dev_queue_xmit_accel(skb,
538 netdev_get_sb_channel(dev) ? dev : NULL);
545} 539}
546 540
547static inline netdev_tx_t macvlan_netpoll_send_skb(struct macvlan_dev *vlan, struct sk_buff *skb) 541static inline netdev_tx_t macvlan_netpoll_send_skb(struct macvlan_dev *vlan, struct sk_buff *skb)