Commit 78e886ba authored by Kamal Heib's avatar Kamal Heib Committed by David S. Miller

net: ena: Remove ena_select_queue

Avoid the following warnings by removing the ena_select_queue() function
and rely on the net core to do the queue selection, The issue happen
when an skb received from an interface with more queues than ena is
forwarded to the ena interface.

[ 1176.159959] eth0 selects TX queue 11, but real number of TX queues is 8
[ 1176.863976] eth0 selects TX queue 14, but real number of TX queues is 8
[ 1180.767877] eth0 selects TX queue 14, but real number of TX queues is 8
[ 1188.703742] eth0 selects TX queue 14, but real number of TX queues is 8

Fixes: 1738cd3e ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: default avatarKamal Heib <kheib@redhat.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6d47302a
...@@ -2689,22 +2689,6 @@ static netdev_tx_t ena_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -2689,22 +2689,6 @@ static netdev_tx_t ena_start_xmit(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
static u16 ena_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)
{
u16 qid;
/* we suspect that this is good for in--kernel network services that
* want to loop incoming skb rx to tx in normal user generated traffic,
* most probably we will not get to this
*/
if (skb_rx_queue_recorded(skb))
qid = skb_get_rx_queue(skb);
else
qid = netdev_pick_tx(dev, skb, NULL);
return qid;
}
static void ena_config_host_info(struct ena_com_dev *ena_dev, struct pci_dev *pdev) static void ena_config_host_info(struct ena_com_dev *ena_dev, struct pci_dev *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
...@@ -2881,7 +2865,6 @@ static const struct net_device_ops ena_netdev_ops = { ...@@ -2881,7 +2865,6 @@ static const struct net_device_ops ena_netdev_ops = {
.ndo_open = ena_open, .ndo_open = ena_open,
.ndo_stop = ena_close, .ndo_stop = ena_close,
.ndo_start_xmit = ena_start_xmit, .ndo_start_xmit = ena_start_xmit,
.ndo_select_queue = ena_select_queue,
.ndo_get_stats64 = ena_get_stats64, .ndo_get_stats64 = ena_get_stats64,
.ndo_tx_timeout = ena_tx_timeout, .ndo_tx_timeout = ena_tx_timeout,
.ndo_change_mtu = ena_change_mtu, .ndo_change_mtu = ena_change_mtu,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment