aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c19
1 files changed, 6 insertions, 13 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,