[dpdk-stable] patch 'net/enic: remove flow count action support' has been queued to LTS release 18.11.3

Kevin Traynor ktraynor at redhat.com
Mon Jun 24 17:24:59 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/fa4f8eb5cd6bd17cbe2fbac61cdd91b2a06f23f2

Thanks.

Kevin Traynor

---
>From fa4f8eb5cd6bd17cbe2fbac61cdd91b2a06f23f2 Mon Sep 17 00:00:00 2001
From: John Daley <johndale at cisco.com>
Date: Thu, 6 Jun 2019 08:26:57 -0700
Subject: [PATCH] net/enic: remove flow count action support

[ upstream commit d74111a9a1e64688208a41c487ee9908d920f20a ]

The firmware in 1400 series VIC adapters which would support COUNT
flow action was postponed and reworked. The capability will be
re-added in a future release when the firmware is available.

This reverts the following commits.
commit 86df6c4e2fce ("net/enic: support flow counter action")
commit 1b4ce87dc5e6 ("net/enic: fix counter action")

Signed-off-by: John Daley <johndale at cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim at cisco.com>
---
 doc/guides/nics/enic.rst            |   6 --
 drivers/net/enic/base/vnic_dev.c    | 105 --------------------
 drivers/net/enic/base/vnic_dev.h    |   8 --
 drivers/net/enic/base/vnic_devcmd.h |  58 +----------
 drivers/net/enic/enic.h             |   5 -
 drivers/net/enic/enic_flow.c        | 144 +---------------------------
 drivers/net/enic/enic_main.c        |  11 +--
 drivers/net/enic/enic_res.c         |   6 +-
 8 files changed, 10 insertions(+), 333 deletions(-)

diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst
index c1b83b9b6..773f13b0f 100644
--- a/doc/guides/nics/enic.rst
+++ b/doc/guides/nics/enic.rst
@@ -261,10 +261,4 @@ Generic Flow API is supported. The baseline support is:
   - In total, up to 64 bytes of mask is allowed across all headers
 
-- **1400 and later series VICS with advanced filters enabled**
-
-  All the above plus:
-
-  - Action: count
-
 The VIC performs packet matching after applying VLAN strip. If VLAN
 stripping is enabled, EtherType in the ETH item corresponds to the
diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index fd303fece..16e8814a6 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -58,7 +58,4 @@ struct vnic_dev {
 		size_t size, void *vaddr,
 		dma_addr_t dma_handle);
-	struct vnic_counter_counts *flow_counters;
-	dma_addr_t flow_counters_pa;
-	u8 flow_counters_dma_active;
 };
 
@@ -68,6 +65,4 @@ struct vnic_dev {
 #define VNIC_RES_STRIDE	128
 
-#define VNIC_MAX_FLOW_COUNTERS 2048
-
 void *vnic_dev_priv(struct vnic_dev *vdev)
 {
@@ -617,33 +612,4 @@ int vnic_dev_stats_dump(struct vnic_dev *vdev, struct vnic_stats **stats)
 }
 
-/*
- * Configure counter DMA
- */
-int vnic_dev_counter_dma_cfg(struct vnic_dev *vdev, u32 period,
-			     u32 num_counters)
-{
-	u64 args[3];
-	int wait = 1000;
-	int err;
-
-	if (num_counters > VNIC_MAX_FLOW_COUNTERS)
-		return -ENOMEM;
-	if (period > 0 && (period < VNIC_COUNTER_DMA_MIN_PERIOD ||
-	    num_counters == 0))
-		return -EINVAL;
-
-	args[0] = num_counters;
-	args[1] = vdev->flow_counters_pa;
-	args[2] = period;
-	err =  vnic_dev_cmd_args(vdev, CMD_COUNTER_DMA_CONFIG, args, 3, wait);
-
-	/* record if DMAs need to be stopped on close */
-	if (!err)
-		vdev->flow_counters_dma_active = (num_counters != 0 &&
-						  period != 0);
-
-	return err;
-}
-
 int vnic_dev_close(struct vnic_dev *vdev)
 {
@@ -974,22 +940,4 @@ int vnic_dev_alloc_stats_mem(struct vnic_dev *vdev)
 }
 
-/*
- * Initialize for up to VNIC_MAX_FLOW_COUNTERS
- */
-int vnic_dev_alloc_counter_mem(struct vnic_dev *vdev)
-{
-	char name[NAME_MAX];
-	static u32 instance;
-
-	snprintf((char *)name, sizeof(name), "vnic_flow_ctrs-%u", instance++);
-	vdev->flow_counters = vdev->alloc_consistent(vdev->priv,
-					     sizeof(struct vnic_counter_counts)
-					     * VNIC_MAX_FLOW_COUNTERS,
-					     &vdev->flow_counters_pa,
-					     (u8 *)name);
-	vdev->flow_counters_dma_active = 0;
-	return vdev->flow_counters == NULL ? -ENOMEM : 0;
-}
-
 void vnic_dev_unregister(struct vnic_dev *vdev)
 {
@@ -1004,14 +952,4 @@ void vnic_dev_unregister(struct vnic_dev *vdev)
 				sizeof(struct vnic_stats),
 				vdev->stats, vdev->stats_pa);
-		if (vdev->flow_counters) {
-			/* turn off counter DMAs before freeing memory */
-			if (vdev->flow_counters_dma_active)
-				vnic_dev_counter_dma_cfg(vdev, 0, 0);
-
-			vdev->free_consistent(vdev->priv,
-				sizeof(struct vnic_counter_counts)
-				* VNIC_MAX_FLOW_COUNTERS,
-				vdev->flow_counters, vdev->flow_counters_pa);
-		}
 		if (vdev->fw_info)
 			vdev->free_consistent(vdev->priv,
@@ -1157,45 +1095,2 @@ int vnic_dev_capable_vxlan(struct vnic_dev *vdev)
 		(FEATURE_VXLAN_IPV6 | FEATURE_VXLAN_MULTI_WQ);
 }
-
-bool vnic_dev_counter_alloc(struct vnic_dev *vdev, uint32_t *idx)
-{
-	u64 a0 = 0;
-	u64 a1 = 0;
-	int wait = 1000;
-
-	if (vnic_dev_cmd(vdev, CMD_COUNTER_ALLOC, &a0, &a1, wait))
-		return false;
-	*idx = (uint32_t)a0;
-	return true;
-}
-
-bool vnic_dev_counter_free(struct vnic_dev *vdev, uint32_t idx)
-{
-	u64 a0 = idx;
-	u64 a1 = 0;
-	int wait = 1000;
-
-	return vnic_dev_cmd(vdev, CMD_COUNTER_FREE, &a0, &a1,
-			    wait) == 0;
-}
-
-bool vnic_dev_counter_query(struct vnic_dev *vdev, uint32_t idx,
-			    bool reset, uint64_t *packets, uint64_t *bytes)
-{
-	u64 a0 = idx;
-	u64 a1 = reset ? 1 : 0;
-	int wait = 1000;
-
-	if (reset) {
-		/* query/reset returns updated counters */
-		if (vnic_dev_cmd(vdev, CMD_COUNTER_QUERY, &a0, &a1, wait))
-			return false;
-		*packets = a0;
-		*bytes = a1;
-	} else {
-		/* Get values DMA'd from the adapter */
-		*packets = vdev->flow_counters[idx].vcc_packets;
-		*bytes = vdev->flow_counters[idx].vcc_bytes;
-	}
-	return true;
-}
diff --git a/drivers/net/enic/base/vnic_dev.h b/drivers/net/enic/base/vnic_dev.h
index de2645c43..270a47bd2 100644
--- a/drivers/net/enic/base/vnic_dev.h
+++ b/drivers/net/enic/base/vnic_dev.h
@@ -119,6 +119,4 @@ int vnic_dev_spec(struct vnic_dev *vdev, unsigned int offset, size_t size,
 int vnic_dev_stats_clear(struct vnic_dev *vdev);
 int vnic_dev_stats_dump(struct vnic_dev *vdev, struct vnic_stats **stats);
-int vnic_dev_counter_dma_cfg(struct vnic_dev *vdev, u32 period,
-			     u32 num_counters);
 int vnic_dev_hang_notify(struct vnic_dev *vdev);
 int vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast,
@@ -173,5 +171,4 @@ struct vnic_dev *vnic_dev_register(struct vnic_dev *vdev,
 struct rte_pci_device *vnic_dev_get_pdev(struct vnic_dev *vdev);
 int vnic_dev_alloc_stats_mem(struct vnic_dev *vdev);
-int vnic_dev_alloc_counter_mem(struct vnic_dev *vdev);
 int vnic_dev_cmd_init(struct vnic_dev *vdev, int fallback);
 int vnic_dev_get_size(void);
@@ -191,8 +188,3 @@ int vnic_dev_overlay_offload_cfg(struct vnic_dev *vdev, u8 overlay,
 	u16 vxlan_udp_port_number);
 int vnic_dev_capable_vxlan(struct vnic_dev *vdev);
-bool vnic_dev_counter_alloc(struct vnic_dev *vdev, uint32_t *idx);
-bool vnic_dev_counter_free(struct vnic_dev *vdev, uint32_t idx);
-bool vnic_dev_counter_query(struct vnic_dev *vdev, uint32_t idx,
-			    bool reset, uint64_t *packets, uint64_t *bytes);
-
 #endif /* _VNIC_DEV_H_ */
diff --git a/drivers/net/enic/base/vnic_devcmd.h b/drivers/net/enic/base/vnic_devcmd.h
index 3aad2dbd5..fffe307e0 100644
--- a/drivers/net/enic/base/vnic_devcmd.h
+++ b/drivers/net/enic/base/vnic_devcmd.h
@@ -599,46 +599,4 @@ enum vnic_devcmd_cmd {
 	 */
 	CMD_ADD_ADV_FILTER = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ENET, 77),
-
-	/*
-	 * Allocate a counter for use with CMD_ADD_FILTER
-	 * out:(u32) a0 = counter index
-	 */
-	CMD_COUNTER_ALLOC = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ENET, 85),
-
-	/*
-	 * Free a counter
-	 * in: (u32) a0 = counter_id
-	 */
-	CMD_COUNTER_FREE = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 86),
-
-	/*
-	 * Read a counter
-	 * in: (u32) a0 = counter_id
-	 *     (u32) a1 = clear counter if non-zero
-	 * out:(u64) a0 = packet count
-	 *     (u64) a1 = byte count
-	 */
-	CMD_COUNTER_QUERY = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ENET, 87),
-
-	/*
-	 * Configure periodic counter DMA.  This will trigger an immediate
-	 * DMA of the counters (unless period == 0), and then schedule a DMA
-	 * of the counters every <period> seconds until disdabled.
-	 * Each new COUNTER_DMA_CONFIG will override all previous commands on
-	 * this vnic.
-	 * Setting a2 (period) = 0 will disable periodic DMAs
-	 * If a0 (num_counters) != 0, an immediate DMA will always be done,
-	 * irrespective of the value in a2.
-	 * in: (u32) a0 = number of counters to DMA
-	 *     (u64) a1 = host target DMA address
-	 *     (u32) a2 = DMA period in milliseconds (0 to disable)
-	 */
-	CMD_COUNTER_DMA_CONFIG = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 88),
-#define VNIC_COUNTER_DMA_MIN_PERIOD 500
-
-	/*
-	 * Clear all counters on a vnic
-	 */
-	CMD_COUNTER_CLEAR_ALL = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ENET, 89),
 };
 
@@ -906,9 +864,7 @@ struct filter_action {
 #define FILTER_ACTION_FILTER_ID_FLAG	(1 << 1)
 #define FILTER_ACTION_DROP_FLAG		(1 << 2)
-#define FILTER_ACTION_COUNTER_FLAG      (1 << 3)
 #define FILTER_ACTION_V2_ALL		(FILTER_ACTION_RQ_STEERING_FLAG \
-					 | FILTER_ACTION_FILTER_ID_FLAG \
 					 | FILTER_ACTION_DROP_FLAG \
-					 | FILTER_ACTION_COUNTER_FLAG)
+					 | FILTER_ACTION_FILTER_ID_FLAG)
 
 /* Version 2 of filter action must be a strict extension of struct filter_action
@@ -920,6 +876,5 @@ struct filter_action_v2 {
 	u32 flags;                     /* use FILTER_ACTION_XXX_FLAG defines */
 	u16 filter_id;
-	u32 counter_index;
-	uint8_t reserved[28];         /* for future expansion */
+	uint8_t reserved[32];         /* for future expansion */
 } __attribute__((packed));
 
@@ -1168,12 +1123,3 @@ typedef enum {
 } grpintr_subcmd_t;
 
-/*
- * Structure for counter DMA
- * (DMAed by CMD_COUNTER_DMA_CONFIG)
- */
-struct vnic_counter_counts {
-	u64 vcc_packets;
-	u64 vcc_bytes;
-};
-
 #endif /* _VNIC_DEVCMD_H_ */
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index 4d6b82ee9..d4c460343 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -40,7 +40,4 @@
 	((((unsigned long)(x)) + ENIC_PAGE_SIZE-1) & (~(ENIC_PAGE_SIZE-1)))
 
-/* must be >= VNIC_COUNTER_DMA_MIN_PERIOD */
-#define VNIC_FLOW_COUNTER_UPDATE_MSECS 500
-
 #define ENICPMD_VFIO_PATH          "/dev/vfio/vfio"
 /*#define ENIC_DESC_COUNT_MAKE_ODD (x) do{if ((~(x)) & 1) { (x)--; } }while(0)*/
@@ -98,5 +95,4 @@ struct rte_flow {
 	u16 enic_filter_id;
 	struct filter_v2 enic_filter;
-	int counter_idx; /* NIC allocated counter index (-1 = invalid) */
 };
 
@@ -176,5 +172,4 @@ struct enic {
 
 	LIST_HEAD(enic_flows, rte_flow) flows;
-	int max_flow_counter;
 	rte_spinlock_t flows_lock;
 
diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index dbc8de839..c32f79bcf 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -338,13 +338,4 @@ static const enum rte_flow_action_type enic_supported_actions_v2_drop[] = {
 };
 
-static const enum rte_flow_action_type enic_supported_actions_v2_count[] = {
-	RTE_FLOW_ACTION_TYPE_QUEUE,
-	RTE_FLOW_ACTION_TYPE_MARK,
-	RTE_FLOW_ACTION_TYPE_FLAG,
-	RTE_FLOW_ACTION_TYPE_DROP,
-	RTE_FLOW_ACTION_TYPE_COUNT,
-	RTE_FLOW_ACTION_TYPE_END,
-};
-
 /** Action capabilities indexed by NIC version information */
 static const struct enic_action_cap enic_action_cap[] = {
@@ -361,8 +352,4 @@ static const struct enic_action_cap enic_action_cap[] = {
 		.copy_fn = enic_copy_action_v2,
 	},
-	[FILTER_ACTION_COUNTER_FLAG] = {
-		.actions = enic_supported_actions_v2_count,
-		.copy_fn = enic_copy_action_v2,
-	},
 };
 
@@ -1189,8 +1176,4 @@ enic_copy_action_v2(const struct rte_flow_action actions[],
 			break;
 		}
-		case RTE_FLOW_ACTION_TYPE_COUNT: {
-			enic_action->flags |= FILTER_ACTION_COUNTER_FLAG;
-			break;
-		}
 		case RTE_FLOW_ACTION_TYPE_VOID:
 			continue;
@@ -1237,7 +1220,5 @@ enic_get_action_cap(struct enic *enic)
 
 	actions = enic->filter_actions;
-	if (actions & FILTER_ACTION_COUNTER_FLAG)
-		ea = &enic_action_cap[FILTER_ACTION_COUNTER_FLAG];
-	else if (actions & FILTER_ACTION_DROP_FLAG)
+	if (actions & FILTER_ACTION_DROP_FLAG)
 		ea = &enic_action_cap[FILTER_ACTION_DROP_FLAG];
 	else if (actions & FILTER_ACTION_FILTER_ID_FLAG)
@@ -1523,7 +1504,5 @@ enic_flow_add_filter(struct enic *enic, struct filter_v2 *enic_filter,
 	struct rte_flow *flow;
 	int err;
-	uint16_t entry;
-	int ctr_idx;
-	int last_max_flow_ctr;
+	u16 entry;
 
 	FLOW_TRACE();
@@ -1536,32 +1515,4 @@ enic_flow_add_filter(struct enic *enic, struct filter_v2 *enic_filter,
 	}
 
-	flow->counter_idx = -1;
-	last_max_flow_ctr = -1;
-	if (enic_action->flags & FILTER_ACTION_COUNTER_FLAG) {
-		if (!vnic_dev_counter_alloc(enic->vdev, (uint32_t *)&ctr_idx)) {
-			rte_flow_error_set(error, ENOMEM,
-					   RTE_FLOW_ERROR_TYPE_ACTION_CONF,
-					   NULL, "cannot allocate counter");
-			goto unwind_flow_alloc;
-		}
-		flow->counter_idx = ctr_idx;
-		enic_action->counter_index = ctr_idx;
-
-		/* If index is the largest, increase the counter DMA size */
-		if (ctr_idx > enic->max_flow_counter) {
-			err = vnic_dev_counter_dma_cfg(enic->vdev,
-						 VNIC_FLOW_COUNTER_UPDATE_MSECS,
-						 ctr_idx + 1);
-			if (err) {
-				rte_flow_error_set(error, -err,
-					   RTE_FLOW_ERROR_TYPE_ACTION_CONF,
-					   NULL, "counter DMA config failed");
-				goto unwind_ctr_alloc;
-			}
-			last_max_flow_ctr = enic->max_flow_counter;
-			enic->max_flow_counter = ctr_idx;
-		}
-	}
-
 	/* entry[in] is the queue id, entry[out] is the filter Id for delete */
 	entry = enic_action->rq_idx;
@@ -1571,27 +1522,11 @@ enic_flow_add_filter(struct enic *enic, struct filter_v2 *enic_filter,
 		rte_flow_error_set(error, -err, RTE_FLOW_ERROR_TYPE_HANDLE,
 				   NULL, "vnic_dev_classifier error");
-		goto unwind_ctr_dma_cfg;
+		rte_free(flow);
+		return NULL;
 	}
 
 	flow->enic_filter_id = entry;
 	flow->enic_filter = *enic_filter;
-
 	return flow;
-
-/* unwind if there are errors */
-unwind_ctr_dma_cfg:
-	if (last_max_flow_ctr != -1) {
-		/* reduce counter DMA size */
-		vnic_dev_counter_dma_cfg(enic->vdev,
-					 VNIC_FLOW_COUNTER_UPDATE_MSECS,
-					 last_max_flow_ctr + 1);
-		enic->max_flow_counter = last_max_flow_ctr;
-	}
-unwind_ctr_alloc:
-	if (flow->counter_idx != -1)
-		vnic_dev_counter_free(enic->vdev, ctr_idx);
-unwind_flow_alloc:
-	rte_free(flow);
-	return NULL;
 }
 
@@ -1623,11 +1558,4 @@ enic_flow_del_filter(struct enic *enic, struct rte_flow *flow,
 		return -err;
 	}
-
-	if (flow->counter_idx != -1) {
-		if (!vnic_dev_counter_free(enic->vdev, flow->counter_idx))
-			dev_err(enic, "counter free failed, idx: %d\n",
-				flow->counter_idx);
-		flow->counter_idx = -1;
-	}
 	return 0;
 }
@@ -1746,67 +1674,4 @@ enic_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
 }
 
-static int
-enic_flow_query_count(struct rte_eth_dev *dev,
-		      struct rte_flow *flow, void *data,
-		      struct rte_flow_error *error)
-{
-	struct enic *enic = pmd_priv(dev);
-	struct rte_flow_query_count *query;
-	uint64_t packets, bytes;
-
-	FLOW_TRACE();
-
-	if (flow->counter_idx == -1) {
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
-					  NULL,
-					  "flow does not have counter");
-	}
-	query = (struct rte_flow_query_count *)data;
-	if (!vnic_dev_counter_query(enic->vdev, flow->counter_idx,
-				    !!query->reset, &packets, &bytes)) {
-		return rte_flow_error_set
-			(error, EINVAL,
-			 RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
-			 NULL,
-			 "cannot read counter");
-	}
-	query->hits_set = 1;
-	query->bytes_set = 1;
-	query->hits = packets;
-	query->bytes = bytes;
-	return 0;
-}
-
-static int
-enic_flow_query(struct rte_eth_dev *dev,
-		struct rte_flow *flow,
-		const struct rte_flow_action *actions,
-		void *data,
-		struct rte_flow_error *error)
-{
-	int ret = 0;
-
-	FLOW_TRACE();
-
-	for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
-		switch (actions->type) {
-		case RTE_FLOW_ACTION_TYPE_VOID:
-			break;
-		case RTE_FLOW_ACTION_TYPE_COUNT:
-			ret = enic_flow_query_count(dev, flow, data, error);
-			break;
-		default:
-			return rte_flow_error_set(error, ENOTSUP,
-						  RTE_FLOW_ERROR_TYPE_ACTION,
-						  actions,
-						  "action not supported");
-		}
-		if (ret < 0)
-			return ret;
-	}
-	return 0;
-}
-
 /**
  * Flow callback registration.
@@ -1819,4 +1684,3 @@ const struct rte_flow_ops enic_flow_ops = {
 	.destroy = enic_flow_destroy,
 	.flush = enic_flow_flush,
-	.query = enic_flow_query,
 };
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 098a18d63..44d2b2e78 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1682,5 +1682,4 @@ static int enic_dev_init(struct enic *enic)
 	LIST_INIT(&enic->flows);
 	rte_spinlock_init(&enic->flows_lock);
-	enic->max_flow_counter = -1;
 
 	/* set up link status checking */
@@ -1770,6 +1769,6 @@ int enic_probe(struct enic *enic)
 
 	/*
-	 * Allocate the consistent memory for stats and counters upfront so
-	 * both primary and secondary processes can access them.
+	 * Allocate the consistent memory for stats upfront so both primary and
+	 * secondary processes can dump stats.
 	 */
 	err = vnic_dev_alloc_stats_mem(enic->vdev);
@@ -1778,10 +1777,4 @@ int enic_probe(struct enic *enic)
 		goto err_out_unregister;
 	}
-	err = vnic_dev_alloc_counter_mem(enic->vdev);
-	if (err) {
-		dev_err(enic, "Failed to allocate counter memory, aborting\n");
-		goto err_out_unregister;
-	}
-
 	/* Issue device open to get device in known state */
 	err = enic_dev_open(enic);
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 78bb6b8f1..d53202f9b 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -85,5 +85,5 @@ int enic_get_vnic_config(struct enic *enic)
 				      &enic->udp_rss_weak);
 
-	dev_info(enic, "Flow api filter mode: %s Actions: %s%s%s%s\n",
+	dev_info(enic, "Flow api filter mode: %s Actions: %s%s%s\n",
 		((enic->flow_filter_mode == FILTER_DPDK_1) ? "DPDK" :
 		((enic->flow_filter_mode == FILTER_USNIC_IP) ? "USNIC" :
@@ -95,7 +95,5 @@ int enic_get_vnic_config(struct enic *enic)
 		 "tag " : ""),
 		((enic->filter_actions & FILTER_ACTION_DROP_FLAG) ?
-		 "drop " : ""),
-		((enic->filter_actions & FILTER_ACTION_COUNTER_FLAG) ?
-		 "count " : ""));
+		 "drop " : ""));
 
 	c->wq_desc_count =
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-06-24 16:18:56.892750467 +0100
+++ 0035-net-enic-remove-flow-count-action-support.patch	2019-06-24 16:18:55.063430468 +0100
@@ -1 +1 @@
-From d74111a9a1e64688208a41c487ee9908d920f20a Mon Sep 17 00:00:00 2001
+From fa4f8eb5cd6bd17cbe2fbac61cdd91b2a06f23f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d74111a9a1e64688208a41c487ee9908d920f20a ]
+
@@ -14,2 +15,0 @@
-Cc: stable at dpdk.org
-
@@ -24 +24 @@
- drivers/net/enic/enic_flow.c        | 146 +---------------------------
+ drivers/net/enic/enic_flow.c        | 144 +---------------------------
@@ -27 +27 @@
- 8 files changed, 10 insertions(+), 335 deletions(-)
+ 8 files changed, 10 insertions(+), 333 deletions(-)
@@ -30 +30 @@
-index cdb55e037..5681bdb54 100644
+index c1b83b9b6..773f13b0f 100644
@@ -45 +45 @@
-index 1e5b12a80..8e190687d 100644
+index fd303fece..16e8814a6 100644
@@ -63 +63 @@
-@@ -643,33 +638,4 @@ int vnic_dev_stats_dump(struct vnic_dev *vdev, struct vnic_stats **stats)
+@@ -617,33 +612,4 @@ int vnic_dev_stats_dump(struct vnic_dev *vdev, struct vnic_stats **stats)
@@ -97 +97 @@
-@@ -1000,22 +966,4 @@ int vnic_dev_alloc_stats_mem(struct vnic_dev *vdev)
+@@ -974,22 +940,4 @@ int vnic_dev_alloc_stats_mem(struct vnic_dev *vdev)
@@ -120 +120 @@
-@@ -1030,14 +978,4 @@ void vnic_dev_unregister(struct vnic_dev *vdev)
+@@ -1004,14 +952,4 @@ void vnic_dev_unregister(struct vnic_dev *vdev)
@@ -135 +135 @@
-@@ -1183,45 +1121,2 @@ int vnic_dev_capable_vxlan(struct vnic_dev *vdev)
+@@ -1157,45 +1095,2 @@ int vnic_dev_capable_vxlan(struct vnic_dev *vdev)
@@ -291 +291 @@
-index beb439ee7..859d018a0 100644
+index 4d6b82ee9..d4c460343 100644
@@ -294 +294 @@
-@@ -38,7 +38,4 @@
+@@ -40,7 +40,4 @@
@@ -302 +302 @@
-@@ -96,5 +93,4 @@ struct rte_flow {
+@@ -98,5 +95,4 @@ struct rte_flow {
@@ -308 +308 @@
-@@ -174,5 +170,4 @@ struct enic {
+@@ -176,5 +172,4 @@ struct enic {
@@ -315 +315 @@
-index cbc212e2a..f389677c0 100644
+index dbc8de839..c32f79bcf 100644
@@ -318 +318 @@
-@@ -361,15 +361,4 @@ static const enum rte_flow_action_type enic_supported_actions_v2_drop[] = {
+@@ -338,13 +338,4 @@ static const enum rte_flow_action_type enic_supported_actions_v2_drop[] = {
@@ -327,2 +326,0 @@
--	RTE_FLOW_ACTION_TYPE_RSS,
--	RTE_FLOW_ACTION_TYPE_PASSTHRU,
@@ -334 +332 @@
-@@ -386,8 +375,4 @@ static const struct enic_action_cap enic_action_cap[] = {
+@@ -361,8 +352,4 @@ static const struct enic_action_cap enic_action_cap[] = {
@@ -343 +341 @@
-@@ -1266,8 +1251,4 @@ enic_copy_action_v2(struct enic *enic,
+@@ -1189,8 +1176,4 @@ enic_copy_action_v2(const struct rte_flow_action actions[],
@@ -350,3 +348,3 @@
- 		case RTE_FLOW_ACTION_TYPE_RSS: {
- 			const struct rte_flow_action_rss *rss =
-@@ -1361,7 +1342,5 @@ enic_get_action_cap(struct enic *enic)
+ 		case RTE_FLOW_ACTION_TYPE_VOID:
+ 			continue;
+@@ -1237,7 +1220,5 @@ enic_get_action_cap(struct enic *enic)
@@ -361 +359 @@
-@@ -1647,7 +1626,5 @@ enic_flow_add_filter(struct enic *enic, struct filter_v2 *enic_filter,
+@@ -1523,7 +1504,5 @@ enic_flow_add_filter(struct enic *enic, struct filter_v2 *enic_filter,
@@ -370 +368 @@
-@@ -1660,32 +1637,4 @@ enic_flow_add_filter(struct enic *enic, struct filter_v2 *enic_filter,
+@@ -1536,32 +1515,4 @@ enic_flow_add_filter(struct enic *enic, struct filter_v2 *enic_filter,
@@ -403 +401 @@
-@@ -1695,27 +1644,11 @@ enic_flow_add_filter(struct enic *enic, struct filter_v2 *enic_filter,
+@@ -1571,27 +1522,11 @@ enic_flow_add_filter(struct enic *enic, struct filter_v2 *enic_filter,
@@ -433 +431 @@
-@@ -1747,11 +1680,4 @@ enic_flow_del_filter(struct enic *enic, struct rte_flow *flow,
+@@ -1623,11 +1558,4 @@ enic_flow_del_filter(struct enic *enic, struct rte_flow *flow,
@@ -445 +443 @@
-@@ -1870,67 +1796,4 @@ enic_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
+@@ -1746,67 +1674,4 @@ enic_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
@@ -513 +511 @@
-@@ -1943,4 +1806,3 @@ const struct rte_flow_ops enic_flow_ops = {
+@@ -1819,4 +1684,3 @@ const struct rte_flow_ops enic_flow_ops = {
@@ -519 +517 @@
-index cbd283946..2d6761bdd 100644
+index 098a18d63..44d2b2e78 100644
@@ -522 +520 @@
-@@ -1681,5 +1681,4 @@ static int enic_dev_init(struct enic *enic)
+@@ -1682,5 +1682,4 @@ static int enic_dev_init(struct enic *enic)
@@ -528 +526 @@
-@@ -1769,6 +1768,6 @@ int enic_probe(struct enic *enic)
+@@ -1770,6 +1769,6 @@ int enic_probe(struct enic *enic)
@@ -537 +535 @@
-@@ -1777,10 +1776,4 @@ int enic_probe(struct enic *enic)
+@@ -1778,10 +1777,4 @@ int enic_probe(struct enic *enic)
@@ -549 +547 @@
-index 21cfbb8c5..9405e1933 100644
+index 78bb6b8f1..d53202f9b 100644
@@ -552 +550 @@
-@@ -86,5 +86,5 @@ int enic_get_vnic_config(struct enic *enic)
+@@ -85,5 +85,5 @@ int enic_get_vnic_config(struct enic *enic)
@@ -559 +557 @@
-@@ -96,7 +96,5 @@ int enic_get_vnic_config(struct enic *enic)
+@@ -95,7 +95,5 @@ int enic_get_vnic_config(struct enic *enic)


More information about the stable mailing list