aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c19
-rw-r--r--drivers/net/macvlan.c10
2 files changed, 8 insertions, 21 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 80225af2acb1..abb176df2e7f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -8208,20 +8208,17 @@ static void ixgbe_atr(struct ixgbe_ring *ring,
8208 input, common, ring->queue_index); 8208 input, common, ring->queue_index);
8209} 8209}
8210 8210
8211#ifdef IXGBE_FCOE
8211static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb, 8212static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
8212 void *accel_priv, select_queue_fallback_t fallback) 8213 void *accel_priv, select_queue_fallback_t fallback)
8213{ 8214{
8214 struct ixgbe_fwd_adapter *fwd_adapter = accel_priv;
8215#ifdef IXGBE_FCOE
8216 struct ixgbe_adapter *adapter; 8215 struct ixgbe_adapter *adapter;
8217 struct ixgbe_ring_feature *f; 8216 struct ixgbe_ring_feature *f;
8218#endif
8219 int txq; 8217 int txq;
8220 8218
8221 if (fwd_adapter) { 8219 if (accel_priv) {
8222 u8 tc = netdev_get_num_tc(dev) ? 8220 u8 tc = netdev_get_prio_tc_map(dev, skb->priority);
8223 netdev_get_prio_tc_map(dev, skb->priority) : 0; 8221 struct net_device *vdev = accel_priv;
8224 struct net_device *vdev = fwd_adapter->netdev;
8225 8222
8226 txq = vdev->tc_to_txq[tc].offset; 8223 txq = vdev->tc_to_txq[tc].offset;
8227 txq += reciprocal_scale(skb_get_hash(skb), 8224 txq += reciprocal_scale(skb_get_hash(skb),
@@ -8230,8 +8227,6 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
8230 return txq; 8227 return txq;
8231 } 8228 }
8232 8229
8233#ifdef IXGBE_FCOE
8234
8235 /* 8230 /*
8236 * only execute the code below if protocol is FCoE 8231 * only execute the code below if protocol is FCoE
8237 * or FIP and we have FCoE enabled on the adapter 8232 * or FIP and we have FCoE enabled on the adapter
@@ -8257,11 +8252,9 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
8257 txq -= f->indices; 8252 txq -= f->indices;
8258 8253
8259 return txq + f->offset; 8254 return txq + f->offset;
8260#else
8261 return fallback(dev, skb);
8262#endif
8263} 8255}
8264 8256
8257#endif
8265static int ixgbe_xmit_xdp_ring(struct ixgbe_adapter *adapter, 8258static int ixgbe_xmit_xdp_ring(struct ixgbe_adapter *adapter,
8266 struct xdp_frame *xdpf) 8259 struct xdp_frame *xdpf)
8267{ 8260{
@@ -10058,7 +10051,6 @@ static const struct net_device_ops ixgbe_netdev_ops = {
10058 .ndo_open = ixgbe_open, 10051 .ndo_open = ixgbe_open,
10059 .ndo_stop = ixgbe_close, 10052 .ndo_stop = ixgbe_close,
10060 .ndo_start_xmit = ixgbe_xmit_frame, 10053 .ndo_start_xmit = ixgbe_xmit_frame,
10061 .ndo_select_queue = ixgbe_select_queue,
10062 .ndo_set_rx_mode = ixgbe_set_rx_mode, 10054 .ndo_set_rx_mode = ixgbe_set_rx_mode,
10063 .ndo_validate_addr = eth_validate_addr, 10055 .ndo_validate_addr = eth_validate_addr,
10064 .ndo_set_mac_address = ixgbe_set_mac, 10056 .ndo_set_mac_address = ixgbe_set_mac,
@@ -10081,6 +10073,7 @@ static const struct net_device_ops ixgbe_netdev_ops = {
10081 .ndo_poll_controller = ixgbe_netpoll, 10073 .ndo_poll_controller = ixgbe_netpoll,
10082#endif 10074#endif
10083#ifdef IXGBE_FCOE 10075#ifdef IXGBE_FCOE
10076 .ndo_select_queue = ixgbe_select_queue,
10084 .ndo_fcoe_ddp_setup = ixgbe_fcoe_ddp_get, 10077 .ndo_fcoe_ddp_setup = ixgbe_fcoe_ddp_get,
10085 .ndo_fcoe_ddp_target = ixgbe_fcoe_ddp_target, 10078 .ndo_fcoe_ddp_target = ixgbe_fcoe_ddp_target,
10086 .ndo_fcoe_ddp_done = ixgbe_fcoe_ddp_put, 10079 .ndo_fcoe_ddp_done = ixgbe_fcoe_ddp_put,
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)