Re: [PATCH net v4 1/2] net: sched: fix packet stuck problem for lockless qdisc

2021-04-20 Thread Michal Kubecek
On Tue, Apr 20, 2021 at 01:55:03AM +0200, Michal Kubecek wrote: > On Mon, Apr 19, 2021 at 05:29:46PM +0200, Michal Kubecek wrote: > > > > As pointed out in the discussion on v3, this patch may result in > > significantly higher CPU consumption with multiple threads competi

Re: [PATCH net v4 1/2] net: sched: fix packet stuck problem for lockless qdisc

2021-04-19 Thread Michal Kubecek
On Mon, Apr 19, 2021 at 05:29:46PM +0200, Michal Kubecek wrote: > > As pointed out in the discussion on v3, this patch may result in > significantly higher CPU consumption with multiple threads competing on > a saturated outgoing device. I missed this submission so that I haven't

Re: [PATCH net v4 1/2] net: sched: fix packet stuck problem for lockless qdisc

2021-04-19 Thread Michal Kubecek
On Fri, Apr 16, 2021 at 09:16:48AM +0800, Yunsheng Lin wrote: > Lockless qdisc has below concurrent problem: > cpu0 cpu1 > . . > q->enqueue . > . . > qdisc_run_begin() . > . . > d

Re: [Linuxarm] Re: [PATCH net v3] net: sched: fix packet stuck problem for lockless qdisc

2021-04-19 Thread Michal Kubecek
On Mon, Apr 19, 2021 at 08:21:38PM +0800, Yunsheng Lin wrote: > On 2021/4/19 10:04, Yunsheng Lin wrote: > > On 2021/4/19 6:59, Michal Kubecek wrote: > >> I tried this patch o top of 5.12-rc7 with real devices. I used two > >> machines with 10Gb/s Intel ixgbe NICs, sender

Re: [PATCH net v3] net: sched: fix packet stuck problem for lockless qdisc

2021-04-19 Thread Michal Kubecek
On Mon, Apr 19, 2021 at 10:04:27AM +0800, Yunsheng Lin wrote: > > > > I tried this patch o top of 5.12-rc7 with real devices. I used two > > machines with 10Gb/s Intel ixgbe NICs, sender has 16 CPUs (2 8-core CPUs > > with HT disabled) and 16 Rx/Tx queues, receiver has 48 CPUs (2 12-core > > CPUs

Re: [PATCH net v3] net: sched: fix packet stuck problem for lockless qdisc

2021-04-18 Thread Michal Kubecek
On Thu, Mar 25, 2021 at 11:13:11AM +0800, Yunsheng Lin wrote: > Lockless qdisc has below concurrent problem: > cpu0 cpu1 > . . > q->enqueue . > . . > qdisc_run_begin() . > . . > d

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Michal Kubecek
On Sat, Apr 17, 2021 at 12:18:08PM -0700, Jakub Kicinski wrote: > On Sat, 17 Apr 2021 12:15:20 -0700 Jakub Kicinski wrote: > > On Sat, 17 Apr 2021 21:53:40 +0300 Ido Schimmel wrote: > > > On Sat, Apr 17, 2021 at 11:13:51AM -0700, Jakub Kicinski wrote: > > > > On Sat, 17 Apr 2021 10:57:42 -0700 Ja

Re: [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops

2021-04-06 Thread Michal Kubecek
.tx_lpi_enabled, .tx_lpi_timer value is interpreted as a number, not a logical value (those two are also __u32). But I don't think it's necessary to resubmit. Reviewed-by: Michal Kubecek > Fixes: fd77be7bd43c ("ethtool: set EEE settings with EEE_SET request") > Cc: # 5.10.x &

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2021-04-06 Thread Michal Kubecek
On Tue, Apr 06, 2021 at 10:46:29AM +0800, Yunsheng Lin wrote: > On 2021/4/6 9:49, Cong Wang wrote: > > On Sat, Apr 3, 2021 at 5:23 AM Jiri Kosina wrote: > >> > >> I am still planning to have Yunsheng Lin's (CCing) fix [1] tested in the > >> coming days. If it works, then we can consider proceeding

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2021-04-06 Thread Michal Kubecek
On Tue, Apr 06, 2021 at 08:55:41AM +0800, Yunsheng Lin wrote: > > Hi, Jiri > Do you have a reproducer that can be shared here? > With reproducer, I can debug and test it myself too. I'm afraid we are not aware of a simple reproducer. As mentioned in the original discussion, the race window is ext

Re: [RFC PATCH V3 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-18 Thread Michal Kubecek
On Thu, Mar 18, 2021 at 02:03:02PM +0100, Andrew Lunn wrote: > On Mon, Mar 15, 2021 at 07:12:39PM +0200, Moshe Shemesh wrote: > > > > +EEPROM_DATA > > +=== > > + > > +Fetch module EEPROM data dump. > > + > > +Request contents: > > + > > + = == ==

Re: [PATCH net] ethtool: fix the check logic of at least one channel for RX/TX

2021-02-23 Thread Michal Kubecek
On Tue, Feb 23, 2021 at 05:02:06PM -0800, Jakub Kicinski wrote: > On Wed, 24 Feb 2021 01:32:51 +0100 Michal Kubecek wrote: > > On Tue, Feb 23, 2021 at 02:24:40PM +0100, Simon Horman wrote: > > > From: Yinjun Zhang > > > > > > The command "ethtool -L

Re: [PATCH net] ethtool: fix the check logic of at least one channel for RX/TX

2021-02-23 Thread Michal Kubecek
] > are NULL in this case when recent ethtool is used. > > Tested using ethtool v5.10. > > Fixes: 7be92514b99c ("ethtool: check if there is at least one channel for > TX/RX in the core") > Signed-off-by: Yinjun Zhang > Signed-off-by: Simon Horman > Signed-of

Re: [PATCH net] ethtool: fix the check logic of at least one channel for RX/TX

2021-02-23 Thread Michal Kubecek
On Tue, Feb 23, 2021 at 09:01:06AM -0800, Jakub Kicinski wrote: > On Tue, 23 Feb 2021 14:24:40 +0100 Simon Horman wrote: > > From: Yinjun Zhang > > > > The command "ethtool -L combined 0" may clean the RX/TX channel > > count and skip the error path, since the attrs > > tb[ETHTOOL_A_CHANNELS_RX_

[PATCH ethtool] ioctl: less confusing error message for master-slave parameter

2021-02-21 Thread Michal Kubecek
eported-by: Bruce LIU Signed-off-by: Michal Kubecek --- ethtool.c | 12 1 file changed, 12 insertions(+) diff --git a/ethtool.c b/ethtool.c index fb90e9e456b9..15e9d34831b3 100644 --- a/ethtool.c +++ b/ethtool.c @@ -72,6 +72,16 @@ static void exit_bad_args(void) exit(1); } +s

Re: [PATCH ethtool v3 0/5] Extend uAPI with lanes parameter

2021-02-14 Thread Michal Kubecek
On Wed, Feb 10, 2021 at 03:48:35PM +0200, Danielle Ratson wrote: > Currently, there is no way of knowing how many lanes will be use to > achieve a wanted speed. > For example, 100G speed can be achieved using: 2X50 or 4X25. > > In order to solve that, extend ethtool uAPI with lanes as a new link >

Re: [PATCH ethtool v2 1/5] ethtool: Extend ethtool link modes settings uAPI with lanes

2021-02-10 Thread Michal Kubecek
On Wed, Feb 10, 2021 at 12:06:04PM +, Danielle Ratson wrote: > > When updating the UAPI header copies, please do it in a separate > > commit which updates the whole uapi/ subdirectory to the state of a > > specific kernel commit. You can use the script at > > > > https://www.kernel.org/pub/s

Re: [PATCH ethtool v2 0/5] Extend uAPI with lanes parameter

2021-02-09 Thread Michal Kubecek
On Tue, Feb 02, 2021 at 08:25:08PM +0200, Danielle Ratson wrote: > Currently, there is no way of knowing how many lanes will be use to > achieve a wanted speed. > For example, 100G speed can be achieved using: 2X50 or 4X25. > > In order to solve that, extend ethtool uAPI with lanes as a new link >

Re: [PATCH ethtool v2 1/5] ethtool: Extend ethtool link modes settings uAPI with lanes

2021-02-09 Thread Michal Kubecek
On Tue, Feb 02, 2021 at 08:25:09PM +0200, Danielle Ratson wrote: > Add ETHTOOL_A_LINKMODES_LANES, expand ethtool_link_settings with > lanes attribute and define valid lanes in order to support a new > lanes-selector. > > Signed-off-by: Danielle Ratson > --- When updating the UAPI header copies,

Re: [PATCH ethtool v2 2/5] netlink: settings: Add netlink support for lanes parameter

2021-02-09 Thread Michal Kubecek
On Tue, Feb 02, 2021 at 08:25:10PM +0200, Danielle Ratson wrote: > Add support for "ethtool -s lanes N ..." for setting a specific > number of lanes. > > Signed-off-by: Danielle Ratson > Reviewed-by: Jiri Pirko > --- > ethtool.c | 1 + > netlink/settings.c | 8 > 2 files chan

Re: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-01-28 Thread Michal Kubecek
> ; Andrew Lunn ; f.faine...@gmail.com; > > Michal Kubecek ; mlxsw > > ; Ido Schimmel > > Subject: Re: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead > > of speed and duplex parameters > > > > For one thing, it's cleaner if the driver

Re: [PATCH ethtool] Fix help message for master-slave option

2021-01-24 Thread Michal Kubecek
On Wed, Jan 20, 2021 at 09:21:22PM +0900, Yuusuke Ashizuka wrote: > Fixes: 558f7cc33daf ("netlink: add master/slave configuration support") > Signed-off-by: Yuusuke Ashizuka Applied, thank you. Michal > --- > ethtool.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/e

Re: [PATCH iproute2] iplink: work around rtattr length limits for IFLA_VFINFO_LIST

2021-01-18 Thread Michal Kubecek
On Mon, Jan 18, 2021 at 10:20:35AM -0800, Edwin Peer wrote: > On Mon, Jan 18, 2021 at 9:49 AM David Ahern wrote: > > > Different bug, different solution required. The networking stack hits > > these kind of scalability problems from time to time with original > > uapis, so workarounds are needed.

Re: [PATCH iproute2] iplink: work around rtattr length limits for IFLA_VFINFO_LIST

2021-01-16 Thread Michal Kubecek
On Fri, Jan 15, 2021 at 03:53:25PM -0800, Jakub Kicinski wrote: > On Fri, 15 Jan 2021 14:59:50 -0800 Edwin Peer wrote: > > The maximum possible length of an RTNL attribute is 64KB, but the > > nested VFINFO list exceeds this for more than about 220 VFs (each VF > > consumes approximately 300 bytes,

regression in iwlwifi: page fault in iwl_dbg_tlv_alloc_region() (commit ba8f6f4ae254)

2020-12-28 Thread Michal Kubecek
FYI, there is a regression in iwlwifi driver caused by commit ba8f6f4ae254 ("iwlwifi: dbg: add dumping special device memory") reported at https://bugzilla.kernel.org/show_bug.cgi?id=210733 https://bugzilla.suse.com/show_bug.cgi?id=1180344 The problem seems to be an attempt to write terminati

Re: "ethtool" missing "master-slave" args in "do_sset" function.[TEXT/PLAIN]

2020-12-27 Thread Michal Kubecek
On Sun, Dec 27, 2020 at 12:34:09PM +0800, Bruce LIU wrote: > Hi Michal Kubecek and Network dev team, > > Good day! Hope you are doing well. > This is Bruce from China, and please allow me to cc Rudy from Cisco Systems > in China team. > > We are facing a weird behavio

ethtool 5.10 released

2020-12-16 Thread Michal Kubecek
Hello, ethtool 5.10 has been released. Home page: https://www.kernel.org/pub/software/network/ethtool/ Download link: https://www.kernel.org/pub/software/network/ethtool/ethtool-5.10.tar.xz Release notes: * Feature: infrastructure for JSON output * Feature: separate FLAGS in -h

Re: [PATCH net] ethtool: fix error paths in ethnl_set_channels()

2020-12-15 Thread Michal Kubecek
On Tue, Dec 15, 2020 at 10:08:10AM +0100, Ivan Vecera wrote: > Fix two error paths in ethnl_set_channels() to avoid lock-up caused > but unreleased RTNL. > > Fixes: e19c591eafad ("ethtool: set device channel counts with CHANNELS_SET > request") > Cc: Michal Kub

[PATCH net] ethtool: fix string set id check

2020-12-14 Thread Michal Kubecek
tring sets with STRSET_GET request") Reported-by: syzbot+96523fb438937cd01...@syzkaller.appspotmail.com Signed-off-by: Michal Kubecek --- net/ethtool/strset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c index 0baad0ce1832..c3

Re: [PATCH ethtool] ethtool: do_sset return correct value on fail

2020-12-14 Thread Michal Kubecek
On Sun, Dec 13, 2020 at 04:25:03PM +0200, Tariq Toukan wrote: > From: Roy Novich > > The return value for do_sset was constant and returned 0. > This value is misleading when returned on operation failure. > Changed return value to the correct function err status. > > Fixes: 32c8037055f5 ("Initi

[PATCH net] ethtool: fix stack overflow in ethnl_parse_bitset()

2020-12-08 Thread Michal Kubecek
recognize), we also need to cap change_bits to nbits so that we don't try to write past the prepared bitmaps. Fixes: 88db6d1e4f62 ("ethtool: add ethnl_parse_bitset() helper") Reported-by: syzbot+9d39fa49d4df294aa...@syzkaller.appspotmail.com Signed-off-by: Michal Kubecek --- net/e

Re: [PATCH net-next v1 1/9] ethtool: Add support for configuring frame preemption

2020-12-07 Thread Michal Kubecek
On Mon, Dec 07, 2020 at 02:11:48PM -0800, Vinicius Costa Gomes wrote: > Jakub Kicinski writes: > >> + * @min_frag_size_mult: Minimum size for all non-final fragment size, > >> + * expressed in terms of X in '(1 + X)*64 + 4' > > > > Is this way of expressing the min frag size from the standard? > >

Re: [PATCH ethtool v2] Improve error message when SFP module is missing

2020-12-06 Thread Michal Kubecek
On Wed, Dec 02, 2020 at 07:22:14PM +0200, Baruch Siach wrote: > ETHTOOL_GMODULEINFO request success indicates that SFP cage is present. > Failure of ETHTOOL_GMODULEEEPROM is most likely because SFP module is > not plugged in. Add an indication to the user as to what might be the > reason for the fa

Re: LRO: creating vlan subports affects parent port's LRO settings

2020-12-06 Thread Michal Kubecek
On Sat, Dec 05, 2020 at 07:04:06PM -0500, Jarod Wilson wrote: > On Mon, Nov 23, 2020 at 7:27 PM Jakub Kicinski wrote: > > > > On Thu, 19 Nov 2020 20:37:27 -0500 Limin Wang wrote: > > > Under relatively recent kernels (v4.4+), creating a vlan subport on a > > > LRO supported parent NIC may turn LRO

Re: [PATCH v2] net/af_unix: don't create a path for a binded socket

2020-12-01 Thread Michal Kubecek
On Mon, Nov 30, 2020 at 05:30:00PM -0800, Jakub Kicinski wrote: > On Mon, 30 Nov 2020 16:27:47 +0300 Denis Kirjanov wrote: > > in the case of the socket which is bound to an adress ^ address > > there is no sense to create a path in the next attem

Re: [PATCH iproute2-next 0/5] iproute2: add libbpf support

2020-11-30 Thread Michal Kubecek
dn't go in right now in the > development cycle anyway, all features for 5.10 had to be in linux-next > before 5.9 was released. >From the context, I believe Stephen meant merging into iproute2 5.10, not kernel. Michal Kubecek

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-11-26 Thread Michal Kubecek
On Wed, Nov 25, 2020 at 10:35:35AM +, Danielle Ratson wrote: > > > What do you think of passing the link modes you have suggested as a > > > bitmask, similar to "supported", that contains only one positive bit? > > > Something like that: > > Hi Michal, > > Thanks for your response. > > Actua

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-11-24 Thread Michal Kubecek
On Mon, Nov 23, 2020 at 09:47:53AM +, Danielle Ratson wrote: > > > > -Original Message- > > From: Michal Kubecek > > Sent: Thursday, October 22, 2020 7:28 PM > > To: Danielle Ratson > > Cc: Jiri Pirko ; Andrew Lunn ; Jakub > > Kicinski ;

Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-20 Thread Michal Kubecek
On Fri, Nov 20, 2020 at 02:39:38PM +0100, Andrew Lunn wrote: > On Fri, Nov 20, 2020 at 08:23:22AM +0100, Michal Kubecek wrote: > > On Fri, Nov 20, 2020 at 10:59:59AM +0800, tanhuazhong wrote: > > > On 2020/11/20 6:02, Michal Kubecek wrote: > > > > > > > >

Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-19 Thread Michal Kubecek
On Fri, Nov 20, 2020 at 10:59:59AM +0800, tanhuazhong wrote: > On 2020/11/20 6:02, Michal Kubecek wrote: > > > > We could use a similar approach as struct ethtool_link_ksettings, e.g. > > > > struct kernel_ethtool_coalesce { > >

Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-19 Thread Michal Kubecek
On Thu, Nov 19, 2020 at 04:56:42PM +0800, tanhuazhong wrote: > On 2020/11/19 12:15, Andrew Lunn wrote: > > > diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h > > > index 9ca87bc..afd8de2 100644 > > > --- a/include/uapi/linux/ethtool.h > > > +++ b/include/uapi/linux/ethtool.h

Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-19 Thread Michal Kubecek
On Thu, Nov 19, 2020 at 05:15:57AM +0100, Andrew Lunn wrote: > > diff --git a/include/uapi/linux/ethtool_netlink.h > > b/include/uapi/linux/ethtool_netlink.h > > index e2bf36e..e3458d9 100644 > > --- a/include/uapi/linux/ethtool_netlink.h > > +++ b/include/uapi/linux/ethtool_netlink.h > > @@ -366,

Re: [PATCH net-next v4 5/6] selftests: refactor get_netdev_name function

2020-11-17 Thread Michal Kubecek
On Tue, Nov 17, 2020 at 04:20:14PM +0100, Antonio Cardace wrote: > As pointed out by Michal Kubecek, getting the name > with the previous approach was racy, it's better > and easier to get the name of the device with this > patch's approach. > > Essentialy the fu

Re: [PATCH net-next v3 3/4] selftests: extract common functions in ethtool-common.sh

2020-11-16 Thread Michal Kubecek
On Sat, Nov 14, 2020 at 12:16:54AM +0100, Antonio Cardace wrote: > Factor out some useful functions so that they can be reused > by other ethtool-netdevsim scripts. > > Signed-off-by: Antonio Cardace Reviewed-by: Michal Kubecek Just one comment: [...] > +function

Re: [PATCH net-next v3 2/4] netdevsim: support ethtool ring and coalesce settings

2020-11-16 Thread Michal Kubecek
On Sat, Nov 14, 2020 at 12:16:53AM +0100, Antonio Cardace wrote: > Add ethtool ring and coalesce settings support for testing. > > Signed-off-by: Antonio Cardace Reviewed-by: Michal Kubecek signature.asc Description: PGP signature

Re: [PATCH net-next v3 1/4] ethtool: add ETHTOOL_COALESCE_ALL_PARAMS define

2020-11-16 Thread Michal Kubecek
On Sat, Nov 14, 2020 at 12:16:52AM +0100, Antonio Cardace wrote: > This bitmask represents all existing coalesce parameters. > > Signed-off-by: Antonio Cardace Reviewed-by: Michal Kubecek > --- > include/linux/ethtool.h | 1 + > 1 file changed, 1 insertion(+) > > di

Re: [PATCH net-next 1/1] netdevsim: support ethtool ring and coalesce settings

2020-11-13 Thread Michal Kubecek
On Thu, Nov 12, 2020 at 04:12:29PM +0100, Antonio Cardace wrote: > Add ethtool ring and coalesce settings support for testing. > > Signed-off-by: Antonio Cardace > --- > drivers/net/netdevsim/ethtool.c | 65 +++ > drivers/net/netdevsim/netdevsim.h | 9 - > 2 fi

Re: [PATCH v2 net] ethtool: netlink: add missing netdev_features_change() call

2020-11-09 Thread Michal Kubecek
netdev features with FEATURES_SET request") > Signed-off-by: Alexander Lobakin Reviewed-by: Michal Kubecek > --- > net/ethtool/features.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ethtool/features.c b/net/ethtool/features.c > index 8e

[PATCH ethtool 1/2] netlink: do not send messages and process replies in nl_parser()

2020-11-09 Thread Michal Kubecek
. Signed-off-by: Michal Kubecek --- netlink/cable_test.c | 2 +- netlink/channels.c | 2 +- netlink/coalesce.c | 2 +- netlink/eee.c| 2 +- netlink/parser.c | 43 --- netlink/parser.h | 3 ++- netlink/pause.c | 2 +- netlink

[PATCH ethtool 0/2] netlink: improve compatibility with ioctl interface

2020-11-09 Thread Michal Kubecek
tch cleans up the parser interface; it allows nl_sset() to inspect the composed message and append an attribute to it if needed. Ido Schimmel (1): ethtool: Improve compatibility between netlink and ioctl interfaces Michal Kubecek (1): netlink: do not send messages and process replies in

[PATCH ethtool 2/2] ethtool: Improve compatibility between netlink and ioctl interfaces

2020-11-09 Thread Michal Kubecek
ransceiver: internal MDI-X: on (auto) Supports Wake-on: umbg Wake-on: d Current message level: 0x0007 (7) drv probe link Link detected: yes Signed-off-by: Ido Schimmel Signed-off-by: Michal Kubecek --- net

[PATCH ethtool 0/2] netlink: data lifetime error fixes

2020-11-09 Thread Michal Kubecek
Fixes of two data lifetime bugs found by testing with valgrind: one use after free, one memory leak. Michal Kubecek (2): netlink: fix use after free in netlink_run_handler() netlink: fix leaked instances of struct nl_socket netlink/netlink.c | 21 +++-- netlink/nlsock.c

[PATCH ethtool 1/2] netlink: fix use after free in netlink_run_handler()

2020-11-09 Thread Michal Kubecek
ecide about fallback") Signed-off-by: Michal Kubecek --- netlink/netlink.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/netlink/netlink.c b/netlink/netlink.c index f655f6ea25b7..bdd3048e 100644 --- a/netlink/netlink.c +++ b/netlink/netlink.c @@ -45

[PATCH ethtool 2/2] netlink: fix leaked instances of struct nl_socket

2020-11-09 Thread Michal Kubecek
to by struct nl_context members. Fixes: 50efb3cdd2bb ("netlink: netlink socket wrapper and helpers") Fixes: 87307c30724d ("netlink: initialize ethtool netlink socket") Fixes: 7f3585b22a4b ("netlink: add handler for permaddr (-P)") Signed-off-by: Michal K

Re: [RFC PATCH ethtool] ethtool: Improve compatibility between netlink and ioctl interfaces

2020-11-03 Thread Michal Kubecek
On Tue, Nov 03, 2020 at 04:24:30PM +0200, Ido Schimmel wrote: > > I have the changes you requested here: > https://github.com/idosch/ethtool/commit/b34d15839f2662808c566c04eda726113e20ee59 > > Do you want to integrate it with your nl_parse() rework or should I? I pushed the combined series to

Re: [RFC PATCH ethtool] ethtool: Improve compatibility between netlink and ioctl interfaces

2020-11-02 Thread Michal Kubecek
On Mon, Nov 02, 2020 at 08:40:36PM +0200, Ido Schimmel wrote: > From: Ido Schimmel > > With the ioctl interface, when autoneg is enabled, but without > specifying speed, duplex or link modes, the advertised link modes are > set to the supported link modes by the ethtool user space utility. > > T

Re: [RFC PATCH net-next v3] ethtool: Improve compatibility between netlink and ioctl interfaces

2020-10-29 Thread Michal Kubecek
On Wed, Oct 28, 2020 at 07:34:36PM +0200, Ido Schimmel wrote: > On Wed, Oct 28, 2020 at 01:53:39AM +0100, Michal Kubecek wrote: > > On Tue, Oct 27, 2020 at 02:53:05PM -0700, Jakub Kicinski wrote: > > > > > > I did not look at the legacy code but I'm confused by w

Re: [RFC PATCH net-next v3] ethtool: Improve compatibility between netlink and ioctl interfaces

2020-10-28 Thread Michal Kubecek
On Tue, Oct 27, 2020 at 02:53:05PM -0700, Jakub Kicinski wrote: > On Tue, 27 Oct 2020 16:51:14 +0200 Ido Schimmel wrote: > > From: Ido Schimmel > > > > With the ioctl interface, when autoneg is enabled, but without > > specifying speed, duplex or link modes, the advertised link modes are > > set

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-22 Thread Michal Kubecek
On Thu, Oct 22, 2020 at 06:15:48AM +, Danielle Ratson wrote: > > -Original Message- > > From: Michal Kubecek > > Sent: Wednesday, October 21, 2020 11:48 AM > > > > Ah, right, it does. But as you extend struct ethtool_link_ksettings > > and driver

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-21 Thread Michal Kubecek
On Wed, Oct 21, 2020 at 07:20:22AM +, Danielle Ratson wrote: > > -Original Message- > > From: Michal Kubecek > > Sent: Wednesday, October 21, 2020 10:08 AM > > > > On Tue, Oct 20, 2020 at 07:39:13AM +, Danielle Ratson wrote: > > > > -

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-21 Thread Michal Kubecek
On Tue, Oct 20, 2020 at 07:39:13AM +, Danielle Ratson wrote: > > -Original Message- > > From: Michal Kubecek > > Sent: Monday, October 19, 2020 4:25 PM > > > > As I said, I meant the extension suggested in my mail as independent of what > > t

[PATCH ethtool 0/4] add missing message descriptions

2020-10-19 Thread Michal Kubecek
enumerated types (shown as symbolic names rather than numeric values). Michal Kubecek (4): netlink: support u32 enumerated types in pretty printing netlink: support 64-bit attribute types in pretty printed messages netlink: add descriptions for genetlink policy dumps netlink: add message

[PATCH ethtool 1/4] netlink: support u32 enumerated types in pretty printing

2020-10-19 Thread Michal Kubecek
, numeric attribute value is shown. Signed-off-by: Michal Kubecek --- netlink/prettymsg.c | 9 + netlink/prettymsg.h | 18 -- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/netlink/prettymsg.c b/netlink/prettymsg.c index f992dcaf071f..d5d999fddfbb 100644

[PATCH ethtool 2/4] netlink: support 64-bit attribute types in pretty printed messages

2020-10-19 Thread Michal Kubecek
Add NLA_U64 (unsigned), NLA_X64 (unsigned, printed as hex) and NLA_S64 (signed) attribute types in pretty printing code. Signed-off-by: Michal Kubecek --- netlink/prettymsg.c | 10 ++ netlink/prettymsg.h | 6 ++ 2 files changed, 16 insertions(+) diff --git a/netlink/prettymsg.c b

[PATCH ethtool 3/4] netlink: add descriptions for genetlink policy dumps

2020-10-19 Thread Michal Kubecek
Add GENL_ID_CTRL message descriptions for messages and attributes used for policy dumps. Signed-off-by: Michal Kubecek --- netlink/desc-genlctrl.c | 57 + 1 file changed, 57 insertions(+) diff --git a/netlink/desc-genlctrl.c b/netlink/desc-genlctrl.c

[PATCH ethtool 4/4] netlink: add message descriptions for pause stats

2020-10-19 Thread Michal Kubecek
Add message descriptions for pretty printing of new attributes used for pause statistics. Signed-off-by: Michal Kubecek --- netlink/desc-ethtool.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/netlink/desc-ethtool.c b/netlink/desc-ethtool.c index ee8fc4796987..96291b9bdd3b 100644

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-19 Thread Michal Kubecek
On Mon, Oct 19, 2020 at 02:26:43PM +0200, Jiri Pirko wrote: > Mon, Oct 19, 2020 at 01:04:22PM CEST, mkube...@suse.cz wrote: > > > >It would be quite easy to extend the ethtool command line parser to > >allow also > > > > ethtool -s advertise ... > > > >in addition to already supported > > > > e

Re: [PATCH ethtool v3 0/7] pause frame stats

2020-10-19 Thread Michal Kubecek
On Sun, Oct 18, 2020 at 02:31:44PM -0700, Jakub Kicinski wrote: > Hi! > > Sorry about the delay from v2. Actually, I'm rather surprised you were able to get back to this so early, given the situation. > This set adds support for pause frame statistics. > > First pause frame info is extended to

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-19 Thread Michal Kubecek
On Mon, Oct 19, 2020 at 07:19:34AM +, Danielle Ratson wrote: > > -Original Message- > > From: Andrew Lunn > > Sent: Saturday, October 17, 2020 1:16 AM > > > > I'm not sure i fully understand all these different link modes, but > > i thought these 5 are all 100G using 2 lanes? So why c

Re: [PATCH] rtnetlink: fix data overflow in rtnl_calcit()

2020-10-17 Thread Michal Kubecek
On Fri, Oct 16, 2020 at 10:02:38AM +0800, zhudi wrote: > "ip addr show" command execute error when we have a physical > network card with number of VFs larger than 247. > > The return value of if_nlmsg_size() in rtnl_calcit() will exceed > range of u16 data type when any network cards has a larger

ethtool 5.9 released

2020-10-15 Thread Michal Kubecek
Hello, ethtool 5.9 has been released. Home page: https://www.kernel.org/pub/software/network/ethtool/ Download link: https://www.kernel.org/pub/software/network/ethtool/ethtool-5.9.tar.xz Release notes: * Feature: extended link state * Feature: QSFP-DD support * Feature:

[PATCH ethtool] netlink: fix allocation failure handling in dump_features()

2020-10-14 Thread Michal Kubecek
("netlink: add netlink handler for gfeatures (-k)") Reported-by: Ivan Vecera Signed-off-by: Michal Kubecek --- netlink/features.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/netlink/features.c b/netlink/features.c index 3f1240437350..2a0899e6eb04 100644 ---

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-12 Thread Michal Kubecek
On Sat, Oct 10, 2020 at 06:41:14PM +0300, Ido Schimmel wrote: > From: Danielle Ratson > > Currently, when auto negotiation is on, the user can advertise all the > linkmodes which correspond to a specific speed, but does not have a > similar selector for the number of lanes. This is significant wh

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-12 Thread Michal Kubecek
On Mon, Oct 12, 2020 at 03:33:45PM +, Danielle Ratson wrote: > > > > > +/* Lanes, 1, 2, 4 or 8. */ > > > +#define ETHTOOL_LANES_1 1 > > > +#define ETHTOOL_LANES_2 2 > > > +#define ETHTOOL_LANES_4 4 > > > +#define ETHTOOL_LANES_8

Re: [PATCH ethtool-next v2 5/6] netlink: use policy dumping to check if stats flag is supported

2020-10-12 Thread Michal Kubecek
On Tue, Oct 06, 2020 at 08:04:24AM -0700, Jakub Kicinski wrote: > Older kernels don't support statistics, to avoid retries > make use of netlink policy dumps to figure out which > flags kernel actually supports. > > Signed-off-by: Jakub Kicinski > --- [...] > +static int family_policy_cb(const st

Re: [PATCH net-next v2 0/7] ethtool: allow dumping policies to user space

2020-10-07 Thread Michal Kubecek
On Wed, Oct 07, 2020 at 11:24:37AM +0300, Leon Romanovsky wrote: > Yes, it fixed KASAN, but it we got new failure after that. > > 11:07:51 player_id: 1 shell.py:62 [LinuxEthtoolAgent] DEBUG : running > command(/opt/mellanox/ethtool/sbin/ethtool --set-channels eth2 combined 3) > with pid: 13409 >

Re: [PATCH ethtool-next v2 5/6] netlink: use policy dumping to check if stats flag is supported

2020-10-06 Thread Michal Kubecek
On Tue, Oct 06, 2020 at 10:39:13PM +0300, Ido Schimmel wrote: > On Tue, Oct 06, 2020 at 08:04:24AM -0700, Jakub Kicinski wrote: > > Older kernels don't support statistics, to avoid retries > > make use of netlink policy dumps to figure out which > > flags kernel actually supports. > > Thanks for w

Re: [PATCH net-next 5/6] netlink: add mask validation

2020-10-05 Thread Michal Kubecek
On Mon, Oct 05, 2020 at 12:34:14PM -0700, Jakub Kicinski wrote: > On Mon, 05 Oct 2020 21:25:57 +0200 Johannes Berg wrote: > > On Mon, 2020-10-05 at 12:22 -0700, Jakub Kicinski wrote: > > > > > > > + if (value & ~(u64)pt->mask) { > > > > > + NL_SET_ERR_MSG_ATTR(extack, nla, "reserve

Re: [PATCH net-next 5/6] netlink: add mask validation

2020-10-05 Thread Michal Kubecek
On Mon, Oct 05, 2020 at 09:05:23PM +0200, Johannes Berg wrote: > On Mon, 2020-10-05 at 08:57 -0700, Jakub Kicinski wrote: > > > +static int nla_validate_mask(const struct nla_policy *pt, > > +const struct nlattr *nla, > > +struct netlink_ext_ack *ext

Re: [RFC PATCH net-next v2] ethtool: Improve compatibility between netlink and ioctl interfaces

2020-10-05 Thread Michal Kubecek
On Sun, Oct 04, 2020 at 04:37:57PM +0300, Ido Schimmel wrote: > On Sun, Oct 04, 2020 at 12:46:31PM +, David Laight wrote: > > From: Ido Schimmel > > > Sent: 04 October 2020 11:17 > > > > > > With the ioctl interface, when autoneg is enabled, but without > > > specifying speed, duplex or link m

Re: [PATCH net-next v2 00/10] genetlink: support per-command policy dump

2020-10-02 Thread Michal Kubecek
On Fri, Oct 02, 2020 at 08:25:17AM -0700, Jakub Kicinski wrote: > On Fri, 02 Oct 2020 17:13:28 +0200 Johannes Berg wrote: > > I suppose, I thought you wanted to change it to have separate dump/do > > policies? Whatever you like there, I don't really care much :) > > I just want to make the uAPI fu

Re: [RFC net-next 5/9] genetlink: add a structure for dump state

2020-10-01 Thread Michal Kubecek
On Thu, Oct 01, 2020 at 09:48:31AM +0200, Johannes Berg wrote: > On Wed, 2020-09-30 at 17:05 -0700, Jakub Kicinski wrote: > > Whenever netlink dump uses more than 2 cb->args[] entries > > code gets hard to read. We're about to add more state to > > ctrl_dumppolicy() so create a structure. > > > >

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-30 Thread Michal Kubecek
On Wed, Sep 30, 2020 at 11:06:53PM +0300, Ido Schimmel wrote: > On Wed, Sep 30, 2020 at 10:59:17AM +0200, Michal Kubecek wrote: > > How about this compromise? Let's introduce a "legacy" flag which would > > allow "ethtool -s autoneg on" do what it use

Re: Genetlink per cmd policies

2020-09-30 Thread Michal Kubecek
On Wed, Sep 30, 2020 at 08:36:24PM +0200, Johannes Berg wrote: > On Wed, 2020-09-30 at 09:44 -0700, Jakub Kicinski wrote: > > > I started with a get_policy() callback, but I didn't like it much. > > Static data is much more pleasant for a client of the API IMHO. > > Yeah, true. > > > What do you

Re: Genetlink per cmd policies

2020-09-30 Thread Michal Kubecek
On Wed, Sep 30, 2020 at 08:49:55AM -0700, Jakub Kicinski wrote: > Hi! > > I'd like to be able to dump ethtool nl policies, but right now policy > dumping is only supported for "global" family policies. > > Is there any reason not to put the policy in struct genl_ops, > or just nobody got to it,

Re: ethtool/phy tunables and extack (was Re: [PATCH net-next 0/3] net: atlantic: phy tunables from mac driver)

2020-09-30 Thread Michal Kubecek
On Wed, Sep 30, 2020 at 05:16:56PM +0200, Andrew Lunn wrote: > > Another question is how to allow ethtool ops setting not only the text > > message but also the offending attribute. > > For PHY tunables, i don't think it is needed. The current API only > allows a single value to be passed. That se

ethtool/phy tunables and extack (was Re: [PATCH net-next 0/3] net: atlantic: phy tunables from mac driver)

2020-09-30 Thread Michal Kubecek
On Tue, Sep 29, 2020 at 07:04:13PM +0200, Andrew Lunn wrote: > On Tue, Sep 29, 2020 at 07:13:04PM +0300, Igor Russkikh wrote: > > This series implements phy tunables settings via MAC driver callbacks. > > > > AQC 10G devices use integrated MAC+PHY solution, where PHY is fully > > controlled > > b

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-30 Thread Michal Kubecek
On Wed, Sep 30, 2020 at 10:25:29AM +0300, Ido Schimmel wrote: > On Tue, Sep 29, 2020 at 06:44:55PM +0200, Michal Kubecek wrote: > > On Tue, Sep 29, 2020 at 07:02:47PM +0300, Ido Schimmel wrote: > > > diff --git a/net/ethtool/linkmodes.c b/net/ethtool/linkmodes.c > &

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-29 Thread Michal Kubecek
On Tue, Sep 29, 2020 at 07:02:47PM +0300, Ido Schimmel wrote: > From: Ido Schimmel > > With the ioctl interface, when autoneg is enabled, but without > specifying speed, duplex or link modes, the advertised link modes are > set to the supported link modes by the ethtool user space utility. > [..

build failure (BTFIDS) with CONFIG_NET && !CONFIG_INET

2020-09-29 Thread Michal Kubecek
Hello, our builds of s390x for zfcpdump fail since 5.9-rc1 with BTFIDS vmlinux FAILED unresolved symbol tcp_timewait_sock make[1]: *** [/home/abuild/rpmbuild/BUILD/kernel-zfcpdump-5.9.rc7/linux-5.9-rc7/Makefile:1176: vmlinux] Error 255 I believe this is caused by commit fce557bcef11 (

Re: [PATCH ethtool v3 1/3] Add missing 400000base modes for dump_link_caps

2020-09-28 Thread Michal Kubecek
On Mon, Sep 28, 2020 at 11:43:59AM -0500, Dan Murphy wrote: > Michal > > On 9/28/20 11:37 AM, Michal Kubecek wrote: > > On Mon, Sep 28, 2020 at 09:44:01AM -0500, Dan Murphy wrote: > > > Commit 63130d0b00040 ("update link mode tables") missed adding in the >

Re: [PATCH ethtool v3 1/3] Add missing 400000base modes for dump_link_caps

2020-09-28 Thread Michal Kubecek
On Mon, Sep 28, 2020 at 09:44:01AM -0500, Dan Murphy wrote: > Commit 63130d0b00040 ("update link mode tables") missed adding in the > 40base link_caps to the array. > > Signed-off-by: Dan Murphy > --- I'm sorry, I only found these patches shortly after I pushed similar update as I needed upd

Re: [PATCH ethtool 1/2] netlink: return -ENOMEM when calloc fails

2020-09-28 Thread Michal Kubecek
On Thu, Sep 24, 2020 at 09:27:57PM +0200, Ivan Vecera wrote: > Fixes: f2c17e107900 ("netlink: add netlink handler for gfeatures (-k)") > > Cc: Michal Kubecek > Signed-off-by: Ivan Vecera > --- > netlink/features.c | 9 + > 1 file changed, 5 insertions(+),

Re: [PATCH ethtool 2/2] netlink: fix copy-paste error in rtm_link_summary()

2020-09-28 Thread Michal Kubecek
On Fri, Sep 25, 2020 at 09:05:27AM +0200, Ivan Vecera wrote: > Fixes: bdfffab54933 ("netlink: message format descriptions for rtnetlink") > > Cc: Michal Kubecek > Signed-off-by: Ivan Vecera > --- Applied, thank you. Michal > netlink/prettymsg.c | 2 +- > 1

Re: [PATCH ethtool 1/2] fix memory leaks in do_sfeatures()

2020-09-28 Thread Michal Kubecek
to use ETHTOOL_{G,S}FEATURES") > > Cc: Michal Kubecek > Signed-off-by: Ivan Vecera > --- Applied, thank you. Michal signature.asc Description: PGP signature

Re: [PATCH ethtool 2/2] netlink: fix memory leak

2020-09-28 Thread Michal Kubecek
On Thu, Sep 24, 2020 at 09:27:58PM +0200, Ivan Vecera wrote: > Potentially allocated memory allocated for mask is not freed when > the allocation for value fails. > > Fixes: 81a30f416ec7 ("netlink: add bitset command line parser handlers") > > Cc: Michal Kubecek

Re: [PATCH v3 ethtool] bnxt: Add Broadcom driver support.

2020-09-28 Thread Michal Kubecek
On Tue, Sep 22, 2020 at 03:43:02PM +0530, Vasundhara Volam wrote: > This patch adds the initial support for parsing registers dumped > by the Broadcom driver. Currently, PXP and PCIe registers are > parsed. > > Reviewed-by: Andy Gospodarek > Reviewed-by: Edwin Peer > Signed-off-by: Vasundhara Vo

Re: [PATCH ethtool v2 2/2] Update link mode tables for fiber

2020-09-25 Thread Michal Kubecek
On Thu, Sep 24, 2020 at 12:56:10PM -0500, Dan Murphy wrote: > Update the link mode tables to include 100base Fx Full and Half duplex > modes. > > Signed-off-by: Dan Murphy > --- > ethtool.c | 6 ++ > netlink/settings.c | 2 ++ > 2 files changed, 8 insertions(+) > > diff --git a/eth

Re: [PATCH ethtool-next 5/5] pause: add support for dumping statistics

2020-09-23 Thread Michal Kubecek
On Tue, Sep 15, 2020 at 04:52:59PM -0700, Jakub Kicinski wrote: > Add support for requesting pause frame stats from the kernel. > > # ./ethtool -I -a eth0 > Pause parameters for eth0: > Autonegotiate:on > RX: on > TX: on > Statistics: > tx_pause_frames: 1 > rx_paus

Re: [PATCH net-next 2/5] bonding: rename slave to link where possible

2020-09-22 Thread Michal Kubecek
On Tue, Sep 22, 2020 at 09:37:28AM -0400, Jarod Wilson wrote: > Getting rid of as much usage of "slave" as we can here, without breaking > any user-facing API. > > Cc: Jay Vosburgh > Cc: Veaceslav Falico > Cc: Andy Gospodarek > Cc: "David S. Miller" > Cc: Jakub Kicinski > Cc: Thomas Davis >

  1   2   3   4   5   6   7   >