From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: davem@davemloft.net
Cc: oss-drivers@netronome.com, netdev@vger.kernel.org,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH net-next 03/11] nfp: move queue variable init
Date: Tue, 27 Nov 2018 22:24:50 -0800 [thread overview]
Message-ID: <20181128062458.12087-4-jakub.kicinski@netronome.com> (raw)
In-Reply-To: <20181128062458.12087-1-jakub.kicinski@netronome.com>
nd_q is only used at the very end of nfp_net_tx(), there is no need
to initialize it early.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
---
drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index 78c651f9f774..0302a38149b6 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -801,13 +801,13 @@ static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
qidx = skb_get_queue_mapping(skb);
tx_ring = &dp->tx_rings[qidx];
r_vec = tx_ring->r_vec;
- nd_q = netdev_get_tx_queue(dp->netdev, qidx);
nr_frags = skb_shinfo(skb)->nr_frags;
if (unlikely(nfp_net_tx_full(tx_ring, nr_frags + 1))) {
nn_dp_warn(dp, "TX ring %d busy. wrp=%u rdp=%u\n",
qidx, tx_ring->wr_p, tx_ring->rd_p);
+ nd_q = netdev_get_tx_queue(dp->netdev, qidx);
netif_tx_stop_queue(nd_q);
nfp_net_tx_xmit_more_flush(tx_ring);
u64_stats_update_begin(&r_vec->tx_sync);
@@ -894,6 +894,8 @@ static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
skb_tx_timestamp(skb);
+ nd_q = netdev_get_tx_queue(dp->netdev, tx_ring->idx);
+
tx_ring->wr_p += nr_frags + 1;
if (nfp_net_tx_ring_should_stop(tx_ring))
nfp_net_tx_ring_stop(nd_q, tx_ring);
--
2.17.1
next prev parent reply other threads:[~2018-11-28 17:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 6:24 [PATCH net-next 00/11] nfp: update TX path to enable repr offloads Jakub Kicinski
2018-11-28 6:24 ` [PATCH net-next 01/11] nfp: copy only the relevant part of the TX descriptor for frags Jakub Kicinski
2018-11-28 6:24 ` [PATCH net-next 02/11] nfp: move temporary variables in nfp_net_tx_complete() Jakub Kicinski
2018-11-28 6:24 ` Jakub Kicinski [this message]
2018-11-28 6:24 ` [PATCH net-next 04/11] nfp: correct descriptor offsets in presence of metadata Jakub Kicinski
2018-11-28 6:24 ` [PATCH net-next 05/11] nfp: avoid oversized TSO headers with metadata prepend Jakub Kicinski
2018-11-28 6:24 ` [PATCH net-next 06/11] nfp: run representor TX locklessly Jakub Kicinski
2018-11-28 6:24 ` [PATCH net-next 07/11] nfp: run don't require Qdiscs on representor netdevs Jakub Kicinski
2018-11-28 6:24 ` [PATCH net-next 08/11] nfp: add locking around representor changes Jakub Kicinski
2018-11-28 6:24 ` [PATCH net-next 09/11] nfp: add offloads on representors Jakub Kicinski
2018-11-28 6:24 ` [PATCH net-next 10/11] nfp: add offset to all TLV parsing errors Jakub Kicinski
2018-11-28 6:24 ` [PATCH net-next 11/11] nfp: report more info when reconfiguration fails Jakub Kicinski
2018-11-30 21:31 ` [PATCH net-next 00/11] nfp: update TX path to enable repr offloads 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=20181128062458.12087-4-jakub.kicinski@netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
/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;
as well as URLs for NNTP newsgroup(s).