From nobody Thu Aug 10 00:28:14 2023 X-Original-To: dev-commits-src-branches@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 4RLnp710jGz4mWWR; Thu, 10 Aug 2023 00:28:15 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RLnp6745qz4YgH; Thu, 10 Aug 2023 00:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691627295; 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=bUyVK5dlEthTojMHLHMzpkaFeRWyLENKqwL+fx7b8dc=; b=HHoPczMM8mLAgAoJ2XclwWu+1VpL2LNBCxZtWoV+eh2dKKkNfUREtO9xmp6udpTFkxuMBJ tWZaYuPbXoMTIWBYKCHsdxPyZEY5S/GM+B0l1ZgVR7bQX9VlU/QC7DW1ohH3RfnMHUCdmo pJ8VkF5TSElqBXpWvaFrMHJGPZA1IyKLu6S+Z2UhtuuvEeIibYTsi3MTLpB3p6TRkT9YPE rmHwC5En+jBsbEsCuJcjuF9iKVUfTC/FvwdTXyfYyEzI/+wGdx7RaLN0GVNONW3oV/J1xD i8AULKbD1p92na+o/5FkslpTiC8weYGl3SslkjrTb9qpNUy524IuAuz+SWrj5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691627295; 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=bUyVK5dlEthTojMHLHMzpkaFeRWyLENKqwL+fx7b8dc=; b=lxNN+BHF8Ol4AmcKDXbe+sD7CTJWu3HsREMXDQA4I62FgTP9uCJSnOcL3yM6UUE0dtfJSt 6j7spd6AXQa2J/IdYrGIJpggIGgj24xqj1C8W1iUxqFqhbPyHB+DxrywJGGc/7QoMuaiRS YETcpRnSYr9J5bM0s4qHsXlTzCR1I8aV01G0uNC8inpxlCWYuRHEwq+Z8nHm8HQUUdeTCR WfzIMzUqZ7VdxYarUEvbQ2qetWhn0XNt83j+eX0HNQz2EPZEGm09DIIQnLe1pur1W5oWqy qu+ZgNHAk3rbxydeeDR3E5lR92lsX+ZEY2MHgw4JYh1Qjcs8gZhuvB92A4WpzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691627295; a=rsa-sha256; cv=none; b=iQSBh2ckCOiZpRYqrMLbxX2LT8/v3NrBFRMzcUKSCL79D/fY3tdNqoQtuh9e/MBhmFNCf5 GlnL4KY4ygj1RPH/weyALn8bNwIrI/4EqCWRK6Xr3YukeP15dXXFlT74tOsZmt4MlzWfkA OTa2RM/bdP5/JjkIz0E9tPbb0UvQHoigmqcQkFXjgb89ZZjVScPunBaDWLaCrBpLV8oAa0 xrmUdlMlNVwbQDKEfQovF2GTmHlEfjzlxxYPd9rDsH+na1YDvkow3Yu7GsHJr2M+6OIfk2 TS1YwvqNM453L6yPmIRMdlSyqJXkFgb+KmEw8UpeTh0wbkEDl7QpXZlEtOWNTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RLnp667QGzcKM; Thu, 10 Aug 2023 00:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37A0SEc1025627; Thu, 10 Aug 2023 00:28:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37A0SENd025624; Thu, 10 Aug 2023 00:28:14 GMT (envelope-from git) Date: Thu, 10 Aug 2023 00:28:14 GMT Message-Id: <202308100028.37A0SENd025624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: fd2b36319c1f - stable/13 - ixv: Separate VFTA table for each interface List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fd2b36319c1fee3ac8f914548705cfc0a79011d9 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=fd2b36319c1fee3ac8f914548705cfc0a79011d9 commit fd2b36319c1fee3ac8f914548705cfc0a79011d9 Author: Yuichiro Naito AuthorDate: 2023-08-03 20:36:21 +0000 Commit: Kevin Bowling CommitDate: 2023-08-10 00:27:45 +0000 ixv: Separate VFTA table for each interface The vlan setting is independent for each interface. Use VFTA table in 'struct ixgbe_softc' that is already defined. This pull request fixes following bug scenario. create ixv0.10 create ixv1.10 destroy ixv1.10 create ixv0.11 ixv0.10 no longer receives vlan 10 packets. In this case, destroying ixv1.10 affects to ixv0. Pull Request: https://github.com/freebsd/freebsd-src/pull/774 (cherry picked from commit 61a8231d152c38ac96b697ea3ca8ff220f3aa536) --- sys/dev/ixgbe/if_ixv.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index 813a8d5fc3ed..5bd71ab2b5eb 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -198,12 +198,6 @@ TUNABLE_INT("hw.ixv.flow_control", &ixv_flow_control); static int ixv_header_split = false; TUNABLE_INT("hw.ixv.hdr_split", &ixv_header_split); -/* - * Shadow VFTA table, this is needed because - * the real filter table gets cleared during - * a soft reset and we need to repopulate it. - */ -static u32 ixv_shadow_vfta[IXGBE_VFTA_SIZE]; extern struct if_txrx ixgbe_txrx; static struct if_shared_ctx ixv_sctx_init = { @@ -1541,9 +1535,9 @@ ixv_setup_vlan_support(if_ctx_t ctx) * we need to repopulate it now. */ for (int i = 0; i < IXGBE_VFTA_SIZE; i++) { - if (ixv_shadow_vfta[i] == 0) + if (sc->shadow_vfta[i] == 0) continue; - vfta = ixv_shadow_vfta[i]; + vfta = sc->shadow_vfta[i]; /* * Reconstruct the vlan id's * based on the bits set in each @@ -1579,7 +1573,7 @@ ixv_if_register_vlan(if_ctx_t ctx, u16 vtag) index = (vtag >> 5) & 0x7F; bit = vtag & 0x1F; - ixv_shadow_vfta[index] |= (1 << bit); + sc->shadow_vfta[index] |= (1 << bit); ++sc->num_vlans; } /* ixv_if_register_vlan */ @@ -1597,7 +1591,7 @@ ixv_if_unregister_vlan(if_ctx_t ctx, u16 vtag) index = (vtag >> 5) & 0x7F; bit = vtag & 0x1F; - ixv_shadow_vfta[index] &= ~(1 << bit); + sc->shadow_vfta[index] &= ~(1 << bit); --sc->num_vlans; } /* ixv_if_unregister_vlan */