From owner-dev-commits-src-all@freebsd.org Fri Sep 17 21:37:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0098966AE78; Fri, 17 Sep 2021 21:37:35 +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 4HB6k73TmJz4nZT; Fri, 17 Sep 2021 21:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 ED5AF1D5E2; Fri, 17 Sep 2021 21:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18HLbY3U056345; Fri, 17 Sep 2021 21:37:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18HLbYaw056344; Fri, 17 Sep 2021 21:37:34 GMT (envelope-from git) Date: Fri, 17 Sep 2021 21:37:34 GMT Message-Id: <202109172137.18HLbYaw056344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: ecf2a89a997a - main - e1000: fix multicast setting in VF 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/main X-Git-Reftype: branch X-Git-Commit: ecf2a89a997ad4a14339b6a2f544e44b422620a0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2021 21:37:36 -0000 The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ecf2a89a997ad4a14339b6a2f544e44b422620a0 commit ecf2a89a997ad4a14339b6a2f544e44b422620a0 Author: Yong Wang AuthorDate: 2017-02-21 09:33:23 +0000 Commit: Kevin Bowling CommitDate: 2021-09-17 21:24:44 +0000 e1000: fix multicast setting in VF In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior to initialization at "msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW". And "msgbuf[0]" is overwritten at "msgbuf[0] = E1000_VF_SET_MULTICAST". Fix it by moving the second line prior to the first one that mentioned above. Fixes: dffbaf7880a8 ("e1000: revert fix for multicast in VF") Cc: stable@dpdk.org Signed-off-by: Yong Wang Acked-by: Wenzhuo Lu Approved by: imp Obtained from: DPDK (f58ca2f9ef6) MFC after: 1 week --- sys/dev/e1000/e1000_vf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/e1000/e1000_vf.c b/sys/dev/e1000/e1000_vf.c index 653ba322a185..4b73bb9709c1 100644 --- a/sys/dev/e1000/e1000_vf.c +++ b/sys/dev/e1000/e1000_vf.c @@ -419,12 +419,13 @@ void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, DEBUGOUT1("MC Addr Count = %d\n", mc_addr_count); + msgbuf[0] = E1000_VF_SET_MULTICAST; + if (mc_addr_count > 30) { msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW; mc_addr_count = 30; } - msgbuf[0] = E1000_VF_SET_MULTICAST; msgbuf[0] |= mc_addr_count << E1000_VT_MSGINFO_SHIFT; for (i = 0; i < mc_addr_count; i++) {