@@ -723,6 +723,10 @@ struct ethtool_rxfh_param {
723
723
* RSS.
724
724
* @rxfh_priv_size: size of the driver private data area the core should
725
725
* allocate for an RSS context (in &struct ethtool_rxfh_context).
726
+ * @rxfh_max_context_id: maximum (exclusive) supported RSS context ID. If this
727
+ * is zero then the core may choose any (nonzero) ID, otherwise the core
728
+ * will only use IDs strictly less than this value, as the @rss_context
729
+ * argument to @create_rxfh_context and friends.
726
730
* @supported_coalesce_params: supported types of interrupt coalescing.
727
731
* @supported_ring_params: supported ring params.
728
732
* @get_drvinfo: Report driver/device information. Modern drivers no
@@ -819,6 +823,32 @@ struct ethtool_rxfh_param {
819
823
* will remain unchanged.
820
824
* Returns a negative error code or zero. An error code must be returned
821
825
* if at least one unsupported change was requested.
826
+ * @create_rxfh_context: Create a new RSS context with the specified RX flow
827
+ * hash indirection table, hash key, and hash function.
828
+ * The &struct ethtool_rxfh_context for this context is passed in @ctx;
829
+ * note that the indir table, hkey and hfunc are not yet populated as
830
+ * of this call. The driver does not need to update these; the core
831
+ * will do so if this op succeeds.
832
+ * However, if @rxfh.indir is set to %NULL, the driver must update the
833
+ * indir table in @ctx with the (default or inherited) table actually in
834
+ * use; similarly, if @rxfh.key is %NULL, @rxfh.hfunc is
835
+ * %ETH_RSS_HASH_NO_CHANGE, or @rxfh.input_xfrm is %RXH_XFRM_NO_CHANGE,
836
+ * the driver should update the corresponding information in @ctx.
837
+ * If the driver provides this method, it must also provide
838
+ * @modify_rxfh_context and @remove_rxfh_context.
839
+ * Returns a negative error code or zero.
840
+ * @modify_rxfh_context: Reconfigure the specified RSS context. Allows setting
841
+ * the contents of the RX flow hash indirection table, hash key, and/or
842
+ * hash function associated with the given context.
843
+ * Parameters which are set to %NULL or zero will remain unchanged.
844
+ * The &struct ethtool_rxfh_context for this context is passed in @ctx;
845
+ * note that it will still contain the *old* settings. The driver does
846
+ * not need to update these; the core will do so if this op succeeds.
847
+ * Returns a negative error code or zero. An error code must be returned
848
+ * if at least one unsupported change was requested.
849
+ * @remove_rxfh_context: Remove the specified RSS context.
850
+ * The &struct ethtool_rxfh_context for this context is passed in @ctx.
851
+ * Returns a negative error code or zero.
822
852
* @get_channels: Get number of channels.
823
853
* @set_channels: Set number of channels. Returns a negative error code or
824
854
* zero.
@@ -909,6 +939,7 @@ struct ethtool_ops {
909
939
u32 cap_rss_ctx_supported :1 ;
910
940
u32 cap_rss_sym_xor_supported :1 ;
911
941
u16 rxfh_priv_size ;
942
+ u32 rxfh_max_context_id ;
912
943
u32 supported_coalesce_params ;
913
944
u32 supported_ring_params ;
914
945
void (* get_drvinfo )(struct net_device * , struct ethtool_drvinfo * );
@@ -971,6 +1002,15 @@ struct ethtool_ops {
971
1002
int (* get_rxfh )(struct net_device * , struct ethtool_rxfh_param * );
972
1003
int (* set_rxfh )(struct net_device * , struct ethtool_rxfh_param * ,
973
1004
struct netlink_ext_ack * extack );
1005
+ int (* create_rxfh_context )(struct net_device * ,
1006
+ struct ethtool_rxfh_context * ctx ,
1007
+ const struct ethtool_rxfh_param * rxfh );
1008
+ int (* modify_rxfh_context )(struct net_device * ,
1009
+ struct ethtool_rxfh_context * ctx ,
1010
+ const struct ethtool_rxfh_param * rxfh );
1011
+ int (* remove_rxfh_context )(struct net_device * ,
1012
+ struct ethtool_rxfh_context * ctx ,
1013
+ u32 rss_context );
974
1014
void (* get_channels )(struct net_device * , struct ethtool_channels * );
975
1015
int (* set_channels )(struct net_device * , struct ethtool_channels * );
976
1016
int (* get_dump_flag )(struct net_device * , struct ethtool_dump * );
0 commit comments