DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Hyong Youb Kim (hyonkim)" <hyonkim@cisco.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	"Bernard Iremonger" <bernard.iremonger@intel.com>,
	Jeff Guo <jia.guo@intel.com>, "Ray Kinsella" <mdr@ashroe.eu>,
	Neil Horman <nhorman@tuxdriver.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	"John Daley (johndale)" <johndale@cisco.com>,
	Haiyue Wang <haiyue.wang@intel.com>,
	Matan Azrad <matan@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	"Rasesh Mody" <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 12/14] ethdev: remove legacy FDIR filter type support
Date: Fri, 23 Oct 2020 03:32:34 +0000
Message-ID: <DM5PR11MB1690FACD2A5CD42E07D535D9BF1A0@DM5PR11MB1690.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1603359758-13297-13-git-send-email-arybchenko@solarflare.com>

> -----Original Message-----
> From: Andrew Rybchenko <arybchenko@solarflare.com>
> Sent: Thursday, October 22, 2020 6:43 PM
> To: Wenzhuo Lu <wenzhuo.lu@intel.com>; Beilei Xing
> <beilei.xing@intel.com>; Bernard Iremonger
> <bernard.iremonger@intel.com>; Jeff Guo <jia.guo@intel.com>; Ray Kinsella
> <mdr@ashroe.eu>; Neil Horman <nhorman@tuxdriver.com>; Ajit Khaparde
> <ajit.khaparde@broadcom.com>; Somnath Kotur
> <somnath.kotur@broadcom.com>; John Daley (johndale)
> <johndale@cisco.com>; Hyong Youb Kim (hyonkim) <hyonkim@cisco.com>;
> Haiyue Wang <haiyue.wang@intel.com>; Matan Azrad <matan@nvidia.com>;
> Shahaf Shuler <shahafs@nvidia.com>; Viacheslav Ovsiienko
> <viacheslavo@nvidia.com>; Rasesh Mody <rmody@marvell.com>; Shahed
> Shaikh <shshaikh@marvell.com>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>; Thomas Monjalon
> <thomas@monjalon.net>; Ferruh Yigit <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v2 12/14] ethdev: remove legacy FDIR filter type support
> 
> Instead of FDIR filters RTE flow API should be used.
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Acked-by: Haiyue Wang <haiyue.wang@intel.com>
> ---
>  - cleanup testpmd user guide
>  - partially cleanup net/i40e documentation, please, review and
>    suggest how to fix remaining flow_director_filter command
[...]
>  drivers/net/enic/enic.h                     |   7 -
>  drivers/net/enic/enic_clsf.c                | 168 ----
>  drivers/net/enic/enic_ethdev.c              |  48 --
[...]
> diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
> index 5f0ae395da..079f194275 100644
> --- a/drivers/net/enic/enic.h
> +++ b/drivers/net/enic/enic.h
> @@ -394,12 +394,6 @@ enic_ring_incr(uint32_t n_descriptors, uint32_t idx)
>  }
> 
>  int dev_is_enic(struct rte_eth_dev *dev);
> -void enic_fdir_stats_get(struct enic *enic,
> -			 struct rte_eth_fdir_stats *stats);
> -int enic_fdir_add_fltr(struct enic *enic,
> -		       struct rte_eth_fdir_filter *params);
> -int enic_fdir_del_fltr(struct enic *enic,
> -		       struct rte_eth_fdir_filter *params);
>  void enic_free_wq(void *txq);
>  int enic_alloc_intr_resources(struct enic *enic);
>  int enic_setup_finish(struct enic *enic);
> @@ -464,7 +458,6 @@ bool enic_use_vector_rx_handler(struct rte_eth_dev
> *eth_dev);
>  void enic_pick_rx_handler(struct rte_eth_dev *eth_dev);
>  void enic_pick_tx_handler(struct rte_eth_dev *eth_dev);
>  void enic_fdir_info(struct enic *enic);
> -void enic_fdir_info_get(struct enic *enic, struct rte_eth_fdir_info *stats);
>  int enic_vf_representor_init(struct rte_eth_dev *eth_dev, void
> *init_params);
>  int enic_vf_representor_uninit(struct rte_eth_dev *ethdev);
>  int enic_fm_allocate_switch_domain(struct enic *pf);
> diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c
> index e206123ba5..1c837a4d09 100644
> --- a/drivers/net/enic/enic_clsf.c
> +++ b/drivers/net/enic/enic_clsf.c
> @@ -42,17 +42,6 @@ static void copy_fltr_v2(struct filter_v2 *fltr,
>  		const struct rte_eth_fdir_input *input,
>  		const struct rte_eth_fdir_masks *masks);
> 
> -void enic_fdir_stats_get(struct enic *enic, struct rte_eth_fdir_stats *stats)
> -{
> -	*stats = enic->fdir.stats;
> -}
> -
> -void enic_fdir_info_get(struct enic *enic, struct rte_eth_fdir_info *info)
> -{
> -	info->mode = (enum rte_fdir_mode)enic->fdir.modes;
> -	info->flow_types_mask[0] = enic->fdir.types_mask;
> -}
> -
>  void enic_fdir_info(struct enic *enic)
>  {
>  	enic->fdir.modes = (uint32_t)RTE_FDIR_MODE_PERFECT;
> @@ -305,163 +294,6 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct
> rte_eth_fdir_input *input,
>  	}
>  }
> 
> -int enic_fdir_del_fltr(struct enic *enic, struct rte_eth_fdir_filter *params)
> -{
> -	int32_t pos;
> -	struct enic_fdir_node *key;
> -	/* See if the key is in the table */
> -	pos = rte_hash_del_key(enic->fdir.hash, params);
> -	switch (pos) {
> -	case -EINVAL:
> -	case -ENOENT:
> -		enic->fdir.stats.f_remove++;
> -		return -EINVAL;
> -	default:
> -		/* The entry is present in the table */
> -		key = enic->fdir.nodes[pos];
> -
> -		/* Delete the filter */
> -		vnic_dev_classifier(enic->vdev, CLSF_DEL,
> -			&key->fltr_id, NULL, NULL);
> -		rte_free(key);
> -		enic->fdir.nodes[pos] = NULL;
> -		enic->fdir.stats.free++;
> -		enic->fdir.stats.remove++;
> -		break;
> -	}
> -	return 0;
> -}
> -
> -int enic_fdir_add_fltr(struct enic *enic, struct rte_eth_fdir_filter *params)
> -{
> -	struct enic_fdir_node *key;
> -	struct filter_v2 fltr;
> -	int32_t pos;
> -	uint8_t do_free = 0;
> -	uint16_t old_fltr_id = 0;
> -	uint32_t flowtype_supported;
> -	uint16_t flex_bytes;
> -	uint16_t queue;
> -	struct filter_action_v2 action;
> -
> -	memset(&fltr, 0, sizeof(fltr));
> -	memset(&action, 0, sizeof(action));
> -	flowtype_supported = enic->fdir.types_mask
> -			     & (1 << params->input.flow_type);
> -
> -	flex_bytes = ((params->input.flow_ext.flexbytes[1] << 8 & 0xFF00) |
> -		(params->input.flow_ext.flexbytes[0] & 0xFF));
> -
> -	if (!enic->fdir.hash ||
> -		(params->input.flow_ext.vlan_tci & 0xFFF) ||
> -		!flowtype_supported || flex_bytes ||
> -		params->action.behavior /* drop */) {
> -		enic->fdir.stats.f_add++;
> -		return -ENOTSUP;
> -	}
> -
> -	/* Get the enicpmd RQ from the DPDK Rx queue */
> -	queue = enic_rte_rq_idx_to_sop_idx(params->action.rx_queue);
> -
> -	if (!enic->rq[queue].in_use)
> -		return -EINVAL;
> -
> -	/* See if the key is already there in the table */
> -	pos = rte_hash_del_key(enic->fdir.hash, params);
> -	switch (pos) {
> -	case -EINVAL:
> -		enic->fdir.stats.f_add++;
> -		return -EINVAL;
> -	case -ENOENT:
> -		/* Add a new classifier entry */
> -		if (!enic->fdir.stats.free) {
> -			enic->fdir.stats.f_add++;
> -			return -ENOSPC;
> -		}
> -		key = rte_zmalloc("enic_fdir_node",
> -				  sizeof(struct enic_fdir_node), 0);
> -		if (!key) {
> -			enic->fdir.stats.f_add++;
> -			return -ENOMEM;
> -		}
> -		break;
> -	default:
> -		/* The entry is already present in the table.
> -		 * Check if there is a change in queue
> -		 */
> -		key = enic->fdir.nodes[pos];
> -		enic->fdir.nodes[pos] = NULL;
> -		if (unlikely(key->rq_index == queue)) {
> -			/* Nothing to be done */
> -			enic->fdir.stats.f_add++;
> -			pos = rte_hash_add_key(enic->fdir.hash, params);
> -			if (pos < 0) {
> -				dev_err(enic, "Add hash key failed\n");
> -				return pos;
> -			}
> -			enic->fdir.nodes[pos] = key;
> -			dev_warning(enic,
> -				"FDIR rule is already present\n");
> -			return 0;
> -		}
> -
> -		if (likely(enic->fdir.stats.free)) {
> -			/* Add the filter and then delete the old one.
> -			 * This is to avoid packets from going into the
> -			 * default queue during the window between
> -			 * delete and add
> -			 */
> -			do_free = 1;
> -			old_fltr_id = key->fltr_id;
> -		} else {
> -			/* No free slots in the classifier.
> -			 * Delete the filter and add the modified one later
> -			 */
> -			vnic_dev_classifier(enic->vdev, CLSF_DEL,
> -				&key->fltr_id, NULL, NULL);
> -			enic->fdir.stats.free++;
> -		}
> -
> -		break;
> -	}
> -
> -	key->filter = *params;
> -	key->rq_index = queue;
> -
> -	enic->fdir.copy_fltr_fn(&fltr, &params->input,
> -				&enic->rte_dev->data-
> >dev_conf.fdir_conf.mask);
> -	action.type = FILTER_ACTION_RQ_STEERING;
> -	action.rq_idx = queue;
> -
> -	if (!vnic_dev_classifier(enic->vdev, CLSF_ADD, &queue, &fltr,
> -	    &action)) {
> -		key->fltr_id = queue;
> -	} else {
> -		dev_err(enic, "Add classifier entry failed\n");
> -		enic->fdir.stats.f_add++;
> -		rte_free(key);
> -		return -1;
> -	}
> -
> -	if (do_free)
> -		vnic_dev_classifier(enic->vdev, CLSF_DEL, &old_fltr_id, NULL,
> -				    NULL);
> -	else{
> -		enic->fdir.stats.free--;
> -		enic->fdir.stats.add++;
> -	}
> -
> -	pos = rte_hash_add_key(enic->fdir.hash, params);
> -	if (pos < 0) {
> -		enic->fdir.stats.f_add++;
> -		dev_err(enic, "Add hash key failed\n");
> -		return pos;
> -	}
> -
> -	enic->fdir.nodes[pos] = key;
> -	return 0;
> -}
> -
>  void enic_clsf_destroy(struct enic *enic)
>  {
>  	uint32_t index;

Hi,

For enic:

Acked-by: Hyong Youb Kim <hyonkim@cisco.com>

Looks like you mechanically removed the things that caused compilation
errors. That is fine. Once this patch series lands, I will post a
follow-up cleanup patch for enic: remove the entire enic_clsf.c and
remaining traces of fdir in enic.h.

Thanks.
-Hyong


  reply	other threads:[~2020-10-23  3:32 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-18 14:08 [dpdk-dev] [PATCH 00/14] ethdev: remove legacy filter API Andrew Rybchenko
2020-10-18 14:08 ` [dpdk-dev] [PATCH 01/14] ethdev: remove legacy MACVLAN filter type support Andrew Rybchenko
2020-10-20 11:07   ` David Marchand
2020-10-21 16:34     ` Andrew Rybchenko
2020-10-21  3:31   ` Guo, Jia
2020-10-21 16:05     ` Andrew Rybchenko
2020-10-22  1:59       ` Guo, Jia
2020-10-18 14:08 ` [dpdk-dev] [PATCH 02/14] ethdev: move MAC filter type to i40e driver Andrew Rybchenko
2020-10-21  4:01   ` Guo, Jia
2020-10-21 16:09     ` Andrew Rybchenko
2020-10-22  2:58       ` Guo, Jia
2020-10-22  7:19         ` Andrew Rybchenko
2020-10-18 14:09 ` [dpdk-dev] [PATCH 03/14] ethdev: remove legacy EtherType filter type support Andrew Rybchenko
2020-10-18 22:13   ` Ajit Khaparde
2020-10-19  6:40   ` Wang, Haiyue
     [not found]   ` <BYAPR11MB3493BE2EB0D5B91DDDCD99758C1C0@BYAPR11MB3493.namprd11.prod.outlook.com>
2020-10-21  5:38     ` Guo, Jia
2020-10-21 16:12       ` Andrew Rybchenko
2020-10-18 14:09 ` [dpdk-dev] [PATCH 04/14] ethdev: remove legacy flexible " Andrew Rybchenko
2020-10-19  6:29   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 05/14] ethdev: move flexible filter type to e1000 driver Andrew Rybchenko
2020-10-19  6:20   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 06/14] ethdev: remove legacy SYN filter type support Andrew Rybchenko
2020-10-19  6:45   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 07/14] ethdev: remove legacy N-tuple " Andrew Rybchenko
2020-10-18 22:13   ` Ajit Khaparde
2020-10-19  6:47   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 08/14] ethdev: remove legacy TUNNEL " Andrew Rybchenko
2020-10-18 22:14   ` Ajit Khaparde
2020-10-19  8:01   ` Li, Xiaoyun
2020-10-18 14:09 ` [dpdk-dev] [PATCH 09/14] ethdev: remove legacy HASH " Andrew Rybchenko
2020-10-18 14:09 ` [dpdk-dev] [PATCH 10/14] ethdev: remove legacy L2_TUNNEL " Andrew Rybchenko
2020-10-19  6:42   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 11/14] ethdev: remove legacy global filter configuration support Andrew Rybchenko
2020-10-21  5:42   ` Guo, Jia
2020-10-18 14:09 ` [dpdk-dev] [PATCH 12/14] ethdev: remove legacy FDIR filter type support Andrew Rybchenko
2020-10-18 22:15   ` Ajit Khaparde
2020-10-19  6:53   ` Wang, Haiyue
2020-10-21  5:45   ` Guo, Jia
2020-10-21 16:17     ` Andrew Rybchenko
2020-10-22  2:45       ` Guo, Jia
2020-10-18 14:09 ` [dpdk-dev] [PATCH 13/14] app/testpmd: remove flow_director_flex_mask command Andrew Rybchenko
2020-10-20 10:53   ` David Marchand
2020-10-22  9:01     ` Andrew Rybchenko
2020-10-18 14:09 ` [dpdk-dev] [PATCH 14/14] ethdev: remove legacy filter API functions Andrew Rybchenko
2020-10-20 10:47   ` David Marchand
2020-10-20 14:52   ` Ferruh Yigit
2020-10-22  9:12     ` Andrew Rybchenko
2020-10-22  9:33       ` Ferruh Yigit
2020-10-22  9:42 ` [dpdk-dev] [PATCH v2 00/14] ethdev: remove legacy filter API Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 01/14] ethdev: remove legacy MACVLAN filter type support Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 02/14] ethdev: move MAC filter type to i40e driver Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 03/14] ethdev: remove legacy EtherType filter type support Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 04/14] ethdev: remove legacy flexible " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 05/14] ethdev: move flexible filter type to e1000 driver Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 06/14] ethdev: remove legacy SYN filter type support Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 07/14] ethdev: remove legacy N-tuple " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 08/14] ethdev: remove legacy TUNNEL " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 09/14] ethdev: remove legacy HASH " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 10/14] ethdev: remove legacy L2_TUNNEL " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 11/14] ethdev: remove legacy global filter configuration support Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 12/14] ethdev: remove legacy FDIR filter type support Andrew Rybchenko
2020-10-23  3:32     ` Hyong Youb Kim (hyonkim) [this message]
2020-10-23  6:41       ` Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 13/14] app/testpmd: remove command to set FDIR flexible filter mask Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 14/14] ethdev: remove legacy filter API functions Andrew Rybchenko
2020-10-23 16:03   ` [dpdk-dev] [PATCH v2 00/14] ethdev: remove legacy filter API Ferruh Yigit
2020-10-29 21:36     ` Ferruh Yigit

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=DM5PR11MB1690FACD2A5CD42E07D535D9BF1A0@DM5PR11MB1690.namprd11.prod.outlook.com \
    --to=hyonkim@cisco.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=arybchenko@solarflare.com \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=haiyue.wang@intel.com \
    --cc=jia.guo@intel.com \
    --cc=johndale@cisco.com \
    --cc=matan@nvidia.com \
    --cc=mdr@ashroe.eu \
    --cc=nhorman@tuxdriver.com \
    --cc=rmody@marvell.com \
    --cc=shahafs@nvidia.com \
    --cc=shshaikh@marvell.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=wenzhuo.lu@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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git