Thanks, PSB.

> -----Original Message-----
> From: Thomas Monjalon <tho...@monjalon.net>
> Sent: Wednesday, November 6, 2019 2:26 PM
> To: Dekel Peled <dek...@mellanox.com>
> Cc: john.mcnam...@intel.com; marko.kovace...@intel.com;
> nhor...@tuxdriver.com; ajit.khapa...@broadcom.com;
> somnath.ko...@broadcom.com; anatoly.bura...@intel.com;
> xuanziya...@huawei.com; cloud.wangxiao...@huawei.com;
> zhouguoy...@huawei.com; wenzhuo...@intel.com;
> konstantin.anan...@intel.com; Matan Azrad <ma...@mellanox.com>;
> Shahaf Shuler <shah...@mellanox.com>; Slava Ovsiienko
> <viachesl...@mellanox.com>; rm...@marvell.com;
> shsha...@marvell.com; maxime.coque...@redhat.com;
> tiwei....@intel.com; zhihong.w...@intel.com; yongw...@vmware.com;
> ferruh.yi...@intel.com; arybche...@solarflare.com; jingjing...@intel.com;
> bernard.iremon...@intel.com; dev@dpdk.org
> Subject: Re: [PATCH v2 1/3] ethdev: support API to set max LRO packet size
> 
> 06/11/2019 12:34, Dekel Peled:
> > This patch implements [1], to support API for configuration and
> > validation of max size for LRO aggregated packet.
> > API change notice [2] is removed, and release notes for 19.11 are
> > updated accordingly.
> >
> > Various PMDs using LRO offload are updated, the new data members are
> > initialized to ensure they don't fail validation.
> >
> > [1]
> >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatch
> >
> es.dpdk.org%2Fpatch%2F58217%2F&amp;data=02%7C01%7Cdekelp%40mell
> anox.co
> >
> m%7C21fb831af76a46c0597208d762b490f1%7Ca652971c7d2e4d9ba6a4d14925
> 6f461
> >
> b%7C0%7C1%7C637086399982280191&amp;sdata=APp12mvk0RP92%2FzoNy
> Mj2%2BvV3
> > E4BAaTzo4M8xOIc1yc%3D&amp;reserved=0
> > [2]
> >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatch
> >
> es.dpdk.org%2Fpatch%2F57492%2F&amp;data=02%7C01%7Cdekelp%40mell
> anox.co
> >
> m%7C21fb831af76a46c0597208d762b490f1%7Ca652971c7d2e4d9ba6a4d14925
> 6f461
> >
> b%7C0%7C1%7C637086399982280191&amp;sdata=cBFoqYfJPNKMAv0AMVQ
> 9iO77ikiTi
> > pFwoFJx5pRQxCE%3D&amp;reserved=0
> >
> > Signed-off-by: Dekel Peled <dek...@mellanox.com>
> > Reviewed-by: Andrew Rybchenko <arybche...@solarflare.com>
> > ---
> [...]
> > --- a/lib/librte_ethdev/rte_ethdev.c
> > +++ b/lib/librte_ethdev/rte_ethdev.c
> > @@ -1156,6 +1156,26 @@ struct rte_eth_dev *
> >     return name;
> >  }
> >
> > +static inline int
> > +check_lro_pkt_size(uint16_t port_id, uint32_t config_size,
> > +              uint32_t dev_info_size)
> > +{
> > +   int ret = 0;
> > +
> > +   if (config_size > dev_info_size) {
> > +           RTE_ETHDEV_LOG(ERR, "Ethdev port_id=%d
> max_lro_pkt_size %u > "
> > +                          "max allowed value %u\n",
> 
> Minor comment (can be fixed while merging):
> it is better to keep fixed strings together so it can be grepped.
> Here I would move " > " on the second line, so we can grep " > max allowed
> value ".
> 

I'll edit it in v3.

> > +                          port_id, config_size, dev_info_size);
> > +           ret = -EINVAL;
> > +   } else if (config_size < RTE_ETHER_MIN_LEN) {
> > +           RTE_ETHDEV_LOG(ERR, "Ethdev port_id=%d
> max_lro_pkt_size %u < "
> > +                          "min allowed value %u\n", port_id, config_size,
> 
> Same minor comment here.
> 

I'll edit it in v3.

> > +                          (unsigned int)RTE_ETHER_MIN_LEN);
> > +           ret = -EINVAL;
> > +   }
> > +   return ret;
> > +}
> [...]
> > --- a/lib/librte_ethdev/rte_ethdev.h
> > +++ b/lib/librte_ethdev/rte_ethdev.h
> > @@ -395,6 +395,8 @@ struct rte_eth_rxmode {
> > +   /** Maximal allowed size of LRO aggregated packet. */
> 
> Not sure, isn't it more correct to say "Maximum" in English?
> 

I'll edit it in v3.

> > +   uint32_t max_lro_pkt_size;
> > @@ -1223,6 +1225,8 @@ struct rte_eth_dev_info {
> > +   /** Maximum configurable size of LRO aggregated packet. */
> > +   uint32_t max_lro_pkt_size;
> 
> Except minor comments above,
> Acked-by: Thomas Monjalon <tho...@monjalon.net>
> 

Reply via email to