[dpdk-dev] [PATCH] net/i40e: fix VSI MAC filter on primary address change

Xing, Beilei beilei.xing at intel.com
Thu Jan 11 09:21:39 CET 2018


Hi Igor,

Thanks for the catch, and glad to see your patch☺ It resolves a potential problem in PMD.
The patch looks OK for me except some minor comments (in another mail thread).

Best Regards,
Beilei

From: Igor Ryzhov [mailto:iryzhov at nfware.com]
Sent: Thursday, January 11, 2018 6:47 AM
To: Zhang, Helin <helin.zhang at intel.com>
Cc: Xing, Beilei <beilei.xing at intel.com>; Olivier Matz <olivier.matz at 6wind.com>; dev at dpdk.org; Wu, Jingjing <jingjing.wu at intel.com>; stable at dpdk.org; Laurent Hardy <laurent.hardy at 6wind.com>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix VSI MAC filter on primary address change

Hello everyone.

It's sad that my comments were unanswered.
I'm ok with the first two – they were mostly style-related.
But I made an investigation on the third one and it is a bug.

This is a description (from X710 datasheet) of flags sent to mac_address_write command:

By bits:
0-7 – Reserved
8 – MAC_MAG_EN
9 – LAA_WOL_PRESERVE
10-13 – Reserved
14-15 – Write type (00 – Update LAA only, 01 – Update LAA and WOL, 10 – Update port address, 11 – Reserved, but used in Linux to enable multicast magic packet wake up)

Current code uses 0x3 flag, apparently trying to update LAA, WOL and port address, but it sets first two bits instead of last two.
These bits are reserved, that's why it doesn't break anything.
At the same time, last two bits are set to zero, and the command changes LAA address only – it's enough to work in simple case.

The last question – which flag is correct to use – 01 (LAA + WOL) or 11 (LAA + WOL + port).
Linux driver uses the first one, and here is the patch to fix the issue:
https://dpdk.org/dev/patchwork/patch/33524/

Best regards,
Igor

On Wed, Jan 10, 2018 at 4:57 PM, Zhang, Helin <helin.zhang at intel.com<mailto:helin.zhang at intel.com>> wrote:


> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org<mailto:dev-bounces at dpdk.org>] On Behalf Of Xing, Beilei
> Sent: Thursday, January 4, 2018 1:39 PM
> To: Olivier Matz; dev at dpdk.org<mailto:dev at dpdk.org>; Wu, Jingjing
> Cc: stable at dpdk.org<mailto:stable at dpdk.org>; Laurent Hardy
> Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix VSI MAC filter on primary address
> change
>
>
>
> > -----Original Message-----
> > From: Olivier Matz [mailto:olivier.matz at 6wind.com<mailto:olivier.matz at 6wind.com>]
> > Sent: Wednesday, January 3, 2018 10:29 PM
> > To: dev at dpdk.org<mailto:dev at dpdk.org>; Wu, Jingjing <jingjing.wu at intel.com<mailto:jingjing.wu at intel.com>>; Xing, Beilei
> > <beilei.xing at intel.com<mailto:beilei.xing at intel.com>>
> > Cc: stable at dpdk.org<mailto:stable at dpdk.org>; Laurent Hardy <laurent.hardy at 6wind.com<mailto:laurent.hardy at 6wind.com>>
> > Subject: [PATCH] net/i40e: fix VSI MAC filter on primary address
> > change
> >
> > When primary address mac is changed, the mac filters were not updated
> > in the VSI with the new mac addr and incoming packets with this
> > destination address are dropped by the hardware filters.
> >
> > This patch removes the VSI mac filter for the previous mac address and
> > adds a new one for new mac address.
> >
> > Fixes: e18e01e92c29 ("i40e: support default MAC address setting")
> > Cc: stable at dpdk.org<mailto:stable at dpdk.org>
> >
> > Signed-off-by: Laurent Hardy <laurent.hardy at 6wind.com<mailto:laurent.hardy at 6wind.com>>
> > Signed-off-by: Olivier Matz <olivier.matz at 6wind.com<mailto:olivier.matz at 6wind.com>>
>
> Thanks for the fix.
> Acked-by: Beilei Xing <beilei.xing at intel.com<mailto:beilei.xing at intel.com>>
Applied to dpdk-next-net-intel, thanks!

/Helin



More information about the dev mailing list