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] [day] [month] [year] [list]
Date: Thu, 12 Oct 2023 15:42:26 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Pawel Chmielewski <pawel.chmielewski@...el.com>
Cc: netdev@...r.kernel.org, intel-wired-lan@...ts.osuosl.org,
	andrew@...n.ch, aelior@...vell.com, manishc@...vell.com,
	horms@...nel.org, vladimir.oltean@....com, pabeni@...hat.com,
	davem@...emloft.net, edumazet@...gle.com, jdamato@...tly.com,
	d-tatianin@...dex-team.ru, kuba@...nel.org,
	Paul Greenwalt <paul.greenwalt@...el.com>,
	Jacob Keller <jacob.e.keller@...el.com>,
	Przemek Kitszel <przemyslaw.kitszel@...el.com>
Subject: Re: [PATCH net-next v4 1/2] ethtool: Add forced speed to supported
 link modes maps

Thu, Oct 12, 2023 at 03:33:15PM CEST, pawel.chmielewski@...el.com wrote:
>> >diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
>> 
>> Why you put this into ioctl.c?
>> 
>> Can't this be put into include/linux/linkmode.h as a static helper as
>> well?
>
>I'm a little bit confused, include/linux/linkmode.h doesn't contain
>similar ethtool helpers.. Did you maybe meant ethtool.h?

I just looked there linkmode_set_bit_array is. ethtool.h might be the
place.


> 
>> 
>> >index 0b0ce4f81c01..34507691fc9d 100644
>> >--- a/net/ethtool/ioctl.c
>> >+++ b/net/ethtool/ioctl.c
>> >@@ -3388,3 +3388,16 @@ void ethtool_rx_flow_rule_destroy(struct ethtool_rx_flow_rule *flow)
>> > 	kfree(flow);
>> > }
>> > EXPORT_SYMBOL(ethtool_rx_flow_rule_destroy);
>> >+
>> >+void ethtool_forced_speed_maps_init(struct ethtool_forced_speed_map *maps,
>> >+				    u32 size)
>> >+{
>> >+	for (u32 i = 0; i < size; i++) {
>> >+		struct ethtool_forced_speed_map *map = &maps[i];
>> >+
>> >+		linkmode_set_bit_array(map->cap_arr, map->arr_size, map->caps);
>> >+		map->cap_arr = NULL;
>> >+		map->arr_size = 0;
>> >+	}
>> >+}
>> >+EXPORT_SYMBOL(ethtool_forced_speed_maps_init);
>> >-- 
>> >2.37.3
>> >
>> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ