From nobody Wed Nov 13 15:49:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpSQr5wvhz5dl1w; Wed, 13 Nov 2024 15:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpSQr5Nr3z4yTQ; Wed, 13 Nov 2024 15:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731512996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByoT8uxA1Gr71/kbvEDlGlkuEaClRFzlyJRVkElMbt4=; b=DcjHu8a5hY8EYc40CbBd5yxRpiPqPDAJPPkafvBBR7xwSRaLIfSBuoqqfJzqqgqnsCuZB1 1lcTlXCGZrwTvFw/wRhwFUVTRzCzPGY1Yl8ZcHlo/R2p33lv6Ur7cb+KNuVCD8bAGb2QXM 6TFc1xb5NDKml144PkmyCumJ05q+DuwuyNIGppanXtiKPBLrla7dWu5ZdccqcUq5QlFqWP hm8mi9VoiTtLVSSEMaJ8A9sfs5oIibcOZshMwdDFAHJqQKwcvP2mtIQqtVTy+kDpP3jnEC iCnDW8D6HSrcJekLfmNXQ4uisRPvz3uNmRxinrdTVVRyE1MBnMAHJo/kN/VA2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731512996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByoT8uxA1Gr71/kbvEDlGlkuEaClRFzlyJRVkElMbt4=; b=KFTiMHvWuxtEofl+kFWXAwHeJ8cxWWsUW4UlWmR5/CPaj6vof/Ra/oNxm+V5tKuVrw0yv+ 1tu09gZyLFJ8vX7GzEarsg1XDR3s5wLcr5+ghWiiD4XzVguPNE4yg8eKNfc4sq+Sj07dRK cNPgnT8HVuk6gprsbvLJEiyo38GWd/3ftnTB8YUsdKCqunYP9MA9hviFStcDOkgdkjhk8E gDnWwAAAdhz+xaemB5ux5Uu/3hMMeI4tnDGmfNHnDHVoyZ9Nq0vk9aiBhMLmfllh5DsHgH Jj9wiP2bf3W9YiFA3h4FQhHpt2L0PD49/6TnVL0hYfmfGSjhAFecoCk280Z0Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731512996; a=rsa-sha256; cv=none; b=m//7wCB6ByXDdfF+1tD3kZLg2rlCuj6r7vp6JqSwevhLuBlDk+L52iqk5uMjJA5wBeg45q z5idSmjWr3LHe70LTSq5eIdsj1re+Ao5BrJsjVGOT3EUyFenXnuVmGAGf1kKka0S4SRzUC 4R9kW8XZHhwcKODlXe6B9sYZtrTZf2f+jwhCaq+zzOuKHzQ0z7r2Wibnj/DLM3xXE7JX6F CON4XKegpCNQvW+TQ06dMhNQVCPfSIFz0Npf36clrFLsEMCqb5qg5KR4QL3qhFVSDvHN8n T8OTaTwHa8EzbZ47oAKIP7+QhLbQQuFmEQghKQyQ2TaeoakqfN1W285ZND3VfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpSQr50DGz11JL; Wed, 13 Nov 2024 15:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ADFnuUQ025218; Wed, 13 Nov 2024 15:49:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADFnuGM025215; Wed, 13 Nov 2024 15:49:56 GMT (envelope-from git) Date: Wed, 13 Nov 2024 15:49:56 GMT Message-Id: <202411131549.4ADFnuGM025215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 2c6edd6dc94e - stable/13 - ice(4): properly use kernel option RSS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c6edd6dc94e7d429ce022262b9e25d159ce61e5 Auto-Submitted: auto-generated The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2c6edd6dc94e7d429ce022262b9e25d159ce61e5 commit 2c6edd6dc94e7d429ce022262b9e25d159ce61e5 Author: Brian Poole AuthorDate: 2024-10-11 19:57:52 +0000 Commit: Mitchell Horne CommitDate: 2024-11-13 15:49:33 +0000 ice(4): properly use kernel option RSS Header ice_rss.h uses the kernel RSS interface if option RSS is defined. However when ice_rss.h is included by ice_lib.h there is no prior inclusion of ice_opts.h to set RSS causing ifdef RSS to always fail. Add ice_opts.h to the top of ice_lib.h (like ice_iflib.h) so RSS can be defined when ice_rss.h is parsed. With that in place, compilation fails due to a missing defintion of ICE_DEFAULT_RSS_HASH_CONFIG. It is defined in ice_rss.h only when RSS is not defined. Since this define is not part of the kernel RSS interface but ice-specific, it should always be defined. Move its definition outside of ifdef RSS. PR: 255309 Reviewed by: mhorne, erj (earlier version) MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/1460 (cherry picked from commit 6e5650896fe47398e49e3d81af60cc60dbb09e6e) --- sys/dev/ice/ice_lib.h | 3 +++ sys/dev/ice/ice_rss.h | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index 6c010cffc0fd..09385d3be34b 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -40,6 +40,9 @@ #ifndef _ICE_LIB_H_ #define _ICE_LIB_H_ +/* include kernel options first */ +#include "ice_opts.h" + #include #include #include diff --git a/sys/dev/ice/ice_rss.h b/sys/dev/ice/ice_rss.h index ede1fad5abe7..df485f4b1f5a 100644 --- a/sys/dev/ice/ice_rss.h +++ b/sys/dev/ice/ice_rss.h @@ -68,14 +68,6 @@ CTASSERT(ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE >= RSS_KEYSIZE); #define RSS_HASHTYPE_RSS_UDP_IPV6 (1 << 9) /* IPv6 UDP 4-tuple */ #define RSS_HASHTYPE_RSS_UDP_IPV6_EX (1 << 10) /* IPv6 UDP 4-tuple + ext hdrs */ -#define ICE_DEFAULT_RSS_HASH_CONFIG \ - ((u_int)(RSS_HASHTYPE_RSS_IPV4 | \ - RSS_HASHTYPE_RSS_TCP_IPV4 | \ - RSS_HASHTYPE_RSS_UDP_IPV4 | \ - RSS_HASHTYPE_RSS_IPV6 | \ - RSS_HASHTYPE_RSS_TCP_IPV6 | \ - RSS_HASHTYPE_RSS_UDP_IPV6)) - #define rss_getkey(key) ice_get_default_rss_key(key) #define rss_getnumbuckets() (mp_ncpus) #define rss_get_indirection_to_bucket(index) (index) @@ -113,4 +105,12 @@ rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, uint32_t *bucket_id) #endif /* !RSS */ +#define ICE_DEFAULT_RSS_HASH_CONFIG \ + ((u_int)(RSS_HASHTYPE_RSS_IPV4 | \ + RSS_HASHTYPE_RSS_TCP_IPV4 | \ + RSS_HASHTYPE_RSS_UDP_IPV4 | \ + RSS_HASHTYPE_RSS_IPV6 | \ + RSS_HASHTYPE_RSS_TCP_IPV6 | \ + RSS_HASHTYPE_RSS_UDP_IPV6)) + #endif /* _ICE_COMMON_COMPAT_H_ */