> -----Original Message----- > From: Ferruh Yigit <ferruh.yi...@xilinx.com> > Sent: Friday, September 2, 2022 01:24 > To: Guo, Junfeng <junfeng....@intel.com>; Zhang, Qi Z > <qi.z.zh...@intel.com>; Wu, Jingjing <jingjing...@intel.com> > Cc: dev@dpdk.org; Li, Xiaoyun <xiaoyun...@intel.com>; > awogbem...@google.com; Richardson, Bruce > <bruce.richard...@intel.com> > Subject: Re: [PATCH v2 08/10] net/gve: add support to get dev info and > configure dev > > On 8/29/2022 9:41 AM, Junfeng Guo wrote: > > > > > Add dev_ops dev_infos_get. > > Complete dev_configure with RX offloads configuration. > > > > Signed-off-by: Xiaoyun Li <xiaoyun...@intel.com> > > Signed-off-by: Junfeng Guo <junfeng....@intel.com> > > --- > > drivers/net/gve/gve.h | 3 ++ > > drivers/net/gve/gve_ethdev.c | 61 > ++++++++++++++++++++++++++++++++++++ > > 2 files changed, 64 insertions(+) > > > > diff --git a/drivers/net/gve/gve.h b/drivers/net/gve/gve.h > > index 7f4d0e37f3..004e0a75ca 100644 > > --- a/drivers/net/gve/gve.h > > +++ b/drivers/net/gve/gve.h > > @@ -27,6 +27,9 @@ > > #define GVE_DEFAULT_TX_FREE_THRESH 256 > > #define GVE_TX_MAX_FREE_SZ 512 > > > > +#define GVE_MIN_BUF_SIZE 1024 > > +#define GVE_MAX_RX_PKTLEN 65535 > > + > > /* PTYPEs are always 10 bits. */ > > #define GVE_NUM_PTYPES 1024 > > > > diff --git a/drivers/net/gve/gve_ethdev.c > b/drivers/net/gve/gve_ethdev.c > > index 5ebe2c30ea..6bc7bf4519 100644 > > --- a/drivers/net/gve/gve_ethdev.c > > +++ b/drivers/net/gve/gve_ethdev.c > > @@ -96,6 +96,14 @@ gve_free_qpls(struct gve_priv *priv) > > static int > > gve_dev_configure(__rte_unused struct rte_eth_dev *dev) > > { > > + struct gve_priv *priv = dev->data->dev_private; > > + > > + if (dev->data->dev_conf.rxmode.mq_mode & > RTE_ETH_MQ_RX_RSS_FLAG) > > + dev->data->dev_conf.rxmode.offloads |= > RTE_ETH_RX_OFFLOAD_RSS_HASH; > > + > > + if (dev->data->dev_conf.rxmode.offloads & > RTE_ETH_RX_OFFLOAD_TCP_LRO) > > + priv->enable_lsc = 1; > > What is the relation between LRO and LSC? Is it a typo?
Yes, this is just a typo and it should be 'enable_rsc' to indicate Receive Segment Coalescing for TCP Large Receive Offload. Thanks for reminding! > > And does driver support LSC at all? Or any interrupt? Looks that current base code has not provided these functions. > > > + > > return 0; > > } > > > > @@ -266,6 +274,58 @@ gve_dev_close(struct rte_eth_dev *dev) > > return err; > > } > > > > +static int > > +gve_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info > *dev_info) > > +{ > > + struct gve_priv *priv = dev->data->dev_private; > > + > > + dev_info->device = dev->device; > > + dev_info->max_mac_addrs = 1; > > + dev_info->max_rx_queues = priv->max_nb_rxq; > > + dev_info->max_tx_queues = priv->max_nb_txq; > > + dev_info->min_rx_bufsize = GVE_MIN_BUF_SIZE; > > + dev_info->max_rx_pktlen = GVE_MAX_RX_PKTLEN; > > + > > Can you please provide 'max_mtu' & 'min_mtu' values too? Yes, will add these in the coming version patchset. Thanks!