浏览代码

s390/qeth: invoke softirqs after napi_schedule()

Calling napi_schedule() from process context does not ensure that the
NET_RX softirq is run in a timely fashion. So trigger it manually.

This is no big issue with current code. A call to ndo_open() is usually
followed by a ndo_set_rx_mode() call, and for qeth this contains a
spin_unlock_bh(). Except for OSN, where qeth_l2_set_rx_mode() bails out
early.
Nevertheless it's best to not depend on this behaviour, and just fix
the issue at its source like all other drivers do. For instance see
commit 83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule").

Fixes: a1c3ed4c9ca0 ("qeth: NAPI support for l2 and l3 discipline")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Julian Wiedmann 7 年之前
父节点
当前提交
4d19db777a
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 3 0
      drivers/s390/net/qeth_l2_main.c
  2. 3 0
      drivers/s390/net/qeth_l3_main.c

+ 3 - 0
drivers/s390/net/qeth_l2_main.c

@@ -755,7 +755,10 @@ static int __qeth_l2_open(struct net_device *dev)
 
 
 	if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
 	if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
 		napi_enable(&card->napi);
 		napi_enable(&card->napi);
+		local_bh_disable();
 		napi_schedule(&card->napi);
 		napi_schedule(&card->napi);
+		/* kick-start the NAPI softirq: */
+		local_bh_enable();
 	} else
 	} else
 		rc = -EIO;
 		rc = -EIO;
 	return rc;
 	return rc;

+ 3 - 0
drivers/s390/net/qeth_l3_main.c

@@ -2293,7 +2293,10 @@ static int __qeth_l3_open(struct net_device *dev)
 
 
 	if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
 	if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
 		napi_enable(&card->napi);
 		napi_enable(&card->napi);
+		local_bh_disable();
 		napi_schedule(&card->napi);
 		napi_schedule(&card->napi);
+		/* kick-start the NAPI softirq: */
+		local_bh_enable();
 	} else
 	} else
 		rc = -EIO;
 		rc = -EIO;
 	return rc;
 	return rc;