From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: linux-kernel@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: [PATCH net-next 3/5] netdevice: add helper to update trans_start
Date: Tue, 3 May 2016 16:31:00 +0200 [thread overview]
Message-ID: <1462285862-30946-4-git-send-email-fw@strlen.de> (raw)
In-Reply-To: <1462285862-30946-1-git-send-email-fw@strlen.de>
trans_start exists twice:
- as member of net_device (legacy)
- as member of netdev_queue
In order to get rid of the legacy case, add a helper for the
dev->trans_update (this patch), then convert spots that do
dev->trans_start = jiffies
to use this helper (next patch).
This would then allow us to change the helper so that it updates the
trans_stamp of netdev queue 0 instead.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
include/linux/netdevice.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f218259..798f285 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3481,6 +3481,12 @@ static inline void txq_trans_update(struct netdev_queue *txq)
txq->trans_start = jiffies;
}
+/* legacy drivers only, netdev_start_xmit() sets txq->trans_start */
+static inline void netif_trans_update(struct net_device *dev)
+{
+ dev->trans_start = jiffies;
+}
+
/**
* netif_tx_lock - grab network device transmit lock
* @dev: network device
--
2.7.3
next prev parent reply other threads:[~2016-05-03 14:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 14:30 [PATCH net-next 0/5] net: remove trans_start from struct net_device Florian Westphal
2016-05-03 14:30 ` [PATCH net-next 1/5] dmfe: kill DEVICE define Florian Westphal
2016-05-03 14:30 ` [PATCH net-next 2/5] drivers: replace dev->trans_start accesses with dev_trans_start Florian Westphal
[not found] ` <1462285862-30946-3-git-send-email-fw-HFFVJYpyMKqzQB+pC5nmwQ@public.gmane.org>
2016-05-12 19:39 ` Doug Ledford
2016-05-03 14:31 ` Florian Westphal [this message]
[not found] ` <1462285862-30946-1-git-send-email-fw-HFFVJYpyMKqzQB+pC5nmwQ@public.gmane.org>
2016-05-03 14:33 ` [PATCH net-next 4/5] treewide: replace dev->trans_start update with helper Florian Westphal
2016-05-03 14:33 ` [PATCH net-next 5/5] net: remove dev->trans_start Florian Westphal
2016-05-04 8:14 ` [PATCH net-next 4/5] treewide: replace dev->trans_start update with helper Felipe Balbi
2016-05-04 11:33 ` Mugunthan V N
2016-05-04 17:20 ` Antonio Quartulli
[not found] ` <1462285994-31983-1-git-send-email-fw-HFFVJYpyMKqzQB+pC5nmwQ@public.gmane.org>
2016-05-09 7:12 ` Marc Kleine-Budde
2016-05-12 19:40 ` Doug Ledford
2016-05-04 18:17 ` [PATCH net-next 0/5] net: remove trans_start from struct net_device 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=1462285862-30946-4-git-send-email-fw@strlen.de \
--to=fw@strlen.de \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).