Netdev List
 help / color / mirror / Atom feed
From: Yuval Mintz <Yuval.Mintz@cavium.com>
To: <netdev@vger.kernel.org>, <davem@davemloft.net>
Cc: <linux-rdma@vger.kernel.org>, <Michal.Kalderon@cavium.com>,
	Yuval Mintz <Yuval.Mintz@cavium.com>
Subject: [PATCH v2 net-next 7/8] qed: Call rx_release_cb() when flushing LL2
Date: Fri, 9 Jun 2017 17:13:24 +0300	[thread overview]
Message-ID: <20170609141325.20547-8-Yuval.Mintz@cavium.com> (raw)
In-Reply-To: <20170609141325.20547-1-Yuval.Mintz@cavium.com>

Driver to inform the connection owner that the its buffers are being
released as part of a flush.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_ll2.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
index 2a68fb9..c6172a77e 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
@@ -525,10 +525,6 @@ static void qed_ll2_rxq_flush(struct qed_hwfn *p_hwfn, u8 connection_handle)
 	p_rx = &p_ll2_conn->rx_queue;
 
 	while (!list_empty(&p_rx->active_descq)) {
-		dma_addr_t rx_buf_addr;
-		void *cookie;
-		bool b_last;
-
 		p_pkt = list_first_entry(&p_rx->active_descq,
 					 struct qed_ll2_rx_packet, list_entry);
 		if (!p_pkt)
@@ -543,10 +539,15 @@ static void qed_ll2_rxq_flush(struct qed_hwfn *p_hwfn, u8 connection_handle)
 			qed_ooo_put_free_buffer(p_hwfn, p_hwfn->p_ooo_info,
 						p_buffer);
 		} else {
-			rx_buf_addr = p_pkt->rx_buf_addr;
-			cookie = p_pkt->cookie;
+			dma_addr_t rx_buf_addr = p_pkt->rx_buf_addr;
+			void *cookie = p_pkt->cookie;
+			bool b_last;
 
 			b_last = list_empty(&p_rx->active_descq);
+			p_ll2_conn->cbs.rx_release_cb(p_ll2_conn->cbs.cookie,
+						      p_ll2_conn->my_id,
+						      cookie,
+						      rx_buf_addr, b_last);
 		}
 	}
 }
-- 
2.9.4

  parent reply	other threads:[~2017-06-09 14:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 14:13 [PATCH v2 net-next 0/8] qed*: Light L2 updates Yuval Mintz
2017-06-09 14:13 ` [PATCH v2 net-next 3/8] qed: Cleaner seperation of LL2 inputs Yuval Mintz
     [not found] ` <20170609141325.20547-1-Yuval.Mintz-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-06-09 14:13   ` [PATCH v2 net-next 1/8] qed: LL2 to use packed information for tx Yuval Mintz
2017-06-09 14:13   ` [PATCH v2 net-next 2/8] qed: Revise ll2 Rx completion Yuval Mintz
2017-06-09 14:13   ` [PATCH v2 net-next 4/8] qed: LL2 code relocations Yuval Mintz
2017-06-09 14:13   ` [PATCH v2 net-next 5/8] qed*: LL2 callback operations Yuval Mintz
2017-06-09 14:13   ` [PATCH v2 net-next 8/8] qed: collect GSI port statistics Yuval Mintz
2017-06-09 14:13 ` [PATCH v2 net-next 6/8] qed: No need for LL2 frags indication Yuval Mintz
2017-06-09 14:13 ` Yuval Mintz [this message]
2017-06-09 19:49 ` [PATCH v2 net-next 0/8] qed*: Light L2 updates David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170609141325.20547-8-Yuval.Mintz@cavium.com \
    --to=yuval.mintz@cavium.com \
    --cc=Michal.Kalderon@cavium.com \
    --cc=davem@davemloft.net \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox