<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<p>BR</p>
<p>Rongwei</p>
<p> </p>
</div>
<div id="appendonsend"></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> Thomas Monjalon <thomas@monjalon.net><br>
<b>Sent:</b> Wednesday, June 5, 2024 15:13<br>
<b>To:</b> Dariusz Sosnowski <dsosnowski@nvidia.com>; rongwei liu <rongweil@nvidia.com><br>
<b>Cc:</b> dev@dpdk.org <dev@dpdk.org>; Matan Azrad <matan@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; Suanming Mou <suanmingm@nvidia.com>; Aman Singh <aman.deep.singh@intel.com>; Yuying Zhang <yuying.zhang@intel.com>;
 Ferruh Yigit <ferruh.yigit@amd.com>; Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru><br>
<b>Subject:</b> Re: [PATCH v4 2/3] ethdev: add VXLAN last reserved field</span>
<div> </div>
</div>
<div class="elementToProof" style="font-size: 11pt;">External email: Use caution opening links or attachments<br>
<br>
<br>
05/06/2024 03:16, rongwei liu:<br>
> From: Thomas Monjalon <thomas@monjalon.net><br>
> > 04/06/2024 18:40, Dariusz Sosnowski:<br>
> > > > > 04/06/2024 14:38, Rongwei Liu:<br>
> > > > > > --- a/app/test-pmd/cmdline_flow.c<br>
> > > > > > +++ b/app/test-pmd/cmdline_flow.c<br>
> > > > > > @@ -1006,6 +1006,7 @@ static const char *const flow_field_ids[] =<br>
> > > > > > {<br>
> > > > > ><br>
> > > > > >       "ipv6_flow_label", "ipv6_traffic_class",<br>
> > > > > >       "esp_spi", "esp_seq_num", "esp_proto",<br>
> > > > > >       "random",<br>
> > > > > ><br>
> > > > > > +     "vxlan_last_rsvd",<br>
> > > > > ><br>
> > > > > >       NULL<br>
> > > > > ><br>
> > > > > >  };<br>
> > > > ><br>
> > > > > How vxlan_last_rsvd is linked to RTE_FLOW_FIELD_VXLAN_RSVD1 in<br>
> > > > > testpmd?<br>
> > > > > Just because it is the same order?<br>
> > ><br>
> > > Yes, it's because of the order.<br>
> > > We should refactor this to use array designators.<br>
> > ><br>
> > > > > > --- a/lib/ethdev/rte_flow.h<br>
> > > > > > +++ b/lib/ethdev/rte_flow.h<br>
> > > > > > @@ -2428,6 +2428,7 @@ enum rte_flow_field_id {<br>
> > > > > ><br>
> > > > > >       RTE_FLOW_FIELD_ESP_SEQ_NUM,     /**< ESP Sequence Number. */<br>
> > > > > >       RTE_FLOW_FIELD_ESP_PROTO,       /**< ESP next protocol<br>
> > > > > >       value. */<br>
> > > > > >       RTE_FLOW_FIELD_RANDOM,          /**< Random value. */<br>
> > > > > ><br>
> > > > > > +     RTE_FLOW_FIELD_VXLAN_RSVD1,     /**< VXLAN last reserved<br>
> > > > > > byte. */<br>
> > > > > ><br>
> > > > > >  };<br>
> > > > ><br>
> > > > > I think we should use the same naming as in testpmd.<br>
> > > > > What about RTE_FLOW_FIELD_VXLAN_LAST_RSVD?<br>
> > > ><br>
> > > > To be honest, no strong objection per my personal thought.<br>
> > > > Considering the API "vxlan_hdr" names this field as "uint8_t rsvd1",<br>
> > > > maybe RTE_FLOW_FIELD_VXLAN_RSVD1 will be clearer for user as 1 vs 1<br>
> > > > mapping?> > ><br>
> > > +1 on using RSVD1 so it matches rte_vxlan_hdr definition.<br>
> > ><br>
> > > In this patch, "vxlan_last_rsvd" is used in testpmd, so it matches<br>
> > > existing "last_rsvd" field in VXLAN item. If we choose to use "rsvd1",<br>
> > > we should probably rename all other instances of "last_rsvd" to match.> ><br>
> > I prefer "vxlan_last_rsvd" for 2 reasons:<br>
> >         - it is more meaningful<br>
> >         - we are adding first, second and third reserved fields to match<br>
> >         the 3 bytes of rsvd0 (patch to come)<br>
><br>
> Sound clear and reasonable. I would like to propose the alignment between rte_flow_field_id and rte_vxlan_hdr:<br>
><br>
>   1.<br>
> RTE_FLOW_FIELD_VXLAN_RSVD1  ---> RTE_FLOW_FIELD_VXLAN_LAST_RSVD<br>
>   2.<br>
> "uint8_t rsvd1"  ---->  "uint8_t last_rsvd"<br>
<br>
We don't change rte_vxlan_hdr, because we avoid breaking compatibility.<br>
<br>
How about to add a new union:</div>
<div class="elementToProof" style="font-size: 11pt;"><br>
</div>
<div class="elementToProof" style="font-size: 11pt; color: rgb(0, 0, 0);">union {</div>
<div class="elementToProof" style="font-size: 11pt; color: rgb(0, 0, 0);">    uint8_t rsvd1;</div>
<div class="elementToProof" style="font-size: 11pt; color: rgb(0, 0, 0);">    uint8_t last_rsvd;</div>
<div class="elementToProof" style="font-size: 11pt;">}</div>
<div class="elementToProof" style="font-size: 11pt; color: rgb(0, 0, 0);"> RTE_FLOW_FIELD_VXLAN_LAST_RSVD will perfectly match the rte_vxlan_hdr definition.</div>
</body>
</html>