DPDK patches and discussions
 help / color / mirror / Atom feed
From: Satheesh Paul <psatheesh@marvell.com>
To: "Kinsella, Ray" <mdr@ashroe.eu>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar Kokkilagadda <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Koteswara Rao Kottidi <skoteshwar@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] common/cnxk: add ROC API to merge base steering rule
Date: Wed, 1 Sep 2021 05:07:29 +0000	[thread overview]
Message-ID: <DM5PR18MB224579CAEA0DD20BB5F61021BDCD9@DM5PR18MB2245.namprd18.prod.outlook.com> (raw)
In-Reply-To: <e704b395-4e3c-d971-9423-8ce5cab13a64@ashroe.eu>

Please find reply inline.

-----Original Message-----
From: Kinsella, Ray <mdr@ashroe.eu> 
Sent: 31 August 2021 09:11 PM
To: Satheesh Paul <psatheesh@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda <kirankumark@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Satha Koteswara Rao Kottidi <skoteshwar@marvell.com>
Cc: dev@dpdk.org
Subject: [EXT] Re: [dpdk-dev] [PATCH] common/cnxk: add ROC API to merge base steering rule

External Email

----------------------------------------------------------------------


On 31/08/2021 05:16, psatheesh@marvell.com wrote:
> From: Satheesh Paul <psatheesh@marvell.com>
> 
> This patch adds an ROC API to merge base steering rule with rules 
> added by VF.
> 
> Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
> Reviewed-by: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>
> ---
>  drivers/common/cnxk/roc_npc.c   | 27 +++++++++++++++++++++++++++
>  drivers/common/cnxk/roc_npc.h   |  5 ++---
>  drivers/common/cnxk/version.map |  1 +
>  3 files changed, 30 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/common/cnxk/roc_npc.c 
> b/drivers/common/cnxk/roc_npc.c index aff4eef554..53074bed99 100644
> --- a/drivers/common/cnxk/roc_npc.c
> +++ b/drivers/common/cnxk/roc_npc.c
> @@ -1136,3 +1136,30 @@ roc_npc_flow_dump(FILE *file, struct roc_npc *roc_npc)
>  		}
>  	}
>  }
> +
> +int
> +roc_npc_mcam_merge_base_steering_rule(struct roc_npc *roc_npc,
> +				      struct roc_npc_flow *flow)
> +{
> +	struct npc_mcam_read_base_rule_rsp *base_rule_rsp;
> +	struct npc *npc = roc_npc_to_npc_priv(roc_npc);
> +	struct mcam_entry *base_entry;
> +	int idx, rc;
> +
> +	if (roc_nix_is_pf(roc_npc->roc_nix))
> +		return 0;
> +
> +	(void)mbox_alloc_msg_npc_read_base_steer_rule(npc->mbox);
> +	rc = mbox_process_msg(npc->mbox, (void *)&base_rule_rsp);
> +	if (rc) {
> +		plt_err("Failed to fetch VF's base MCAM entry");
> +		return rc;
> +	}
> +	base_entry = &base_rule_rsp->entry_data;
> +	for (idx = 0; idx < ROC_NPC_MAX_MCAM_WIDTH_DWORDS; idx++) {
> +		flow->mcam_data[idx] |= base_entry->kw[idx];
> +		flow->mcam_mask[idx] |= base_entry->kw_mask[idx];
> +	}
> +
> +	return 0;
> +}
> diff --git a/drivers/common/cnxk/roc_npc.h 
> b/drivers/common/cnxk/roc_npc.h index bab25fd72e..1f9d29e2dd 100644
> --- a/drivers/common/cnxk/roc_npc.h
> +++ b/drivers/common/cnxk/roc_npc.h
> @@ -215,15 +215,12 @@ int __roc_api roc_npc_flow_parse(struct roc_npc *roc_npc,
>  				 const struct roc_npc_action actions[],
>  				 struct roc_npc_flow *flow);
>  int __roc_api roc_npc_get_low_priority_mcam(struct roc_npc *roc_npc);
> -
>  int __roc_api roc_npc_mcam_free_counter(struct roc_npc *roc_npc,
>  					uint16_t ctr_id);
> -
>  int __roc_api roc_npc_mcam_read_counter(struct roc_npc *roc_npc,
>  					uint32_t ctr_id, uint64_t *count);  int __roc_api 
> roc_npc_mcam_clear_counter(struct roc_npc *roc_npc,
>  					 uint32_t ctr_id);
> -
>  int __roc_api roc_npc_mcam_free_all_resources(struct roc_npc 
> *roc_npc);  void __roc_api roc_npc_flow_dump(FILE *file, struct 
> roc_npc *roc_npc);  void __roc_api roc_npc_flow_mcam_dump(FILE *file, 
> struct roc_npc *roc_npc, @@ -234,4 +231,6 @@ int __roc_api 
> roc_npc_mark_actions_sub_return(struct roc_npc *roc_npc,  int 
> __roc_api roc_npc_vtag_actions_get(struct roc_npc *roc_npc);  int __roc_api roc_npc_vtag_actions_sub_return(struct roc_npc *roc_npc,
>  					      uint32_t count);
> +int __roc_api roc_npc_mcam_merge_base_steering_rule(struct roc_npc *roc_npc,
> +						    struct roc_npc_flow *flow);

> Missing __rte_internal ?

__roc_api is defined as __rte_internal in "drivers/common/cnxk/roc_platform.h". 

>  #endif /* _ROC_NPC_H_ */
> diff --git a/drivers/common/cnxk/version.map 
> b/drivers/common/cnxk/version.map index 2cbcc4b93a..13231fcf04 100644
> --- a/drivers/common/cnxk/version.map
> +++ b/drivers/common/cnxk/version.map
> @@ -234,6 +234,7 @@ INTERNAL {
>  	roc_npc_mcam_free_all_resources;
>  	roc_npc_mcam_free_counter;
>  	roc_npc_mcam_free_entry;
> +	roc_npc_mcam_merge_base_steering_rule;
>  	roc_npc_mcam_write_entry;
>  	roc_npc_mcam_read_counter;
>  	roc_npc_profile_name_get;
> 

  reply	other threads:[~2021-09-01  5:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  4:16 [dpdk-dev] " psatheesh
2021-08-31 15:41 ` Kinsella, Ray
2021-09-01  5:07   ` Satheesh Paul [this message]
2021-09-01 11:16 ` Kinsella, Ray
2021-09-28 13:45   ` Jerin Jacob

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=DM5PR18MB224579CAEA0DD20BB5F61021BDCD9@DM5PR18MB2245.namprd18.prod.outlook.com \
    --to=psatheesh@marvell.com \
    --cc=dev@dpdk.org \
    --cc=kirankumark@marvell.com \
    --cc=mdr@ashroe.eu \
    --cc=ndabilpuram@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    /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).