From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: brouer@redhat.com, eric.dumazet@gmail.com,
Florian Westphal <fw@strlen.de>
Subject: [PATCH net-next 5/5] drivers: net: aurora: use netdev_xmit_more helper
Date: Mon, 1 Apr 2019 16:42:17 +0200 [thread overview]
Message-ID: <20190401144217.29876-6-fw@strlen.de> (raw)
In-Reply-To: <20190401144217.29876-1-fw@strlen.de>
This is the last driver using always-0 skb->xmit_more.
Switch it to netdev_xmit_more and remove the now unused xmit_more flag
from sk_buff.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
drivers/net/ethernet/aurora/nb8800.c | 8 +++++---
include/linux/skbuff.h | 2 --
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
index 6f56276015a4..f62deeb6e941 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -404,6 +404,7 @@ static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
unsigned int dma_len;
unsigned int align;
unsigned int next;
+ bool xmit_more;
if (atomic_read(&priv->tx_free) <= NB8800_DESC_LOW) {
netif_stop_queue(dev);
@@ -423,9 +424,10 @@ static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_OK;
}
+ xmit_more = netdev_xmit_more();
if (atomic_dec_return(&priv->tx_free) <= NB8800_DESC_LOW) {
netif_stop_queue(dev);
- skb->xmit_more = 0;
+ xmit_more = false;
}
next = priv->tx_next;
@@ -450,7 +452,7 @@ static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
desc->n_addr = priv->tx_bufs[next].dma_desc;
desc->config = DESC_BTS(2) | DESC_DS | DESC_EOF | dma_len;
- if (!skb->xmit_more)
+ if (!xmit_more)
desc->config |= DESC_EOC;
txb->skb = skb;
@@ -468,7 +470,7 @@ static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
priv->tx_next = next;
- if (!skb->xmit_more) {
+ if (!xmit_more) {
smp_wmb();
priv->tx_chain->ready = true;
priv->tx_chain = NULL;
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 9027a8c4219f..69b5538adcea 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -657,7 +657,6 @@ typedef unsigned char *sk_buff_data_t;
* @tc_index: Traffic control index
* @hash: the packet hash
* @queue_mapping: Queue mapping for multiqueue devices
- * @xmit_more: More SKBs are pending for this queue
* @pfmemalloc: skbuff was allocated from PFMEMALLOC reserves
* @active_extensions: active extensions (skb_ext_id types)
* @ndisc_nodetype: router type (from link layer)
@@ -764,7 +763,6 @@ struct sk_buff {
fclone:2,
peeked:1,
head_frag:1,
- xmit_more:1,
pfmemalloc:1;
#ifdef CONFIG_SKB_EXTENSIONS
__u8 active_extensions;
--
2.21.0
next prev parent reply other threads:[~2019-04-01 14:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 14:42 [PATCH net-next 0/5] net: move skb->xmit_more to percpu softnet data Florian Westphal
2019-04-01 14:42 ` [PATCH net-next 1/5] net: place xmit recursion in " Florian Westphal
2019-04-01 14:42 ` [PATCH net-next 2/5] net: move skb->xmit_more hint to " Florian Westphal
2019-04-01 14:42 ` [PATCH net-next 3/5] drivers: mellanox: use netdev_xmit_more() helper Florian Westphal
2019-04-01 14:42 ` [PATCH net-next 4/5] drivers: net: sfc: use netdev_xmit_more helper Florian Westphal
2019-04-01 14:42 ` Florian Westphal [this message]
2019-04-02 1:35 ` [PATCH net-next 0/5] net: move skb->xmit_more to percpu softnet data 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=20190401144217.29876-6-fw@strlen.de \
--to=fw@strlen.de \
--cc=brouer@redhat.com \
--cc=eric.dumazet@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).