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>
This commit is contained in:

committed by
David S. Miller

parent
3a18d75400
commit
73dc2daf11
@@ -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 = {
|
||||
|
Reference in New Issue
Block a user