2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
2025-01-18 18:05:11 -08:00
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
net: ethtool: re-order local includes
Most local #include in the ethtool command handling is out of order,
with either :
#include "netlink.h"
#include "common.h"
or even :
#include "netlink.h"
#include "common.h"
#include "bitset.h"
One of the reasons is because bitset.h s lacking definitions for
nlattr, netlink_ext_ack, ETH_GSTRING_LEN, and types such as u32, bool,
etc.
Make bitset.h standalone by including <linux/ethtool.h> for
ETH_GSTRING_LEN, and <linux/netlink.h> for nlattr, netlink_ext_ack and
the rest.
While at it, take a pass on ethnl sources to re-order the local
includes :
- put them after the global includes
- add a newline between global and local includes
- alpha-sort the local includes
One notable exception is the cmis.h include, that needs definitions from
module_fw.h. Keep them in this order for now.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20260319180555.1531386-1-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-19 19:05:54 +01:00
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 20:12:42 +08:00
|
|
|
|
2023-03-23 18:36:05 +02:00
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-05 15:07:35 -07:00
|
|
|
|
2020-10-05 15:07:36 -07:00
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-14 14:47:23 -07:00
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-23 18:36:05 +02:00
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-18 18:05:15 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 20:12:43 +08:00
|
|
|
|
2023-08-14 14:47:23 -07:00
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 20:12:42 +08:00
|
|
|
|
2022-01-27 10:42:59 -08:00
|
|
|
|
2022-02-23 00:09:12 +05:30
|
|
|
|
2026-05-08 20:54:12 +08:00
|
|
|
|
2023-02-10 16:50:16 -08:00
|
|
|
|
2026-05-08 20:54:12 +08:00
|
|
|
|
2023-03-23 18:36:05 +02:00
|
|
|
|
2025-01-14 14:28:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-27 10:42:59 -08:00
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
2023-03-23 18:36:05 +02:00
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
2022-01-27 10:42:59 -08:00
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 20:12:42 +08:00
|
|
|
|
2022-01-27 10:42:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-23 00:09:12 +05:30
|
|
|
|
|
|
|
|
|
2022-04-12 10:01:19 +08:00
|
|
|
|
2023-02-10 16:50:16 -08:00
|
|
|
|
2023-03-23 18:36:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-14 14:28:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
|
|
|
|
|
2020-10-05 15:07:35 -07:00
|
|
|
|
2020-10-05 15:07:36 -07:00
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 20:12:42 +08:00
|
|
|
|
2023-12-12 15:27:51 +01:00
|
|
|
|
|
|
|
|
|
2022-02-23 00:09:12 +05:30
|
|
|
|
2022-04-12 10:01:19 +08:00
|
|
|
|
2023-02-10 16:50:16 -08:00
|
|
|
|
2023-03-23 18:36:05 +02:00
|
|
|
|
2025-01-14 14:28:44 +00:00
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
|
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
2020-10-05 15:07:34 -07:00
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
2022-04-12 10:01:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
2022-04-12 10:01:20 +08:00
|
|
|
|
|
|
|
|
|
2023-12-12 15:27:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-14 14:28:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-12 10:01:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
2022-04-12 10:01:20 +08:00
|
|
|
|
|
|
|
|
|
2022-04-12 10:01:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
2022-04-12 10:01:19 +08:00
|
|
|
|
|
|
|
|
|
2023-02-10 16:50:16 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-23 18:36:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-02-20 18:51:40 -08:00
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
2025-02-20 18:51:40 -08:00
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-02-20 18:51:40 -08:00
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 20:12:42 +08:00
|
|
|
|
|
|
|
|
|
2023-12-12 15:27:51 +01:00
|
|
|
|
|
|
|
|
|
2022-02-23 00:09:12 +05:30
|
|
|
|
|
|
|
|
|
2022-04-12 10:01:19 +08:00
|
|
|
|
|
|
|
|
|
2023-02-10 16:50:16 -08:00
|
|
|
|
|
|
|
|
|
2023-03-23 18:36:05 +02:00
|
|
|
|
|
|
|
|
|
2025-01-14 14:28:44 +00:00
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
net: ethtool: add hds_config member in ethtool_netdev_state
When tcp-data-split is UNKNOWN mode, drivers arbitrarily handle it.
For example, bnxt_en driver automatically enables if at least one of
LRO/GRO/JUMBO is enabled.
If tcp-data-split is UNKNOWN and LRO is enabled, a driver returns
ENABLES of tcp-data-split, not UNKNOWN.
So, `ethtool -g eth0` shows tcp-data-split is enabled.
The problem is in the setting situation.
In the ethnl_set_rings(), it first calls get_ringparam() to get the
current driver's config.
At that moment, if driver's tcp-data-split config is UNKNOWN, it returns
ENABLE if LRO/GRO/JUMBO is enabled.
Then, it sets values from the user and driver's current config to
kernel_ethtool_ringparam.
Last it calls .set_ringparam().
The driver, especially bnxt_en driver receives
ETHTOOL_TCP_DATA_SPLIT_ENABLED.
But it can't distinguish whether it is set by the user or just the
current config.
When user updates ring parameter, the new hds_config value is updated
and current hds_config value is stored to old_hdsconfig.
Driver's .set_ringparam() callback can distinguish a passed
tcp-data-split value is came from user explicitly.
If .set_ringparam() is failed, hds_config is rollbacked immediately.
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Link: https://patch.msgid.link/20250114142852.3364986-2-ap420073@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-01-14 14:28:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-14 14:28:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-14 14:28:44 +00:00
|
|
|
|
|
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-13 11:25:34 +00:00
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
|
|
|
|
|
2023-03-23 18:36:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-18 18:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 20:12:43 +08:00
|
|
|
|
|
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
2020-03-12 21:08:28 +01:00
|
|
|
|
2023-01-25 15:05:19 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|