DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Su, Simei" <simei.su@intel.com>, "Yang, Qiming" <qiming.yang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Wang, Haiyue" <haiyue.wang@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"Ding, Xuan" <xuan.ding@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3 3/3] net/ice: support ACL filter in DCF
Date: Thu, 15 Oct 2020 05:10:55 +0000	[thread overview]
Message-ID: <fc51c7ba7e144f9fa09731df88662123@intel.com> (raw)
In-Reply-To: <20201014085415.177872-4-simei.su@intel.com>

some minor captures

> -----Original Message-----
> From: Su, Simei <simei.su@intel.com>
> Sent: Wednesday, October 14, 2020 4:54 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Wang, Haiyue <haiyue.wang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Ding, Xuan <xuan.ding@intel.com>; Su, Simei
> <simei.su@intel.com>
> Subject: [PATCH v3 3/3] net/ice: support ACL filter in DCF
> 
> Add ice_acl_create_filter to create a rule and ice_acl_destroy_filter to destroy a
> rule. If a flow is matched by ACL filter, filter rule will be set to HW. Currently
> IPV4/IPV4_UDP/IPV4_TCP/IPV4_SCTP pattern and drop action are supported.
> 
> Signed-off-by: Simei Su <simei.su@intel.com>
> Signed-off-by: Xuan Ding <xuan.ding@intel.com>
> ---
>  doc/guides/rel_notes/release_20_11.rst |    6 +
>  drivers/net/ice/ice_acl_filter.c       | 1034
> ++++++++++++++++++++++++++++++++
>  drivers/net/ice/ice_ethdev.h           |   17 +
>  drivers/net/ice/ice_generic_flow.c     |    2 +
>  drivers/net/ice/meson.build            |    3 +-
>  5 files changed, 1061 insertions(+), 1 deletion(-)  create mode 100644
> drivers/net/ice/ice_acl_filter.c
> 
> diff --git a/doc/guides/rel_notes/release_20_11.rst
> b/doc/guides/rel_notes/release_20_11.rst
> index e8ae4d4..6cf1ef8 100644
> --- a/doc/guides/rel_notes/release_20_11.rst
> +++ b/doc/guides/rel_notes/release_20_11.rst
...

> +#define MAX_ACL_SLOTS_ID 2048
> +
> +#define ICE_ACL_INSET_ETH_IPV4 ( \
> +	ICE_INSET_SMAC | ICE_INSET_DMAC | \
> +	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST) #define
> +ICE_ACL_INSET_ETH_IPV4_UDP ( \
> +	ICE_INSET_SMAC | ICE_INSET_DMAC | \
> +	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
> +	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT) 


Better to reuse ICE_ACL_INSET_ETH_IPV4 in ICE_ACL_INSET_ETH_IPV4_UDP

...
> +static void
> +acl_prof_helper_function(struct ice_hw *hw, struct ice_flow_seg_info *seg,

The function is always used before ice_add_prof, so better rename to acl_add_prof_prepare.

> +			 bool is_l4, uint16_t src_port, uint16_t dst_port) {
> +	uint16_t val_loc, mask_loc;
> +
> +	ret = ice_acl_parse_action(ad, actions, error, filter);
> +	if (ret)
> +		goto error;
> +
> +	if (meta)
> +		*meta = filter;
> +
> +error:
> +	rte_free(item);
> +	return ret;
> +}
> +
....

> 
> +struct ice_acl_conf {
> +	struct ice_fdir_fltr input;
> +	uint64_t input_set;
> +};
> +
> +/**
> + * A structure used to define fields of ACL related info.
> + */
> +struct ice_acl_info {
> +	struct ice_acl_conf conf;
> +};
> +
>  struct ice_pf {
>  	struct ice_adapter *adapter; /* The adapter this PF associate to */
>  	struct ice_vsi *main_vsi; /* pointer to main VSI structure */ @@ -421,6
> +435,7 @@ struct ice_pf {
>  	uint16_t fdir_nb_qps; /* The number of queue pairs of Flow Director */
>  	uint16_t fdir_qp_offset;
>  	struct ice_fdir_info fdir; /* flow director info */
> +	struct ice_acl_info acl; /* ACL info */
>  	struct ice_hash_ctx hash_ctx;
>  	uint16_t hw_prof_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX];
>  	uint16_t fdir_fltr_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX];
> @@ -440,6 +455,8 @@ struct ice_pf {
>  	uint64_t old_rx_bytes;
>  	uint64_t old_tx_bytes;
>  	uint64_t supported_rxdid; /* bitmap for supported RXDID */
> +	struct rte_bitmap *slots;
> +	uint64_t hw_entry_id[MAX_ACL_ENTRIES];

Can we move above 2 fields into ice_acl_info?

>  };
> 
>


  reply	other threads:[~2020-10-15  5:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  7:37 [dpdk-dev] [PATCH v1 0/3] net/ice: support DCF ACL capabiltiy Simei Su
2020-09-10  7:37 ` [dpdk-dev] [PATCH v1 1/3] net/ice: get PF VSI map Simei Su
2020-09-10  7:37 ` [dpdk-dev] [PATCH v1 2/3] net/ice: add devarg for ACL ipv4 rule number Simei Su
2020-09-10  7:53   ` Wang, Haiyue
2020-09-10  7:37 ` [dpdk-dev] [PATCH v1 3/3] net/ice: support ACL filter in DCF Simei Su
2020-09-29  1:56 ` [dpdk-dev] [PATCH v2 0/4] net/ice: support DCF ACL capabiltiy Simei Su
2020-09-29  1:56   ` [dpdk-dev] [PATCH v2 1/4] net/ice/base: change API from static to non-static Simei Su
2020-09-29  1:56   ` [dpdk-dev] [PATCH v2 2/4] net/ice: get PF VSI map Simei Su
2020-09-29  1:56   ` [dpdk-dev] [PATCH v2 3/4] net/ice: support ACL filter in DCF Simei Su
2020-09-29  1:56   ` [dpdk-dev] [PATCH v2 4/4] net/ice: add devarg for ACL ipv4 rule number Simei Su
2020-10-14  8:54   ` [dpdk-dev] [PATCH v3 0/3] net/ice: support DCF ACL capabiltiy Simei Su
2020-10-14  8:54     ` [dpdk-dev] [PATCH v3 1/3] net/ice/base: change API from static to non-static Simei Su
2020-10-14  8:54     ` [dpdk-dev] [PATCH v3 2/3] net/ice: get PF VSI map Simei Su
2020-10-14  8:54     ` [dpdk-dev] [PATCH v3 3/3] net/ice: support ACL filter in DCF Simei Su
2020-10-15  5:10       ` Zhang, Qi Z [this message]
2020-10-15  7:08         ` Su, Simei
2020-10-16  8:44     ` [dpdk-dev] [PATCH v4 0/3] net/ice: support DCF ACL capabiltiy Simei Su
2020-10-16  8:44       ` [dpdk-dev] [PATCH v4 1/3] net/ice/base: change API from static to non-static Simei Su
2020-10-16  8:44       ` [dpdk-dev] [PATCH v4 2/3] net/ice: get PF VSI map Simei Su
2020-10-16  8:44       ` [dpdk-dev] [PATCH v4 3/3] net/ice: support ACL filter in DCF Simei Su
2020-10-20 11:32       ` [dpdk-dev] [PATCH v5 0/3] net/ice: support DCF ACL capabiltiy Simei Su
2020-10-20 11:32         ` [dpdk-dev] [PATCH v5 1/3] net/ice/base: change API from static to non-static Simei Su
2020-10-20 11:32         ` [dpdk-dev] [PATCH v5 2/3] net/ice: get PF VSI map Simei Su
2020-10-20 11:32         ` [dpdk-dev] [PATCH v5 3/3] net/ice: support ACL filter in DCF Simei Su
2020-10-20 12:37         ` [dpdk-dev] [PATCH v5 0/3] net/ice: support DCF ACL capabiltiy Zhang, Qi Z

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=fc51c7ba7e144f9fa09731df88662123@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=simei.su@intel.com \
    --cc=xuan.ding@intel.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).