netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] net-sysfs: add a newline when printing 'tx_timeout' by sysfs
@ 2020-07-21  7:02 Xiongfeng Wang
  2020-07-21 22:36 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Xiongfeng Wang @ 2020-07-21  7:02 UTC (permalink / raw)
  To: davem, kuba; +Cc: netdev, linux-kernel, wangxiongfeng2

When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to
add a newline for easy reading.

root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout
0root@syzkaller:~#

Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
---
 net/core/net-sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index e353b82..7bd6440 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1108,7 +1108,7 @@ static ssize_t tx_timeout_show(struct netdev_queue *queue, char *buf)
 	trans_timeout = queue->trans_timeout;
 	spin_unlock_irq(&queue->_xmit_lock);
 
-	return sprintf(buf, "%lu", trans_timeout);
+	return sprintf(buf, fmt_ulong, trans_timeout);
 }
 
 static unsigned int get_netdev_queue_index(struct netdev_queue *queue)
-- 
1.7.12.4


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

* Re: [PATCH v2] net-sysfs: add a newline when printing 'tx_timeout' by sysfs
  2020-07-21  7:02 [PATCH v2] net-sysfs: add a newline when printing 'tx_timeout' by sysfs Xiongfeng Wang
@ 2020-07-21 22:36 ` David Miller
  2020-07-22 15:27   ` Stephen Hemminger
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2020-07-21 22:36 UTC (permalink / raw)
  To: wangxiongfeng2; +Cc: kuba, netdev, linux-kernel

From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Date: Tue, 21 Jul 2020 15:02:57 +0800

> When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to
> add a newline for easy reading.
> 
> root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout
> 0root@syzkaller:~#
> 
> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>

Applied, thank you.

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

* Re: [PATCH v2] net-sysfs: add a newline when printing 'tx_timeout' by sysfs
  2020-07-21 22:36 ` David Miller
@ 2020-07-22 15:27   ` Stephen Hemminger
  2020-07-22 20:23     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2020-07-22 15:27 UTC (permalink / raw)
  To: David Miller; +Cc: wangxiongfeng2, kuba, netdev, linux-kernel

On Tue, 21 Jul 2020 15:36:32 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
> Date: Tue, 21 Jul 2020 15:02:57 +0800
> 
> > When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to
> > add a newline for easy reading.
> > 
> > root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout
> > 0root@syzkaller:~#
> > 
> > Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>  
> 
> Applied, thank you.

Could you add


Fixes: ccf5ff69fbbd ("net: new counter for tx_timeout errors in sysfs")
Cc: david.decotigny@google.com

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

* Re: [PATCH v2] net-sysfs: add a newline when printing 'tx_timeout' by sysfs
  2020-07-22 15:27   ` Stephen Hemminger
@ 2020-07-22 20:23     ` David Miller
  2020-07-22 20:46       ` Joe Perches
  2020-07-22 21:27       ` Stephen Hemminger
  0 siblings, 2 replies; 6+ messages in thread
From: David Miller @ 2020-07-22 20:23 UTC (permalink / raw)
  To: stephen; +Cc: wangxiongfeng2, kuba, netdev, linux-kernel

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jul 2020 08:27:41 -0700

> On Tue, 21 Jul 2020 15:36:32 -0700 (PDT)
> David Miller <davem@davemloft.net> wrote:
> 
>> From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
>> Date: Tue, 21 Jul 2020 15:02:57 +0800
>> 
>> > When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to
>> > add a newline for easy reading.
>> > 
>> > root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout
>> > 0root@syzkaller:~#
>> > 
>> > Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>  
>> 
>> Applied, thank you.
> 
> Could you add

Stephen, of all people you should know by now that all of my commits
are %100 immutable.  So commit log changes cannot be made after I've
applied the patch, ever.

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

* Re: [PATCH v2] net-sysfs: add a newline when printing 'tx_timeout' by sysfs
  2020-07-22 20:23     ` David Miller
@ 2020-07-22 20:46       ` Joe Perches
  2020-07-22 21:27       ` Stephen Hemminger
  1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2020-07-22 20:46 UTC (permalink / raw)
  To: David Miller, stephen; +Cc: wangxiongfeng2, kuba, netdev, linux-kernel

On Wed, 2020-07-22 at 13:23 -0700, David Miller wrote:
> From: Stephen Hemminger <stephen@networkplumber.org>
> Date: Wed, 22 Jul 2020 08:27:41 -0700
> 
> > On Tue, 21 Jul 2020 15:36:32 -0700 (PDT)
> > David Miller <davem@davemloft.net> wrote:
> > 
> >> From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
> >> Date: Tue, 21 Jul 2020 15:02:57 +0800
> >> 
> >> > When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to
> >> > add a newline for easy reading.
> >> > 
> >> > root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout
> >> > 0root@syzkaller:~#
> >> > 
> >> > Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>  
> >> 
> >> Applied, thank you.
> > 
> > Could you add
> 
> Stephen, of all people you should know by now that all of my commits
> are %100 immutable.  So commit log changes cannot be made after I've
> applied the patch, ever.

Maybe it's time to use git notes?



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

* Re: [PATCH v2] net-sysfs: add a newline when printing 'tx_timeout' by sysfs
  2020-07-22 20:23     ` David Miller
  2020-07-22 20:46       ` Joe Perches
@ 2020-07-22 21:27       ` Stephen Hemminger
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2020-07-22 21:27 UTC (permalink / raw)
  To: David Miller; +Cc: wangxiongfeng2, kuba, netdev, linux-kernel

On Wed, 22 Jul 2020 13:23:11 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: Stephen Hemminger <stephen@networkplumber.org>
> Date: Wed, 22 Jul 2020 08:27:41 -0700
> 
> > On Tue, 21 Jul 2020 15:36:32 -0700 (PDT)
> > David Miller <davem@davemloft.net> wrote:
> >   
> >> From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
> >> Date: Tue, 21 Jul 2020 15:02:57 +0800
> >>   
> >> > When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to
> >> > add a newline for easy reading.
> >> > 
> >> > root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout
> >> > 0root@syzkaller:~#
> >> > 
> >> > Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>    
> >> 
> >> Applied, thank you.  
> > 
> > Could you add  
> 
> Stephen, of all people you should know by now that all of my commits
> are %100 immutable.  So commit log changes cannot be made after I've
> applied the patch, ever.

Will you send it to stable tree?
It could be added then.

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

end of thread, other threads:[~2020-07-22 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21  7:02 [PATCH v2] net-sysfs: add a newline when printing 'tx_timeout' by sysfs Xiongfeng Wang
2020-07-21 22:36 ` David Miller
2020-07-22 15:27   ` Stephen Hemminger
2020-07-22 20:23     ` David Miller
2020-07-22 20:46       ` Joe Perches
2020-07-22 21:27       ` Stephen Hemminger

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