Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-16 Thread Min Hu (Connor)
在 2021/4/16 18:09, Kevin Traynor 写道: On 16/04/2021 08:00, Min Hu (Connor) wrote: Thanks Kevin, all is fixed in v6, please review it, thanks. Some comments are below. 在 2021/4/15 20:04, Kevin Traynor 写道: On 15/04/2021 01:52, Min Hu (Connor) wrote: This patch adds more sanity

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-16 Thread Kevin Traynor
On 16/04/2021 08:00, Min Hu (Connor) wrote: > Thanks Kevin, > all is fixed in v6, please review it, thanks. > Some comments are below. > > 在 2021/4/15 20:04, Kevin Traynor 写道: >> On 15/04/2021 01:52, Min Hu (Connor) wrote: >>> This patch adds more sanity checks in control path APIs. >>

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-16 Thread Min Hu (Connor)
Hi, Thomas, v6 has been sent to fix it, please check it out, thanks. 在 2021/4/15 20:15, Thomas Monjalon 写道: 15/04/2021 14:04, Kevin Traynor: On 15/04/2021 01:52, Min Hu (Connor) wrote: + if (iter == NULL) { + RTE_ETHDEV_LOG(ERR, "Failed to iterator init for NULL\n")

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-16 Thread Min Hu (Connor)
Thanks Kevin, all is fixed in v6, please review it, thanks. Some comments are below. 在 2021/4/15 20:04, Kevin Traynor 写道: On 15/04/2021 01:52, Min Hu (Connor) wrote: This patch adds more sanity checks in control path APIs. Hi Connor, A few general comments, -- Some of the f

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-15 Thread Andrew Rybchenko
On 4/15/21 3:20 PM, Thomas Monjalon wrote: > 15/04/2021 14:03, Andrew Rybchenko: >> On 4/15/21 2:57 PM, Thomas Monjalon wrote: >>> 15/04/2021 10:15, Andrew Rybchenko: > RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); In theory, the first argument is sufficient to make th

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-15 Thread Thomas Monjalon
15/04/2021 14:03, Andrew Rybchenko: > On 4/15/21 2:57 PM, Thomas Monjalon wrote: > > 15/04/2021 10:15, Andrew Rybchenko: > >>> RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); > >> In theory, the first argument is sufficient to make the ops > >> check, but I think it is the right

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-15 Thread Thomas Monjalon
15/04/2021 14:04, Kevin Traynor: > On 15/04/2021 01:52, Min Hu (Connor) wrote: > > + if (iter == NULL) { > > + RTE_ETHDEV_LOG(ERR, "Failed to iterator init for NULL\n"); > > "Failed to init iterator for NULL iterator\n" The word "Failed" looks weird in these checks. What about "Cannot

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-15 Thread Kevin Traynor
On 15/04/2021 01:52, Min Hu (Connor) wrote: > This patch adds more sanity checks in control path APIs. > Hi Connor, A few general comments, -- Some of the functions have unit tests, you could consider adding unit tests for the new checks. Considering the checks are not subtle and unlikely to be

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-15 Thread Andrew Rybchenko
On 4/15/21 2:57 PM, Thomas Monjalon wrote: > 15/04/2021 10:15, Andrew Rybchenko: >>> RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); >> In theory, the first argument is sufficient to make the ops >> check, but I think it is the right solution to keep it as is >> since current t

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-15 Thread Thomas Monjalon
15/04/2021 10:15, Andrew Rybchenko: > > RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); > > In theory, the first argument is sufficient to make the ops > check, but I think it is the right solution to keep it as is > since current tendency is to check operation support when >

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-15 Thread Min Hu (Connor)
在 2021/4/15 16:15, Andrew Rybchenko 写道: On 4/15/21 3:52 AM, Min Hu (Connor) wrote: This patch adds more sanity checks in control path APIs. Fixes: 214ed1acd125 ("ethdev: add iterator to match devargs input") Fixes: 3d98f921fbe9 ("ethdev: unify prefix for static functions and variables") Fixe

Re: [dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-15 Thread Andrew Rybchenko
On 4/15/21 3:52 AM, Min Hu (Connor) wrote: > This patch adds more sanity checks in control path APIs. > > Fixes: 214ed1acd125 ("ethdev: add iterator to match devargs input") > Fixes: 3d98f921fbe9 ("ethdev: unify prefix for static functions and > variables") > Fixes: 0366137722a0 ("ethdev: check f

[dpdk-dev] [PATCH v4] ethdev: add sanity checks in control APIs

2021-04-14 Thread Min Hu (Connor)
This patch adds more sanity checks in control path APIs. Fixes: 214ed1acd125 ("ethdev: add iterator to match devargs input") Fixes: 3d98f921fbe9 ("ethdev: unify prefix for static functions and variables") Fixes: 0366137722a0 ("ethdev: check for invalid device name") Fixes: d948f596fee2 ("ethdev: f