Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Sep 2021 01:35:24 GMT
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 713e66e37d99 - stable/13 - e1000: fix multicast setting in VF
Message-ID:  <202109240135.18O1ZORb029517@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kbowling (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=713e66e37d990e417170c73ae65024557b8f9071

commit 713e66e37d990e417170c73ae65024557b8f9071
Author:     Yong Wang <wang.yong19@zte.com.cn>
AuthorDate: 2017-02-21 09:33:23 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-09-24 01:32:35 +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 <wang.yong19@zte.com.cn>
    Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
    
    Approved by:    imp
    Obtained from:  DPDK (f58ca2f9ef6)
    MFC after:      1 week
    
    (cherry picked from commit ecf2a89a997ad4a14339b6a2f544e44b422620a0)
---
 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++) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109240135.18O1ZORb029517>