Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon <tho...@monjalon.net>
> Sent: Friday, November 8, 2019 20:34
> To: Wang, Haiyue <haiyue.w...@intel.com>
> Cc: dev@dpdk.org; olivier.m...@6wind.com; Ye, Xiaolong 
> <xiaolong...@intel.com>; Yigit, Ferruh
> <ferruh.yi...@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v9] net/ice: optimize protocol extraction by 
> dynamic mbuf API
> 
> Hi,
> 
> I see this patch is already merged in next-net-intel,
> but please I would prefer to have below improvements first.
> 
> 07/11/2019 11:44, Haiyue Wang:
> > The original design is to use rte_mbuf::udata64 to save the metadata of
> > protocol extraction which has network protocol data fields and type, a
> > private API is used to decode this metadata.
> >
> > Use the dynamic mbuf field and flags to register the needed fields in
> > mbuf, to avoid overwriting 'rte_mbuf::udata64' if the application uses
> > it. It only needs 4B size to save the protocol extraction data, and its
> 
> Yes using a dynamic field is definitely more correct.
> 
> > type and validity is indicated by related bit in 'rte_mbuf::ol_flags'.
> 
> Better to say explicitly it uses a dynamic flag.
> 

Will update doc to make the description be better.

> > --- a/drivers/net/ice/rte_pmd_ice.h
> > +++ b/drivers/net/ice/rte_pmd_ice.h
> > +/**
> > + * @file rte_pmd_ice.h
> > + *
> > + * ice PMD specific functions.
> > + *
> > + * @b EXPERIMENTAL: this API may change, or be removed, without prior 
> > notice
> > + *
> > + */
> 
> Adding the file in doxygen is good.
> I think it could be a separate patch for doxygen + cleanups.
> 
> > +/**
> > + * The supported network protocol extraction metadata format.
> > + */
> > +union proto_xtr_metadata {
> > -struct proto_xtr_flds {
> 
> Please add a prefix rte_ice_ or rte_net_ice_ as you wish.
> 

Missed, will be updated.

> [...]
> > +/**
> > + * The mbuf dynamic flag for VLAN protocol extraction metadata, it is valid
> > + * when dev_args 'proto_xtr' has 'vlan' specified.
> > + */
> > +#define PKT_RX_DYNF_PROTO_XTR_VLAN \
> > +   (rte_net_ice_dynflag_proto_xtr_vlan_mask)
> > +
> > +/**
> > + * The mbuf dynamic flag for IPv4 protocol extraction metadata, it is valid
> > + * when dev_args 'proto_xtr' has 'ipv4' specified.
> > + */
> > +#define PKT_RX_DYNF_PROTO_XTR_IPV4 \
> > +   (rte_net_ice_dynflag_proto_xtr_ipv4_mask)
> > +
> > +/**
> > + * The mbuf dynamic flag for IPv6 protocol extraction metadata, it is valid
> > + * when dev_args 'proto_xtr' has 'ipv6' specified.
> > + */
> > +#define PKT_RX_DYNF_PROTO_XTR_IPV6 \
> > +   (rte_net_ice_dynflag_proto_xtr_ipv6_mask)
> > +
> > +/**
> > + * The mbuf dynamic flag for IPv6 with flow protocol extraction metadata, 
> > it is
> > + * valid when dev_args 'proto_xtr' has 'ipv6_flow' specified.
> > + */
> > +#define PKT_RX_DYNF_PROTO_XTR_IPV6_FLOW \
> > +   (rte_net_ice_dynflag_proto_xtr_ipv6_flow_mask)
> > +
> > +/**
> > + * The mbuf dynamic flag for TCP protocol extraction metadata, it is valid
> > + * when dev_args 'proto_xtr' has 'tcp' specified.
> > + */
> > +#define PKT_RX_DYNF_PROTO_XTR_TCP \
> > +   (rte_net_ice_dynflag_proto_xtr_tcp_mask)
> 
> Those fields and flags are missing a RTE_ prefix.
> (Yes I know we are missing such prefix in rte_mbuf.f)
> 

The "PKT_RX_" in ' lib/librte_mbuf/rte_mbuf_core.h' will be changed to
"RTE_PKT_RX_" ?

Or keep the above as it is now, to keep the same ol_flags style, until all
the "PKT_RX_" are changed ?




Reply via email to