diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-06 15:16:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-06 15:16:44 -0500 |
commit | 271d70f4b7f2990c84138be267f8e42c33506cc7 (patch) | |
tree | e943ec597065f6d33713272d4e5805f3de7c052f | |
parent | 4e865a5a997005a93dc0833683248dd185ea2c58 (diff) | |
parent | 8c4ee3e70646d6bfdda55afe84016b914c7fdd0e (diff) | |
download | openvswitch-271d70f4b7f2990c84138be267f8e42c33506cc7.tar.gz |
Merge branch 'sunvnet-next'
Sowmini Varadhan says:
====================
sunvnet: bug fixes
This patch series has a coding-style fix and a bug fix.
The coding style fix (patch 1) is the extra indentation flagged by
Ben Hutchings:
http://marc.info/?l=linux-netdev&m=141529243409594&w=2
The bugfix (patch 2) is the following:
when vnet_event_napi() is called as part of napi_resume
(i.e., continuation of a previous NAPI read that was truncated
due to budget constraints), and then finds no more packets to read,
the code was trying to avoid an additional trip through ldc_rx
as an optimization. However, when this corner case happens, we would
need to reset a number of dring state bits such as rcv_nxt carefully,
which quickly becomes complex and hacky. The cleaner solution
is to just roll back to vnet_poll, re-enable interrupts and set up
dring state as was done in the pre-NAPI version of the driver.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/sun/sunvnet.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index e7bb63b2d5256c..5c5fb59adf7654 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c @@ -627,7 +627,7 @@ static void maybe_tx_wakeup(struct vnet_port *port) struct vio_dring_state *dr; dr = &port->vio.drings[VIO_DRIVER_TX_RING]; - netif_tx_wake_queue(txq); + netif_tx_wake_queue(txq); } __netif_tx_unlock(txq); } @@ -691,7 +691,6 @@ ldc_ctrl: pkt->end_idx = -1; goto napi_resume; } -ldc_read: err = ldc_read(vio->lp, &msgbuf, sizeof(msgbuf)); if (unlikely(err < 0)) { if (err == -ECONNRESET) @@ -722,8 +721,8 @@ napi_resume: err = vnet_rx(port, &msgbuf, &npkts, budget); if (npkts >= budget) break; - if (npkts == 0 && err != -ECONNRESET) - goto ldc_read; + if (npkts == 0) + break; } else if (msgbuf.tag.stype == VIO_SUBTYPE_ACK) { err = vnet_ack(port, &msgbuf); if (err > 0) |