From owner-svn-src-stable-12@freebsd.org Tue Dec 3 07:22:17 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A9511CB2A6; Tue, 3 Dec 2019 07:22:17 +0000 (UTC) (envelope-from avg@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Rtj53CP1z40w7; Tue, 3 Dec 2019 07:22:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5237CC440; Tue, 3 Dec 2019 07:22:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xB37MHo8055174; Tue, 3 Dec 2019 07:22:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xB37MHbP055172; Tue, 3 Dec 2019 07:22:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201912030722.xB37MHbP055172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 3 Dec 2019 07:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355321 - stable/12/sys/dev/ixgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/dev/ixgbe X-SVN-Commit-Revision: 355321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2019 07:22:17 -0000 Author: avg Date: Tue Dec 3 07:22:16 2019 New Revision: 355321 URL: https://svnweb.freebsd.org/changeset/base/355321 Log: MFC r354349: if_ixv: disable RSS configuration on 82599 and X540 VFs It is reported that those VFs share their RSS configuration with PF and, thus, they cannot be configured independently. Also: - add missing opt_rss.h to if_ixv.c, otherwise RSS kernel option could not be seen - do not enable IXGBE_FEATURE_RSS on the older VFs - set flowid / hash type to M_HASHTYPE_NONE or M_HASHTYPE_OPAQUE_HASH (based on what the hardware reports) if IXGBE_FEATURE_RSS is not set Modified: stable/12/sys/dev/ixgbe/if_ixv.c stable/12/sys/dev/ixgbe/ix_txrx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ixgbe/if_ixv.c ============================================================================== --- stable/12/sys/dev/ixgbe/if_ixv.c Tue Dec 3 07:20:47 2019 (r355320) +++ stable/12/sys/dev/ixgbe/if_ixv.c Tue Dec 3 07:22:16 2019 (r355321) @@ -35,6 +35,7 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "ixgbe.h" #include "ifdi_if.h" @@ -1457,7 +1458,12 @@ ixv_initialize_receive_units(if_ctx_t ctx) scctx->isc_nrxd[0] - 1); } - ixv_initialize_rss_mapping(adapter); + /* + * Do not touch RSS and RETA settings for older hardware + * as those are shared among PF and all VF. + */ + if (adapter->hw.mac.type >= ixgbe_mac_X550_vf) + ixv_initialize_rss_mapping(adapter); } /* ixv_initialize_receive_units */ /************************************************************************ @@ -1892,7 +1898,6 @@ ixv_init_device_features(struct adapter *adapter) { adapter->feat_cap = IXGBE_FEATURE_NETMAP | IXGBE_FEATURE_VF - | IXGBE_FEATURE_RSS | IXGBE_FEATURE_LEGACY_TX; /* A tad short on feature flags for VFs, atm. */ @@ -1905,6 +1910,7 @@ ixv_init_device_features(struct adapter *adapter) case ixgbe_mac_X550EM_x_vf: case ixgbe_mac_X550EM_a_vf: adapter->feat_cap |= IXGBE_FEATURE_NEEDS_CTXD; + adapter->feat_cap |= IXGBE_FEATURE_RSS; break; default: break; Modified: stable/12/sys/dev/ixgbe/ix_txrx.c ============================================================================== --- stable/12/sys/dev/ixgbe/ix_txrx.c Tue Dec 3 07:20:47 2019 (r355320) +++ stable/12/sys/dev/ixgbe/ix_txrx.c Tue Dec 3 07:22:16 2019 (r355321) @@ -464,6 +464,12 @@ ixgbe_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) ri->iri_flowid = le32toh(rxd->wb.lower.hi_dword.rss); ri->iri_rsstype = ixgbe_determine_rsstype(pkt_info); + if ((adapter->feat_en & IXGBE_FEATURE_RSS) == 0) { + if (ri->iri_rsstype == M_HASHTYPE_OPAQUE) + ri->iri_rsstype = M_HASHTYPE_NONE; + else + ri->iri_rsstype = M_HASHTYPE_OPAQUE_HASH; + } ri->iri_vtag = vtag; ri->iri_nfrags = i; if (vtag)