[PATCH v3] net/ice: add devargs for disabling default mac

Zhang, Ke1X ke1x.zhang at intel.com
Mon Jan 16 14:38:06 CET 2023



> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Thursday, January 12, 2023 11:32 PM
> To: Zhang, Ke1X <ke1x.zhang at intel.com>
> Cc: Zhang, Qi Z <qi.z.zhang at intel.com>; Zhang, Yuying
> <yuying.zhang at intel.com>; dev at dpdk.org
> Subject: Re: [PATCH v3] net/ice: add devargs for disabling default mac
> 
> On Thu, 12 Jan 2023 15:55:38 +0800
> Ke Zhang <ke1x.zhang at intel.com> wrote:
> 
> > From: "ke1x.zhang" <ke1x.zhang at intel.com>
> >
> > Add the feature that support to disable default mac which will be used
> > by ice driver when setting dpdk_devargs config field.
> >
> > Default mac is not disabled in default, user can choose to disable the
> > default mac by setting ``devargs`` parameter ``default-mac-disable``,
> >
> > for example::
> >      -a 80:00.0,default-mac-disable=1
> >
> > Signed-off-by: ke1x.zhang <ke1x.zhang at intel.com>
> 
> Why is the driver specific option needed? Can't it be handled more generally
> by the application.

Thanks for your comments.

This patch is to support the latency function of a trex, for example:

Trex wants to send a packet with tos=1. After the peer forwards it back, it only receives packets
with tos=1. Other packets will be dropped in the switch stage of pipeline.

1.If the following rules are set as below:
flow create 0 ingress pattern eth / ipv4 tos is 1 / end actions queue index 1 / end

result: the packets will pass as long as the destination mac address matches the default mac address.


2.If the following rules are set as below:
flow create 0 ingress pattern any / end actions drop / end
flow create 0 ingress pattern eth / ipv4 tos is 1 / end actions queue index 1 / end

result: all packages will be dropped.


3.The current solution is to disable the default mac address during initialization, and then set the following rules:
flow create 0 ingress pattern eth / ipv4 tos is 1 / end actions queue index 1 / end

result: only packages with tos=1 can pass。

Would you please share a better solution for me? @Stephen Hemminger
Thanks.



More information about the dev mailing list