Commit b48d353d authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net-ethtool-rss-add-notifications'

Jakub Kicinski says:

====================
net: ethtool: rss: add notifications

Next step on the path to moving RSS config to Netlink. With the
refactoring of the driver-facing API for ETHTOOL_GRXFH/ETHTOOL_SRXFH
out of the way we can move on to more interesting work.

Add Netlink notifications for changes in RSS configuration.

As a reminder (part) of rss-get was introduced in previous releases
when input-xfrm (symmetric hashing) was added. rss-set isn't
implemented, yet, but we can implement rss-ntf and hook it into
the changes done via the IOCTL path (same as other ethtool-nl
notifications do).

Most of the series is concerned with passing arguments to notifications.
So far none of the notifications needed to be parametrized, but RSS can
have multiple contexts per device, and since GET operates on a single
context at a time, the notification needs to also be scoped to a context.
Patches 2-5 add support for passing arguments to notifications thru
ethtool-nl generic infra.

The notification handling itself is pretty trivial, it's mostly
hooking in the right entries into the ethool-nl op tables.

v1: https://lore.kernel.org/20250621171944.2619249-1-kuba@kernel.org
====================

Link: https://patch.msgid.link/20250623231720.3124717-1-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents bfb4fb77 4d13c6c4
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2492,3 +2492,16 @@ operations:
        attributes:
          - header
          - events
    -
      name: rss-ntf
      doc: |
        Notification for change in RSS configuration.
        For additional contexts only modifications are modified, not creation
        or removal of the contexts.
      notify: rss-get

mcast-groups:
  list:
    -
      name: monitor
      c-define-name: ethtool-mcgrp-monitor-name
+2 −1
Original line number Diff line number Diff line
@@ -281,6 +281,7 @@ Kernel to userspace:
  ``ETHTOOL_MSG_MODULE_GET_REPLY``         transceiver module parameters
  ``ETHTOOL_MSG_PSE_GET_REPLY``            PSE parameters
  ``ETHTOOL_MSG_RSS_GET_REPLY``            RSS settings
  ``ETHTOOL_MSG_RSS_NTF``                  RSS settings
  ``ETHTOOL_MSG_PLCA_GET_CFG_REPLY``       PLCA RS parameters
  ``ETHTOOL_MSG_PLCA_GET_STATUS_REPLY``    PLCA RS status
  ``ETHTOOL_MSG_PLCA_NTF``                 PLCA RS parameters
@@ -2450,7 +2451,7 @@ are netlink only.
  ``ETHTOOL_SRXNTUPLE``               n/a
  ``ETHTOOL_GRXNTUPLE``               n/a
  ``ETHTOOL_GSSET_INFO``              ``ETHTOOL_MSG_STRSET_GET``
  ``ETHTOOL_GRXFHINDIR``              n/a
  ``ETHTOOL_GRXFHINDIR``              ``ETHTOOL_MSG_RSS_GET``
  ``ETHTOOL_SRXFHINDIR``              n/a
  ``ETHTOOL_GFEATURES``               ``ETHTOOL_MSG_FEATURES_GET``
  ``ETHTOOL_SFEATURES``               ``ETHTOOL_MSG_FEATURES_SET``
+2 −3
Original line number Diff line number Diff line
@@ -5138,10 +5138,9 @@ void netdev_bonding_info_change(struct net_device *dev,
				struct netdev_bonding_info *bonding_info);

#if IS_ENABLED(CONFIG_ETHTOOL_NETLINK)
void ethtool_notify(struct net_device *dev, unsigned int cmd, const void *data);
void ethtool_notify(struct net_device *dev, unsigned int cmd);
#else
static inline void ethtool_notify(struct net_device *dev, unsigned int cmd,
				  const void *data)
static inline void ethtool_notify(struct net_device *dev, unsigned int cmd)
{
}
#endif
+0 −2
Original line number Diff line number Diff line
@@ -208,6 +208,4 @@ enum {
	ETHTOOL_A_STATS_PHY_MAX = (__ETHTOOL_A_STATS_PHY_CNT - 1)
};

#define ETHTOOL_MCGRP_MONITOR_NAME "monitor"

#endif /* _UAPI_LINUX_ETHTOOL_NETLINK_H_ */
+3 −0
Original line number Diff line number Diff line
@@ -862,9 +862,12 @@ enum {
	ETHTOOL_MSG_TSCONFIG_GET_REPLY,
	ETHTOOL_MSG_TSCONFIG_SET_REPLY,
	ETHTOOL_MSG_PSE_NTF,
	ETHTOOL_MSG_RSS_NTF,

	__ETHTOOL_MSG_KERNEL_CNT,
	ETHTOOL_MSG_KERNEL_MAX = (__ETHTOOL_MSG_KERNEL_CNT - 1)
};

#define ETHTOOL_MCGRP_MONITOR_NAME	"monitor"

#endif /* _UAPI_LINUX_ETHTOOL_NETLINK_GENERATED_H */
Loading