Re: [dpdk-dev] Questions about API with no parameter check

2021-05-05 Thread Tyler Retzlaff
On Tue, May 04, 2021 at 09:36:24AM +, Ananyev, Konstantin wrote: > > > > > > 2021-04-29 09:16 (UTC-0700), Tyler Retzlaff: > > > On Wed, Apr 07, 2021 at 05:10:00PM +0100, Ferruh Yigit wrote: > > > > On 4/7/2021 4:25 PM, Hemant Agrawal wrote: > > > > >>+1 > > > > >>But are we going to check al

Re: [dpdk-dev] Questions about API with no parameter check

2021-05-04 Thread Ananyev, Konstantin
> > 2021-04-29 09:16 (UTC-0700), Tyler Retzlaff: > > On Wed, Apr 07, 2021 at 05:10:00PM +0100, Ferruh Yigit wrote: > > > On 4/7/2021 4:25 PM, Hemant Agrawal wrote: > > > >>+1 > > > >>But are we going to check all parameters? > > > > > > > >+1 > > > > > > > >It may be better to limit the number

Re: [dpdk-dev] Questions about API with no parameter check

2021-05-03 Thread Morten Brørup
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Tyler Retzlaff > Sent: Friday, April 30, 2021 2:16 AM > > On Thu, Apr 29, 2021 at 09:49:24PM +0300, Dmitry Kozlyuk wrote: > > 2021-04-29 09:16 (UTC-0700), Tyler Retzlaff: > > > On Wed, Apr 07, 2021 at 05:10:00PM +0100, Ferruh Yigit wrote: > >

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-29 Thread Tyler Retzlaff
On Thu, Apr 29, 2021 at 09:49:24PM +0300, Dmitry Kozlyuk wrote: > 2021-04-29 09:16 (UTC-0700), Tyler Retzlaff: > > On Wed, Apr 07, 2021 at 05:10:00PM +0100, Ferruh Yigit wrote: > > > On 4/7/2021 4:25 PM, Hemant Agrawal wrote: > > > >>+1 > > > >>But are we going to check all parameters? > > > >

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-29 Thread Dmitry Kozlyuk
2021-04-29 09:16 (UTC-0700), Tyler Retzlaff: > On Wed, Apr 07, 2021 at 05:10:00PM +0100, Ferruh Yigit wrote: > > On 4/7/2021 4:25 PM, Hemant Agrawal wrote: > > >>+1 > > >>But are we going to check all parameters? > > > > > >+1 > > > > > >It may be better to limit the number of checks. > > > >

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-29 Thread Tyler Retzlaff
On Wed, Apr 07, 2021 at 05:10:00PM +0100, Ferruh Yigit wrote: > On 4/7/2021 4:25 PM, Hemant Agrawal wrote: > >>+1 > >>But are we going to check all parameters? > > > >+1 > > > >It may be better to limit the number of checks. > > > > +1 to verify input for APIs. > > Why not do all, what is the dow

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-08 Thread Min Hu (Connor)
在 2021/4/8 16:22, Thomas Monjalon 写道: 08/04/2021 03:06, Min Hu (Connor): Thanks all, Well, Most people who replied support input verification for APIs. As the APIs are in control path APIs, so checking all input is OK. This is a large project because there are so many APIs and libs in DPDK.

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-08 Thread Thomas Monjalon
08/04/2021 03:06, Min Hu (Connor): > Thanks all, > Well, Most people who replied support input verification for APIs. > As the APIs are in control path APIs, so checking all input is OK. > > This is a large project because there are so many APIs and libs in DPDK. > I will send a set of patches to

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Min Hu (Connor)
Thanks all, Well, Most people who replied support input verification for APIs. As the APIs are in control path APIs, so checking all input is OK. This is a large project because there are so many APIs and libs in DPDK. I will send a set of patches to fix that. Thomas, Ferruh, and others, any opi

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Ajit Khaparde
On Wed, Apr 7, 2021 at 6:20 AM Jerin Jacob wrote: > > On Wed, Apr 7, 2021 at 5:23 PM Ananyev, Konstantin > wrote: > > > > > > > > > 07/04/2021 13:28, Min Hu (Connor): > > > > Hi, all, > > > > Many APIs in DPDK does not check if the pointer parameter is > > > > NULL or not. For example, in 'rt

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Burakov, Anatoly
On 07-Apr-21 5:10 PM, Ferruh Yigit wrote: On 4/7/2021 4:25 PM, Hemant Agrawal wrote: On 4/7/2021 8:10 PM, Ajit Khaparde wrote: On Wed, Apr 7, 2021 at 6:20 AM Jerin Jacob wrote: On Wed, Apr 7, 2021 at 5:23 PM Ananyev, Konstantin wrote: 07/04/2021 13:28, Min Hu (Connor): Hi, all, Ma

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Ferruh Yigit
On 4/7/2021 4:25 PM, Hemant Agrawal wrote: On 4/7/2021 8:10 PM, Ajit Khaparde wrote: On Wed, Apr 7, 2021 at 6:20 AM Jerin Jacob wrote: On Wed, Apr 7, 2021 at 5:23 PM Ananyev, Konstantin wrote: 07/04/2021 13:28, Min Hu (Connor): Hi, all, Many APIs in DPDK does not check if the point

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Hemant Agrawal
On 4/7/2021 8:10 PM, Ajit Khaparde wrote: On Wed, Apr 7, 2021 at 6:20 AM Jerin Jacob wrote: On Wed, Apr 7, 2021 at 5:23 PM Ananyev, Konstantin wrote: 07/04/2021 13:28, Min Hu (Connor): Hi, all, Many APIs in DPDK does not check if the pointer parameter is NULL or not. For example, i

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Jerin Jacob
On Wed, Apr 7, 2021 at 5:23 PM Ananyev, Konstantin wrote: > > > > > 07/04/2021 13:28, Min Hu (Connor): > > > Hi, all, > > > Many APIs in DPDK does not check if the pointer parameter is > > > NULL or not. For example, in 'rte_ethdev.c': > > > int > > > rte_eth_rx_queue_setup(uint16_t port_id, u

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Ananyev, Konstantin
> 07/04/2021 13:28, Min Hu (Connor): > > Hi, all, > > Many APIs in DPDK does not check if the pointer parameter is > > NULL or not. For example, in 'rte_ethdev.c': > > int > > rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, > >uint16_t nb_rx_desc, unsigned

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Liang Ma
On Wed, Apr 07, 2021 at 01:40:32PM +0200, Thomas Monjalon wrote: > 07/04/2021 13:28, Min Hu (Connor): > > Hi, all, > > Many APIs in DPDK does not check if the pointer parameter is > > NULL or not. For example, in 'rte_ethdev.c': > > int > > rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_q

Re: [dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Thomas Monjalon
07/04/2021 13:28, Min Hu (Connor): > Hi, all, > Many APIs in DPDK does not check if the pointer parameter is > NULL or not. For example, in 'rte_ethdev.c': > int > rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, > uint16_t nb_rx_desc, unsigned int socket_id

[dpdk-dev] Questions about API with no parameter check

2021-04-07 Thread Min Hu (Connor)
Hi, all, Many APIs in DPDK does not check if the pointer parameter is NULL or not. For example, in 'rte_ethdev.c': int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, const struct rte_