On Thu, Jul 04, 2024 at 05:18:35AM +0000, Soumyadeep Hore wrote: > cpfl_process_rx_ctlq_msg() is used to check error status > returned for specific opcodes. > > Previously error codes were only -ve for > cpfl_receive_ctlq_msg() but now there are +ve error codes. > Hence code changes are made accordingly. >
Is this a bugfix? If so, please reword title to start with "fix" and put in a fixes tag in the commit body here. If it fixes a commit not yet pulled to main I can merge the fix into the original commit in the net-intel tree. Also, I wonder if this patch should be split into two commits - one adding the new function for printing error messages, and the second for changing the return value check from < 0 to != 0. The two don't seem to be directly related to each other, so should be separate, I think. > Signed-off-by: Soumyadeep Hore <soumyadeep.h...@intel.com> > --- > drivers/net/cpfl/cpfl_flow_engine_fxp.c | 2 +- > drivers/net/cpfl/cpfl_fxp_rule.c | 52 +++++++++++++++++++++++++ > 2 files changed, 53 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/cpfl/cpfl_flow_engine_fxp.c > b/drivers/net/cpfl/cpfl_flow_engine_fxp.c > index 39a281fa61..983b4188e4 100644 > --- a/drivers/net/cpfl/cpfl_flow_engine_fxp.c > +++ b/drivers/net/cpfl/cpfl_flow_engine_fxp.c > @@ -95,7 +95,7 @@ cpfl_fxp_create(struct rte_eth_dev *dev, > > ret = cpfl_rule_process(itf, ad->ctlqp[cpq_id], ad->ctlqp[cpq_id + 1], > rim->rules, rim->rule_num, true); > - if (ret < 0) { > + if (ret) { Style nit - put in explicit "!= 0" for integer comparisons. > rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE, > NULL, > "cpfl filter create flow fail"); > rte_free(rim); <snip> Thanks, /Bruce