summaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l2_main.c
diff options
context:
space:
mode:
authorJulian Wiedmann2019-04-17 18:17:33 +0200
committerDavid S. Miller2019-04-17 19:33:59 +0200
commit73dc2daf110f4a4e777003b22dda09bb40948fc9 (patch)
tree49b9f62d80fc361a419002b6d86ced8fe4230017 /drivers/s390/net/qeth_l2_main.c
parents390/qeth: add TX multiqueue support for IQD devices (diff)
downloadkernel-qcow2-linux-73dc2daf110f4a4e777003b22dda09bb40948fc9.tar.gz
kernel-qcow2-linux-73dc2daf110f4a4e777003b22dda09bb40948fc9.tar.xz
kernel-qcow2-linux-73dc2daf110f4a4e777003b22dda09bb40948fc9.zip
s390/qeth: add TX multiqueue support for OSA devices
This adds trivial support for multiple TX queues on OSA-style devices (both real HW and z/VM NICs). For now we expose the driver's existing QoS mechanism via .ndo_select_queue, and adjust the number of available TX queues when qeth_update_from_chp_desc() detects that the HW configuration has changed. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r--drivers/s390/net/qeth_l2_main.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 1491281600c2..7381917f76dd 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -602,7 +602,6 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb,
{
struct qeth_card *card = dev->ml_priv;
u16 txq = skb_get_queue_mapping(skb);
- int ipv = qeth_get_ip_version(skb);
struct qeth_qdio_out_q *queue;
int tx_bytes = skb->len;
int rc;
@@ -610,14 +609,14 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb,
if (IS_IQD(card))
queue = card->qdio.out_qs[qeth_iqd_translate_txq(dev, txq)];
else
- queue = qeth_get_tx_queue(card, skb, ipv);
+ queue = card->qdio.out_qs[txq];
netif_stop_subqueue(dev, txq);
if (IS_OSN(card))
rc = qeth_l2_xmit_osn(card, skb, queue);
else
- rc = qeth_xmit(card, skb, queue, ipv,
+ rc = qeth_xmit(card, skb, queue, qeth_get_ip_version(skb),
qeth_l2_get_cast_type(skb), qeth_l2_fill_header);
if (!rc) {
@@ -638,8 +637,13 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb,
static u16 qeth_l2_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)
{
- return qeth_iqd_select_queue(dev, skb, qeth_l2_get_cast_type(skb),
- sb_dev);
+ struct qeth_card *card = dev->ml_priv;
+
+ if (IS_IQD(card))
+ return qeth_iqd_select_queue(dev, skb,
+ qeth_l2_get_cast_type(skb),
+ sb_dev);
+ return qeth_get_priority_queue(card, skb);
}
static const struct device_type qeth_l2_devtype = {