Re: git: 5a94c2e89f6a - main - lio: use newly exposed RSS hash key API rather than ad-hoc hashing
Date: Sat, 22 Nov 2025 15:14:38 UTC
unsubscribe
> On 22 Nov 2025, at 4:31 PM, Andrew Gallatin <gallatin@FreeBSD.org> wrote:
>
> The branch main has been updated by gallatin:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=5a94c2e89f6a4fbdea49d6c3a51b5fe0154d2495
>
> commit 5a94c2e89f6a4fbdea49d6c3a51b5fe0154d2495
> Author: Andrew Gallatin <gallatin@FreeBSD.org>
> AuthorDate: 2025-11-22 14:29:34 +0000
> Commit: Andrew Gallatin <gallatin@FreeBSD.org>
> CommitDate: 2025-11-22 14:29:34 +0000
>
> lio: use newly exposed RSS hash key API rather than ad-hoc hashing
>
> Differential Revision: https://reviews.freebsd.org/D53101
> Reviewed by: zlei
> Sponsored by: Netflix
> ---
> sys/dev/liquidio/lio_main.c | 5 -----
> sys/dev/liquidio/lio_network.h | 2 --
> sys/dev/liquidio/lio_rss.c | 8 ++++----
> sys/dev/liquidio/lio_rss.h | 4 ----
> 4 files changed, 4 insertions(+), 15 deletions(-)
>
> diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c
> index 3c73a6b10eed..7b6eeb460095 100644
> --- a/sys/dev/liquidio/lio_main.c
> +++ b/sys/dev/liquidio/lio_main.c
> @@ -64,10 +64,8 @@ static int num_queues_per_pf1;
> TUNABLE_INT("hw.lio.num_queues_per_pf0", &num_queues_per_pf0);
> TUNABLE_INT("hw.lio.num_queues_per_pf1", &num_queues_per_pf1);
>
> -#ifdef RSS
> static int lio_rss = 1;
> TUNABLE_INT("hw.lio.rss", &lio_rss);
> -#endif /* RSS */
>
> /* Hardware LRO */
> unsigned int lio_hwlro = 0;
> @@ -1437,13 +1435,10 @@ lio_setup_nic_devices(struct octeon_device *octeon_dev)
> lio_set_feature(ifp, LIO_CMD_TNL_TX_CSUM_CTL,
> LIO_CMD_TXCSUM_ENABLE);
>
> -#ifdef RSS
> if (lio_rss) {
> if (lio_send_rss_param(lio))
> goto setup_nic_dev_fail;
> } else
> -#endif /* RSS */
> -
> lio_set_feature(ifp, LIO_CMD_SET_FNV,
> LIO_CMD_FNV_ENABLE);
>
> diff --git a/sys/dev/liquidio/lio_network.h b/sys/dev/liquidio/lio_network.h
> index 856cc8f7ab09..65896bf8cfa9 100644
> --- a/sys/dev/liquidio/lio_network.h
> +++ b/sys/dev/liquidio/lio_network.h
> @@ -125,9 +125,7 @@ struct lio {
> /* VLAN Filtering related */
> eventhandler_tag vlan_attach;
> eventhandler_tag vlan_detach;
> -#ifdef RSS
> struct lio_rss_params_set rss_set;
> -#endif /* RSS */
> };
>
> #define LIO_MAX_CORES 12
> diff --git a/sys/dev/liquidio/lio_rss.c b/sys/dev/liquidio/lio_rss.c
> index df10cbbe3a05..da1e18142e81 100644
> --- a/sys/dev/liquidio/lio_rss.c
> +++ b/sys/dev/liquidio/lio_rss.c
> @@ -31,8 +31,6 @@
> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> */
>
> -#ifdef RSS
> -
> #include "lio_bsd.h"
> #include "lio_common.h"
> #include "lio_droq.h"
> @@ -69,7 +67,11 @@ lio_set_rss_info(struct lio *lio)
> uint8_t queue_id;
>
> for (i = 0; i < LIO_RSS_TABLE_SZ; i++) {
> +#ifdef RSS
> queue_id = rss_get_indirection_to_bucket(i);
> +#else
> + queue_id = i;
> +#endif
> queue_id = queue_id % oct->num_oqs;
> rss_set->fw_itable[i] = queue_id;
> }
> @@ -168,5 +170,3 @@ lio_send_rss_param(struct lio *lio)
>
> return (0);
> }
> -
> -#endif /* RSS */
> diff --git a/sys/dev/liquidio/lio_rss.h b/sys/dev/liquidio/lio_rss.h
> index 8a5020d47f7e..727f08b5fb0d 100644
> --- a/sys/dev/liquidio/lio_rss.h
> +++ b/sys/dev/liquidio/lio_rss.h
> @@ -34,8 +34,6 @@
> #ifndef __LIO_RSS_H__
> #define __LIO_RSS_H__
>
> -#ifdef RSS
> -
> #include <net/rss_config.h>
> #include <netinet/in_rss.h>
>
> @@ -76,8 +74,6 @@ struct lio_rss_params_set {
>
> };
>
> -#endif /* RSS */
> -
> #define LIO_RSS_HASH_IPV4 0x100
> #define LIO_RSS_HASH_TCP_IPV4 0x200
> #define LIO_RSS_HASH_IPV6 0x400
>