Commit ad4bbd72 authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

s390/qeth: enable napi_consume_skb() for pending TX buffers

Pending TX buffers are completed from the same NAPI code as normal
TX buffers. Pass the NAPI budget to qeth_tx_complete_buf() so that
the freeing of the completed skbs can be deferred.
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e47ded97
...@@ -1453,7 +1453,7 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue, ...@@ -1453,7 +1453,7 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
static void qeth_tx_complete_pending_bufs(struct qeth_card *card, static void qeth_tx_complete_pending_bufs(struct qeth_card *card,
struct qeth_qdio_out_q *queue, struct qeth_qdio_out_q *queue,
bool drain) bool drain, int budget)
{ {
struct qeth_qdio_out_buffer *buf, *tmp; struct qeth_qdio_out_buffer *buf, *tmp;
...@@ -1465,7 +1465,7 @@ static void qeth_tx_complete_pending_bufs(struct qeth_card *card, ...@@ -1465,7 +1465,7 @@ static void qeth_tx_complete_pending_bufs(struct qeth_card *card,
if (drain) if (drain)
qeth_notify_skbs(queue, buf, qeth_notify_skbs(queue, buf,
TX_NOTIFY_GENERALERROR); TX_NOTIFY_GENERALERROR);
qeth_tx_complete_buf(buf, drain, 0); qeth_tx_complete_buf(buf, drain, budget);
list_del(&buf->list_entry); list_del(&buf->list_entry);
kmem_cache_free(qeth_qdio_outbuf_cache, buf); kmem_cache_free(qeth_qdio_outbuf_cache, buf);
...@@ -1477,7 +1477,7 @@ static void qeth_drain_output_queue(struct qeth_qdio_out_q *q, bool free) ...@@ -1477,7 +1477,7 @@ static void qeth_drain_output_queue(struct qeth_qdio_out_q *q, bool free)
{ {
int j; int j;
qeth_tx_complete_pending_bufs(q->card, q, true); qeth_tx_complete_pending_bufs(q->card, q, true, 0);
for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) { for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
if (!q->bufs[j]) if (!q->bufs[j])
...@@ -6152,7 +6152,7 @@ static int qeth_tx_poll(struct napi_struct *napi, int budget) ...@@ -6152,7 +6152,7 @@ static int qeth_tx_poll(struct napi_struct *napi, int budget)
unsigned int bytes = 0; unsigned int bytes = 0;
int completed; int completed;
qeth_tx_complete_pending_bufs(card, queue, false); qeth_tx_complete_pending_bufs(card, queue, false, budget);
if (qeth_out_queue_is_empty(queue)) { if (qeth_out_queue_is_empty(queue)) {
napi_complete(napi); napi_complete(napi);
......
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