patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Shetty, Praveen" <praveen.shetty@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH v1] net/cpfl: fix invalid action types
Date: Fri, 23 Aug 2024 07:26:53 +0000	[thread overview]
Message-ID: <MW4PR11MB5911E7639A260A75B02D0AF49D882@MW4PR11MB5911.namprd11.prod.outlook.com> (raw)
In-Reply-To: <Zsdj5TXaxCGy8Oxm@bricha3-mobl1.ger.corp.intel.com>

> In case of CPFL PMD, port_representor action is used for the local 
> vport and represented_port action is used for the remote port(remote 
> port in this case is either the idpf pf or the vf port that is being 
> represeted by the cpfl pmd).
> Any mismatch in either of the cases PMD will throw an error.

Just FYI, you don't need to wrap lines in the commit body at 60 characters.
72 is a more normal log width to use.

Thanks, will incorporate this from next time.

Comment inline below. Will fix on apply.

/Bruce

> 
> Fixes: 441e777b85f1 ("net/cpfl: support represented port action")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
> ---
>  drivers/net/cpfl/cpfl_flow_engine_fxp.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/net/cpfl/cpfl_flow_engine_fxp.c 
> b/drivers/net/cpfl/cpfl_flow_engine_fxp.c
> index b9e825ef57..e760acd722 100644
> --- a/drivers/net/cpfl/cpfl_flow_engine_fxp.c
> +++ b/drivers/net/cpfl/cpfl_flow_engine_fxp.c
> @@ -292,6 +292,17 @@ cpfl_fxp_parse_action(struct cpfl_itf *itf,
>  
>  			is_vsi = (action_type == RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR ||
>  				  dst_itf->type == CPFL_ITF_TYPE_REPRESENTOR);
> +			/* Added checks to throw an error for the invalid action types. */
> +			if (action_type == RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR &&
> +				dst_itf->type == CPFL_ITF_TYPE_REPRESENTOR) {

This indentation here is problematic, because by indenting by one tab, the continuation of the condition lines up with the actual body of the if statement.
Two formats are allowed in DPDK to resolve this - either line up using spaces with the opening brace, or use two tabs to double-indent. The rule for which to use is to follow the convention already used in the file you are changing.

Thanks, will take care from next time.

> +				PMD_DRV_LOG(ERR, "Cannot use port_representor action for the represented_port");
> +				goto err;
> +			}
> +			if (action_type == RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT &&
> +				dst_itf->type == CPFL_ITF_TYPE_VPORT) {
> +				PMD_DRV_LOG(ERR, "Cannot use represented_port action for the local vport");
> +				goto err;
> +			}
>  			if (is_vsi)
>  				dev_id = cpfl_get_vsi_id(dst_itf);
>  			else
> --
> 2.34.1
> 

  reply	other threads:[~2024-08-23  7:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 11:45 Praveen Shetty
2024-08-22 16:14 ` Bruce Richardson
2024-08-23  7:26   ` Shetty, Praveen [this message]
2024-08-22 16:25 ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW4PR11MB5911E7639A260A75B02D0AF49D882@MW4PR11MB5911.namprd11.prod.outlook.com \
    --to=praveen.shetty@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).