> -----Original Message-----
> From: Wang, ShougangX <shougangx.w...@intel.com>
> Sent: Monday, March 23, 2020 4:16 PM
> To: Wu, Jingjing <jingjing...@intel.com>; dev@dpdk.org
> Cc: Rong, Leyi <leyi.r...@intel.com>
> Subject: RE: [PATCH] net/iavf: unify Rx ptype table
> 
> > -----Original Message-----
> > From: Wu, Jingjing
> > Sent: Monday, March 23, 2020 10:09 AM
> > To: Wang, ShougangX <shougangx.w...@intel.com>; dev@dpdk.org
> > Cc: Rong, Leyi <leyi.r...@intel.com>
> > Subject: RE: [PATCH] net/iavf: unify Rx ptype table
> >
> >
> >
> > -----Original Message-----
> > From: Wang, ShougangX
> > Sent: Friday, March 6, 2020 10:24 AM
> > To: dev@dpdk.org
> > Cc: Rong, Leyi <leyi.r...@intel.com>; Wu, Jingjing <jingjing...@intel.com>;
> > Wang, ShougangX <shougangx.w...@intel.com>
> > Subject: [PATCH] net/iavf: unify Rx ptype table
> >
> > From: Wang Shougang <shougangx.w...@intel.com>
> >
> > This patch unified the Rx ptype table.
> >
> > Signed-off-by: Wang Shougang <shougangx.w...@intel.com>
> > ---
> >  drivers/net/iavf/iavf.h               |   3 +-
> >  drivers/net/iavf/iavf_ethdev.c        |   3 +
> >  drivers/net/iavf/iavf_rxtx.c          | 604 +++++++++++++++++++++++---
> >  drivers/net/iavf/iavf_rxtx.h          |   3 +
> >  drivers/net/iavf/iavf_rxtx_vec_avx2.c |  21 +-
> > drivers/net/iavf/iavf_rxtx_vec_sse.c  |  25 +-
> >  6 files changed, 561 insertions(+), 98 deletions(-)
> >
> > diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index
> > fe25d807c..526040c6e 100644
> > --- a/drivers/net/iavf/iavf.h
> > +++ b/drivers/net/iavf/iavf.h
> > @@ -119,7 +119,7 @@ struct iavf_info {
> >     uint16_t rxq_map[IAVF_MAX_MSIX_VECTORS];  };
> >
> > -#define IAVF_MAX_PKT_TYPE 256
> > +#define IAVF_MAX_PKT_TYPE 1024
> >
> >  /* Structure to store private data for each VF instance. */  struct 
> > iavf_adapter
> > { @@ -131,6 +131,7 @@ struct iavf_adapter {
> >     /* For vector PMD */
> >     bool rx_vec_allowed;
> >     bool tx_vec_allowed;
> > +   const uint32_t *ptype_tbl;
> >     bool stopped;
> >  };
> >
> > diff --git a/drivers/net/iavf/iavf_ethdev.c 
> > b/drivers/net/iavf/iavf_ethdev.c index
> > 34913f9c4..ee9f82249 100644
> > --- a/drivers/net/iavf/iavf_ethdev.c
> > +++ b/drivers/net/iavf/iavf_ethdev.c
> > @@ -1334,6 +1334,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
> >             return -1;
> >     }
> >
> > +   /* set default ptype table */
> > +   adapter->ptype_tbl = iavf_get_default_ptype_table();
> > +
> > As the ptype table is static, is that necessary to define a function to get 
> > it? Is
> > there any consideration for future extension?
> 
> Yes, I'm used to encapsulating it as a function for future extension.
> Do I need to set it as a global table instead of encapsulating in function?
Is there any chance the default ptype table change? If so, I think you can keep 
it as a function.
> 
> Thanks.
> Shougang

Reply via email to