lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA1PR11MB6266964963DBC6242C5CC6DEE4652@IA1PR11MB6266.namprd11.prod.outlook.com>
Date: Fri, 13 Sep 2024 22:43:19 +0000
From: "Mogilappagari, Sudheer" <sudheer.mogilappagari@...el.com>
To: Vladimir Oltean <vladimir.oltean@....com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
CC: Michal Kubecek <mkubecek@...e.cz>, Jakub Kicinski <kuba@...nel.org>
Subject: RE: [PATCH ethtool] netlink: rss: retrieve ring count using
 ETHTOOL_GRXRINGS ioctl



> -----Original Message-----
> From: Vladimir Oltean <vladimir.oltean@....com>
> Sent: Friday, September 13, 2024 2:38 AM
> To: netdev@...r.kernel.org
> Cc: Michal Kubecek <mkubecek@...e.cz>; Jakub Kicinski
> <kuba@...nel.org>; Mogilappagari, Sudheer
> <sudheer.mogilappagari@...el.com>
> Subject: [PATCH ethtool] netlink: rss: retrieve ring count using
> ETHTOOL_GRXRINGS ioctl
> 
> Several drivers regressed when ethtool --show-rxfh was converted from
> ioctl to netlink. This is because ETHTOOL_GRXRINGS was converted to
> ETHTOOL_MSG_CHANNELS_GET, which is semantically equivalent to
> ETHTOOL_GCHANNELS but different from ETHTOOL_GRXRINGS. Drivers which
> implement ETHTOOL_GRXRINGS do not necessarily implement
> ETHTOOL_GCHANNELS or its netlink equivalent.
> 
> According to the man page, "A channel is an IRQ and the set of queues
> that can trigger that IRQ.", which is different from the definition of
> a queue/ring. So we shouldn't be attempting to query the # of rings for
> the ioctl variant, but the # of channels for the netlink variant
> anyway.
> 
> Reimplement the args->num_rings retrieval as in do_grxfh(), aka using
> the ETHTOOL_GRXRINGS ioctl.
> 


> -	if (tb[ETHTOOL_A_CHANNELS_RX_COUNT])
> -		args->num_rings +=
> mnl_attr_get_u32(tb[ETHTOOL_A_CHANNELS_RX_COUNT]);
> -	return MNL_CB_OK;
> +	ret = ioctl_init(ctx, false);
> +	if (ret)
> +		return ret;
> +
> +	ret = send_ioctl(ctx, &ring_count);
> +	if (ret) {
> +		perror("Cannot get RX ring count");
> +		return ret;
> +	}
> +
> +	args->num_rings = (u32)ring_count.data;
> +
> +	return 0;
>  }
> 

Hi Vladimir, my understanding is ioctls are not used
in ethtool netlink path. Can we use ETHTOOL_MSG_RINGS_GET 
(tb[ETHTOOL_A_RINGS_RX] member) instead ? 

Couldn't work on this since I was on sabbatical till this week.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ