linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dpaa_eth: NETIF_F_LLTX requires to do our own update of trans_start
@ 2019-01-17  9:42 Madalin Bucur
  2019-01-18  6:00 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Madalin Bucur @ 2019-01-17  9:42 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, Madalin Bucur

As txq_trans_update() only updates trans_start when the lock is held,
trans_start does not get updated if NETIF_F_LLTX is declared.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index f53090cde041..dfebc30c4841 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2051,6 +2051,7 @@ dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
 	bool nonlinear = skb_is_nonlinear(skb);
 	struct rtnl_link_stats64 *percpu_stats;
 	struct dpaa_percpu_priv *percpu_priv;
+	struct netdev_queue *txq;
 	struct dpaa_priv *priv;
 	struct qm_fd fd;
 	int offset = 0;
@@ -2100,6 +2101,11 @@ dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
 	if (unlikely(err < 0))
 		goto skb_to_fd_failed;
 
+	txq = netdev_get_tx_queue(net_dev, queue_mapping);
+
+	/* LLTX requires to do our own update of trans_start */
+	txq->trans_start = jiffies;
+
 	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) {
 		fd.cmd |= cpu_to_be32(FM_FD_CMD_UPD);
 		skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dpaa_eth: NETIF_F_LLTX requires to do our own update of trans_start
  2019-01-17  9:42 [PATCH] dpaa_eth: NETIF_F_LLTX requires to do our own update of trans_start Madalin Bucur
@ 2019-01-18  6:00 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-01-18  6:00 UTC (permalink / raw)
  To: madalin.bucur; +Cc: netdev, linux-kernel

From: Madalin Bucur <madalin.bucur@nxp.com>
Date: Thu, 17 Jan 2019 11:42:27 +0200

> As txq_trans_update() only updates trans_start when the lock is held,
> trans_start does not get updated if NETIF_F_LLTX is declared.
> 
> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-18  6:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17  9:42 [PATCH] dpaa_eth: NETIF_F_LLTX requires to do our own update of trans_start Madalin Bucur
2019-01-18  6:00 ` David Miller

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).