* [dpdk-dev] [PATCH v2] e1000/base: fix multicast setting in VF
@ 2017-02-21 9:33 Yong Wang
2017-02-24 0:32 ` Lu, Wenzhuo
2017-02-24 11:22 ` Ferruh Yigit
0 siblings, 2 replies; 4+ messages in thread
From: Yong Wang @ 2017-02-21 9:33 UTC (permalink / raw)
To: wenzhuo.lu; +Cc: dev, Yong Wang
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.
---
v2:
* According to Thomas's suggestion, modify the title.
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
drivers/net/e1000/base/e1000_vf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_vf.c b/drivers/net/e1000/base/e1000_vf.c
index 7845b48..44ab018 100644
--- a/drivers/net/e1000/base/e1000_vf.c
+++ b/drivers/net/e1000/base/e1000_vf.c
@@ -421,12 +421,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++) {
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] e1000/base: fix multicast setting in VF
2017-02-21 9:33 [dpdk-dev] [PATCH v2] e1000/base: fix multicast setting in VF Yong Wang
@ 2017-02-24 0:32 ` Lu, Wenzhuo
2017-02-24 11:35 ` Ferruh Yigit
2017-02-24 11:22 ` Ferruh Yigit
1 sibling, 1 reply; 4+ messages in thread
From: Lu, Wenzhuo @ 2017-02-24 0:32 UTC (permalink / raw)
To: Yong Wang; +Cc: dev
Hi,
> -----Original Message-----
> From: Yong Wang [mailto:wang.yong19@zte.com.cn]
> Sent: Tuesday, February 21, 2017 5:33 PM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org; Yong Wang
> Subject: [PATCH v2] e1000/base: 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.
>
> ---
> v2:
> * According to Thomas's suggestion, modify the title.
>
> Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] e1000/base: fix multicast setting in VF
2017-02-21 9:33 [dpdk-dev] [PATCH v2] e1000/base: fix multicast setting in VF Yong Wang
2017-02-24 0:32 ` Lu, Wenzhuo
@ 2017-02-24 11:22 ` Ferruh Yigit
1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-02-24 11:22 UTC (permalink / raw)
To: Yong Wang, wenzhuo.lu; +Cc: dev
On 2/21/2017 9:33 AM, Yong Wang wrote:
> 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.
>
> ---
> v2:
> * According to Thomas's suggestion, modify the title.
>
> Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
It looks like this fix has a history:
- Defect introduces with initial version
- Fixed with: [1]
06cf9be95ce1 ("lib: fix uninitialized value")
- Fix reverted with: [2]
dffbaf7880a8 ("e1000: revert fix for multicast in VF")
- This patch applies same fix again.
Revert does not mention why it has been reverted, this is one of the
samples why commit log matters.
Since code is clearly wrong, I am for getting the fix, but it would be
nice to know why it has been reverted previously.
[1]
commit 06cf9be95ce16b363c4267d2d17e27c2706629ae
Author: Zijie Pan <zijie.pan@6wind.com>
Date: Thu Dec 6 15:36:51 2012 +0800
lib: fix uninitialized value
Fix warning "The left expression of the compound assignment
is an uninitialized value".
Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
[2]
commit dffbaf7880a8d753a4971971256d6c8b90e7ece1
Author: Intel <intel.com>
Date: Fri Nov 8 03:00:00 2013 +0100
e1000: revert fix for multicast in VF
Revert fix from commit 06cf9be95ce16b363c4267d2d17e27c2706629ae.
Signed-off-by: Intel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] e1000/base: fix multicast setting in VF
2017-02-24 0:32 ` Lu, Wenzhuo
@ 2017-02-24 11:35 ` Ferruh Yigit
0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-02-24 11:35 UTC (permalink / raw)
To: Lu, Wenzhuo, Yong Wang; +Cc: dev
On 2/24/2017 12:32 AM, Lu, Wenzhuo wrote:
> Hi,
>
>> -----Original Message-----
>> From: Yong Wang [mailto:wang.yong19@zte.com.cn]
>> Sent: Tuesday, February 21, 2017 5:33 PM
>> To: Lu, Wenzhuo
>> Cc: dev@dpdk.org; Yong Wang
>> Subject: [PATCH v2] e1000/base: 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.
>>
>> ---
>> v2:
>> * According to Thomas's suggestion, modify the title.
>>
>> Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
net/e1000/base: fix multicast setting in VF
Fixes: dffbaf7880a8 ("e1000: revert fix for multicast in VF")
Cc: stable@dpdk.org
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-24 11:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21 9:33 [dpdk-dev] [PATCH v2] e1000/base: fix multicast setting in VF Yong Wang
2017-02-24 0:32 ` Lu, Wenzhuo
2017-02-24 11:35 ` Ferruh Yigit
2017-02-24 11:22 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).