DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>
Subject: RE: [PATCH v2 07/10] net/mlx5: add legacy unicast flow rules management
Date: Fri, 8 Nov 2024 16:11:22 +0000	[thread overview]
Message-ID: <CH3PR12MB84604DDD6BA80669D78D9770A45D2@CH3PR12MB8460.namprd12.prod.outlook.com> (raw)
In-Reply-To: <e390f0d8-fa60-4bf7-ba26-8da0e1ce683a@amd.com>



> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@amd.com>
> Sent: Friday, November 8, 2024 15:48
> To: Dariusz Sosnowski <dsosnowski@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Bing Zhao <bingz@nvidia.com>; Ori Kam
> <orika@nvidia.com>; Suanming Mou <suanmingm@nvidia.com>; Matan Azrad
> <matan@nvidia.com>
> Cc: dev@dpdk.org
> Subject: Re: [PATCH v2 07/10] net/mlx5: add legacy unicast flow rules
> management
> 
> External email: Use caution opening links or attachments
> 
> 
> On 10/22/2024 1:06 PM, Dariusz Sosnowski wrote:
> > This patch adds the following internal functions for creation of
> > unicast DMAC flow rules:
> >
> > - mlx5_legacy_dmac_flow_create() - simple wrapper over
> >   mlx5_ctrl_flow().
> > - mlx5_legacy_dmac_vlan_flow_create() - simple wrapper over
> >   mlx5_ctrl_flow_vlan().
> >
> > These will be used as a basis for implementing dynamic additions of
> > unicast DMAC or unicast DMAC with VLAN control flow rules when new
> > addresses/VLANs are added.
> >
> > Also, this path adds the following internal functions for destructions
> > of unicast DMAC flow rules:
> >
> > - mlx5_legacy_ctrl_flow_destroy() - assuming a flow rule is on the
> >   control flow rule list, destroy it.
> > - mlx5_legacy_dmac_flow_destroy() - find and destroy a flow rule
> >   with given unicast DMAC.
> > - mlx5_legacy_dmac_flow_destroy() - find and destroy a flow rule
> >   with given unicast DMAC and VLAN ID.
> >
> > These will be used as a basis for implementing dynamic removals of
> > unicast DMAC or unicast DMAC with VLAN control flow rules when
> > addresses/VLANs are removed.
> >
> > At the moment, no relevant flow rules are registered on the list when
> > working with Verbs or DV flow engine.
> > This will be added in the follow up commit.
> >
> > Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> > Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> > ---
> >  drivers/net/mlx5/mlx5_flow.c | 80
> > ++++++++++++++++++++++++++++++++++++
> >  drivers/net/mlx5/mlx5_flow.h | 19 +++++++++
> >  2 files changed, 99 insertions(+)
> >
> > diff --git a/drivers/net/mlx5/mlx5_flow.c
> > b/drivers/net/mlx5/mlx5_flow.c index 62e3bca2f0..0d83357eb0 100644
> > --- a/drivers/net/mlx5/mlx5_flow.c
> > +++ b/drivers/net/mlx5/mlx5_flow.c
> > @@ -8532,6 +8532,86 @@ mlx5_ctrl_flow(struct rte_eth_dev *dev,
> >       return mlx5_ctrl_flow_vlan(dev, eth_spec, eth_mask, NULL, NULL);
> > }
> >
> > +int
> > +mlx5_legacy_dmac_flow_create(struct rte_eth_dev *dev, const struct
> > +rte_ether_addr *addr) {
> > +     struct rte_flow_item_eth unicast = {
> > +             .hdr.dst_addr = *addr,
> > +     };
> > +     struct rte_flow_item_eth unicast_mask = {
> > +             .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
> > +     };
> >
> 
> Initialization as string breaks build [3] with experimental gcc-15 [1], please see
> [2].
> 
> 
> [1]
> gcc 15.0.0 "gcc (GCC) 15.0.0 20241107 (experimental)"
> 
> [2]
> https://git.dpdk.org/dpdk/commit/?id=e0d947a1e6c2
> 
> [3]
> ../drivers/net/mlx5/mlx5_flow.c: In function ‘mlx5_legacy_dmac_flow_create’:
> ../drivers/net/mlx5/mlx5_flow.c:8568:44: error: initializer-string for array of
> ‘unsigned char’ is too long [-Werror=unterminated-string-initialization]
>  8568 |                 .hdr.dst_addr.addr_bytes =
> "\xff\xff\xff\xff\xff\xff",
>       |
> ^~~~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/net/mlx5/mlx5_flow.c: In function
> ‘mlx5_legacy_dmac_vlan_flow_create’:
> ../drivers/net/mlx5/mlx5_flow.c:8583:44: error: initializer-string for array of
> ‘unsigned char’ is too long [-Werror=unterminated-string-initialization]
>  8583 |                 .hdr.dst_addr.addr_bytes =
> "\xff\xff\xff\xff\xff\xff",
>       |
> ^~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks for notifying. I already sent a fix: https://patches.dpdk.org/project/dpdk/patch/20241108160724.730989-1-dsosnowski@nvidia.com/

Best regards,
Dariusz Sosnowski

  reply	other threads:[~2024-11-08 16:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17  7:57 [PATCH 00/10] net/mlx5: improve MAC address and VLAN add latency Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 01/10] net/mlx5: track unicast DMAC control flow rules Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 02/10] net/mlx5: add checking if unicast flow rule exists Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 03/10] net/mlx5: rework creation of unicast flow rules Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 04/10] net/mlx5: support destroying " Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 05/10] net/mlx5: rename control flow rules types Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 06/10] net/mlx5: shared init of control flow rules Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 07/10] net/mlx5: add legacy unicast flow rules management Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 08/10] net/mlx5: add legacy unicast flow rule registration Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 09/10] net/mlx5: add dynamic unicast flow rule management Dariusz Sosnowski
2024-10-17  7:57 ` [PATCH 10/10] net/mlx5: optimize MAC address and VLAN filter handling Dariusz Sosnowski
2024-10-17  8:01 ` [PATCH 00/10] net/mlx5: improve MAC address and VLAN add latency Slava Ovsiienko
2024-10-22 12:06 ` [PATCH v2 " Dariusz Sosnowski
2024-10-22 12:06   ` [PATCH v2 01/10] net/mlx5: track unicast DMAC control flow rules Dariusz Sosnowski
2024-10-22 12:06   ` [PATCH v2 02/10] net/mlx5: add checking if unicast flow rule exists Dariusz Sosnowski
2024-10-22 12:06   ` [PATCH v2 03/10] net/mlx5: rework creation of unicast flow rules Dariusz Sosnowski
2024-10-22 12:06   ` [PATCH v2 04/10] net/mlx5: support destroying " Dariusz Sosnowski
2024-10-22 12:06   ` [PATCH v2 05/10] net/mlx5: rename control flow rules types Dariusz Sosnowski
2024-10-22 12:06   ` [PATCH v2 06/10] net/mlx5: shared init of control flow rules Dariusz Sosnowski
2024-10-22 12:06   ` [PATCH v2 07/10] net/mlx5: add legacy unicast flow rules management Dariusz Sosnowski
2024-11-08 14:48     ` Ferruh Yigit
2024-11-08 16:11       ` Dariusz Sosnowski [this message]
2024-10-22 12:06   ` [PATCH v2 08/10] net/mlx5: add legacy unicast flow rule registration Dariusz Sosnowski
2024-10-22 12:06   ` [PATCH v2 09/10] net/mlx5: add dynamic unicast flow rule management Dariusz Sosnowski
2024-10-22 12:06   ` [PATCH v2 10/10] net/mlx5: optimize MAC address and VLAN filter handling Dariusz Sosnowski
2024-10-22 15:41   ` [PATCH v2 00/10] net/mlx5: improve MAC address and VLAN add latency Stephen Hemminger
2024-10-25 11:54     ` Dariusz Sosnowski
2024-10-24 14:11   ` Raslan Darawsheh
2024-10-27 13:19     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CH3PR12MB84604DDD6BA80669D78D9770A45D2@CH3PR12MB8460.namprd12.prod.outlook.com \
    --to=dsosnowski@nvidia.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).