automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw130251-130255 [PATCH] [v1, 5/5] net/cpfl: add fxp flow engine
@ 2023-08-12  7:50 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2023-08-12  7:50 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/130251

_apply patch failure_

Submitter: Yuying Zhang <yuying.zhang@intel.com>
Date: Saturday, August 12 2023 07:55:06 
Applied on: CommitID:70b6941e4e22d67bc10495d1638234a7e974f582
Apply patch set 130251-130255 failed:

Checking patch drivers/net/cpfl/cpfl_ethdev.c...
error: while searching for:
#include "cpfl_ethdev.h"
#include <ethdev_private.h>
#include "cpfl_rxtx.h"

#define CPFL_REPRESENTOR	"representor"
#define CPFL_TX_SINGLE_Q	"tx_single"

error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:16
Hunk #2 succeeded at 1058 (offset -142 lines).
error: while searching for:
		cpfl_p2p_queue_grps_del(vport);

	if (!cpfl_vport->exceptional) {
		adapter->cur_vports &= ~RTE_BIT32(vport->devarg_id);
		adapter->cur_vport_nb--;
		adapter->vports[vport->sw_idx] = NULL;

error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:1231
Hunk #4 succeeded at 1114 (offset -149 lines).
Hunk #5 succeeded at 1338 (offset -149 lines).
error: while searching for:
		goto err_create_ctrl_vport;
	}

	adapter->cur_vports = 0;
	adapter->cur_vport_nb = 0;


error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:2411
error: while searching for:

	return ret;

err_create_ctrl_vport:
	rte_free(adapter->vports);
err_vports_alloc:

error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:2418
error: while searching for:
	cpfl_vport->itf.type = CPFL_ITF_TYPE_VPORT;
	cpfl_vport->itf.adapter = adapter;
	cpfl_vport->itf.data = dev->data;
	adapter->vports[param->idx] = cpfl_vport;
	adapter->cur_vports |= RTE_BIT32(param->devarg_id);
	adapter->cur_vport_nb++;

error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:2574
error: while searching for:
static void
cpfl_adapter_ext_deinit(struct cpfl_adapter_ext *adapter)
{
	cpfl_ctrl_path_close(adapter);
	rte_eal_alarm_cancel(cpfl_dev_alarm_handler, adapter);
	cpfl_vport_map_uninit(adapter);

error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:2713
Checking patch drivers/net/cpfl/cpfl_ethdev.h...
error: while searching for:
	CPFL_ITF_TYPE_REPRESENTOR
};

struct cpfl_itf {
	enum cpfl_itf_type type;
	struct cpfl_adapter_ext *adapter;
	void *data;
};


error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:143
error: while searching for:
	rte_spinlock_t repr_lock;
	struct rte_hash *repr_whitelist_hash;

	/* ctrl vport and ctrl queues. */
	struct cpfl_vport ctrl_vport;
	uint8_t ctrl_vport_recv_info[IDPF_DFLT_MBX_BUF_SIZE];

error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:222
Checking patch drivers/net/cpfl/cpfl_flow.c...
Checking patch drivers/net/cpfl/cpfl_flow.h...
Checking patch drivers/net/cpfl/meson.build...
error: while searching for:
js_dep = dependency('json-c', required: false, method : 'pkg-config')
if js_dep.found()
    sources += files(
        'cpfl_flow_parser.c',
        'cpfl_rules.c',
        'cpfl_controlq.c',
    )
    dpdk_conf.set('CPFL_FLOW_JSON_SUPPORT', true)
    ext_deps += js_dep
endif
error: patch failed: drivers/net/cpfl/meson.build:42
Applying patch drivers/net/cpfl/cpfl_ethdev.c with 6 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Rejected hunk #6.
Rejected hunk #7.
Rejected hunk #8.
Rejected hunk #9.
Applying patch drivers/net/cpfl/cpfl_ethdev.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applied patch drivers/net/cpfl/cpfl_flow.c cleanly.
Applied patch drivers/net/cpfl/cpfl_flow.h cleanly.
Applying patch drivers/net/cpfl/meson.build with 1 reject...
Rejected hunk #1.
hint: Use 'git am --show-current-patch' to see the failed patch
diff a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c	(rejected hunks)
@@ -16,6 +16,7 @@
 #include "cpfl_ethdev.h"
 #include <ethdev_private.h>
 #include "cpfl_rxtx.h"
+#include "cpfl_flow.h"
 
 #define CPFL_REPRESENTOR	"representor"
 #define CPFL_TX_SINGLE_Q	"tx_single"
@@ -1231,6 +1245,7 @@ cpfl_dev_close(struct rte_eth_dev *dev)
 		cpfl_p2p_queue_grps_del(vport);
 
 	if (!cpfl_vport->exceptional) {
+		cpfl_flow_free(cpfl_vport);
 		adapter->cur_vports &= ~RTE_BIT32(vport->devarg_id);
 		adapter->cur_vport_nb--;
 		adapter->vports[vport->sw_idx] = NULL;
@@ -2411,6 +2450,13 @@ cpfl_adapter_ext_init(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *a
 		goto err_create_ctrl_vport;
 	}
 
+#ifdef CPFL_FLOW_JSON_SUPPORT
+	ret = cpfl_flow_init(adapter);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to init flow module");
+		goto err_flow_init;
+	}
+#endif
 	adapter->cur_vports = 0;
 	adapter->cur_vport_nb = 0;
 
@@ -2418,6 +2464,10 @@ cpfl_adapter_ext_init(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *a
 
 	return ret;
 
+#ifdef CPFL_FLOW_JSON_SUPPORT
+err_flow_init:
+	cpfl_ctrl_path_close(adapter);
+#endif
 err_create_ctrl_vport:
 	rte_free(adapter->vports);
 err_vports_alloc:
@@ -2574,6 +2624,7 @@ cpfl_dev_vport_init(struct rte_eth_dev *dev, void *init_params)
 	cpfl_vport->itf.type = CPFL_ITF_TYPE_VPORT;
 	cpfl_vport->itf.adapter = adapter;
 	cpfl_vport->itf.data = dev->data;
+	TAILQ_INIT(&cpfl_vport->itf.flow_list);
 	adapter->vports[param->idx] = cpfl_vport;
 	adapter->cur_vports |= RTE_BIT32(param->devarg_id);
 	adapter->cur_vport_nb++;
@@ -2713,6 +2764,9 @@ cpfl_find_adapter_ext(struct rte_pci_device *pci_dev)
 static void
 cpfl_adapter_ext_deinit(struct cpfl_adapter_ext *adapter)
 {
+#ifdef CPFL_FLOW_JSON_SUPPORT
+	cpfl_flow_uninit(adapter);
+#endif
 	cpfl_ctrl_path_close(adapter);
 	rte_eal_alarm_cancel(cpfl_dev_alarm_handler, adapter);
 	cpfl_vport_map_uninit(adapter);
diff a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h	(rejected hunks)
@@ -143,9 +143,12 @@ enum cpfl_itf_type {
 	CPFL_ITF_TYPE_REPRESENTOR
 };
 
+TAILQ_HEAD(cpfl_flow_list, rte_flow);
+
 struct cpfl_itf {
 	enum cpfl_itf_type type;
 	struct cpfl_adapter_ext *adapter;
+	struct cpfl_flow_list flow_list;
 	void *data;
 };
 
@@ -222,6 +225,8 @@ struct cpfl_adapter_ext {
 	rte_spinlock_t repr_lock;
 	struct rte_hash *repr_whitelist_hash;
 
+	struct cpfl_flow_js_parser *flow_parser;
+
 	/* ctrl vport and ctrl queues. */
 	struct cpfl_vport ctrl_vport;
 	uint8_t ctrl_vport_recv_info[IDPF_DFLT_MBX_BUF_SIZE];
diff a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build	(rejected hunks)
@@ -42,10 +42,11 @@ endif
 js_dep = dependency('json-c', required: false, method : 'pkg-config')
 if js_dep.found()
     sources += files(
+        'cpfl_flow.c',
         'cpfl_flow_parser.c',
         'cpfl_rules.c',
         'cpfl_controlq.c',
     )
     dpdk_conf.set('CPFL_FLOW_JSON_SUPPORT', true)
     ext_deps += js_dep
-endif
\ No newline at end of file
+endif
Checking patch drivers/net/cpfl/cpfl_controlq.c...
error: drivers/net/cpfl/cpfl_controlq.c: does not exist in index
Checking patch drivers/net/cpfl/cpfl_controlq.h...
error: drivers/net/cpfl/cpfl_controlq.h: does not exist in index
hint: Use 'git am --show-current-patch' to see the failed patch
Checking patch drivers/net/cpfl/cpfl_ethdev.h...
error: while searching for:

TAILQ_HEAD(cpfl_flow_list, rte_flow);

struct cpfl_itf {
	enum cpfl_itf_type type;
	struct cpfl_adapter_ext *adapter;
	struct cpfl_flow_list flow_list;
	void *data;
};


error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:145
Checking patch drivers/net/cpfl/cpfl_fxp_rule.c...
Checking patch drivers/net/cpfl/cpfl_fxp_rule.h...
Checking patch drivers/net/cpfl/meson.build...
error: while searching for:
        'cpfl_flow_parser.c',
        'cpfl_rules.c',
        'cpfl_controlq.c',
    )
    dpdk_conf.set('CPFL_FLOW_JSON_SUPPORT', true)
    ext_deps += js_dep

error: patch failed: drivers/net/cpfl/meson.build:46
Applying patch drivers/net/cpfl/cpfl_ethdev.h with 1 reject...
Rejected hunk #1.
Applied patch drivers/net/cpfl/cpfl_fxp_rule.c cleanly.
Applied patch drivers/net/cpfl/cpfl_fxp_rule.h cleanly.
Applying patch drivers/net/cpfl/meson.build with 1 reject...
Rejected hunk #1.
hint: Use 'git am --show-current-patch' to see the failed patch
diff a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h	(rejected hunks)
@@ -145,10 +145,14 @@ enum cpfl_itf_type {
 
 TAILQ_HEAD(cpfl_flow_list, rte_flow);
 
+#define CPFL_FLOW_BATCH_SIZE  490
 struct cpfl_itf {
 	enum cpfl_itf_type type;
 	struct cpfl_adapter_ext *adapter;
 	struct cpfl_flow_list flow_list;
+	struct idpf_dma_mem flow_dma;
+	struct idpf_dma_mem dma[CPFL_FLOW_BATCH_SIZE];
+	struct idpf_ctlq_msg msg[CPFL_FLOW_BATCH_SIZE];
 	void *data;
 };
 
diff a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build	(rejected hunks)
@@ -46,6 +46,7 @@ if js_dep.found()
         'cpfl_flow_parser.c',
         'cpfl_rules.c',
         'cpfl_controlq.c',
+	'cpfl_fxp_rule.c',
     )
     dpdk_conf.set('CPFL_FLOW_JSON_SUPPORT', true)
     ext_deps += js_dep
Checking patch drivers/net/cpfl/cpfl_ethdev.h...
error: while searching for:

#define CPFL_RX_CFGQ_NUM	4
#define CPFL_TX_CFGQ_NUM	4
#define CPFL_CFGQ_NUM		8

struct cpfl_vport_param {

error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:92
error: while searching for:
	struct rte_hash *repr_whitelist_hash;

	struct cpfl_flow_js_parser *flow_parser;

	/* ctrl vport and ctrl queues. */
	struct cpfl_vport ctrl_vport;

error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:230
error: while searching for:
	((struct cpfl_repr *)((dev)->data->dev_private))
#define CPFL_DEV_TO_ITF(dev)				\
	((struct cpfl_itf *)((dev)->data->dev_private))

#endif /* _CPFL_ETHDEV_H_ */

error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:265
Checking patch drivers/net/cpfl/cpfl_flow_engine_fxp.c...
Checking patch drivers/net/cpfl/meson.build...
error: while searching for:
if js_dep.found()
    sources += files(
        'cpfl_flow.c',
        'cpfl_flow_parser.c',
        'cpfl_rules.c',
        'cpfl_controlq.c',

error: patch failed: drivers/net/cpfl/meson.build:43
Applying patch drivers/net/cpfl/cpfl_ethdev.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Applied patch drivers/net/cpfl/cpfl_flow_engine_fxp.c cleanly.
Applying patch drivers/net/cpfl/meson.build with 1 reject...
Rejected hunk #1.
hint: Use 'git am --show-current-patch' to see the failed patch
diff a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h	(rejected hunks)
@@ -92,6 +92,8 @@
 
 #define CPFL_RX_CFGQ_NUM	4
 #define CPFL_TX_CFGQ_NUM	4
+#define CPFL_FPCP_CFGQ_TX       0
+#define CPFL_FPCP_CFGQ_RX       1
 #define CPFL_CFGQ_NUM		8
 
 struct cpfl_vport_param {
@@ -230,6 +232,8 @@ struct cpfl_adapter_ext {
 	struct rte_hash *repr_whitelist_hash;
 
 	struct cpfl_flow_js_parser *flow_parser;
+	struct rte_bitmap *mod_bm;
+	void *mod_bm_mem;
 
 	/* ctrl vport and ctrl queues. */
 	struct cpfl_vport ctrl_vport;
@@ -265,5 +269,86 @@ int cpfl_packets_dispatch(void *arg);
 	((struct cpfl_repr *)((dev)->data->dev_private))
 #define CPFL_DEV_TO_ITF(dev)				\
 	((struct cpfl_itf *)((dev)->data->dev_private))
+#define CPFL_INVALID_HW_ID      UINT16_MAX
+
+static inline uint16_t
+cpfl_get_port_id(struct cpfl_itf *itf)
+{
+	if (!itf)
+		return CPFL_INVALID_HW_ID;
+
+	if (itf->type == CPFL_ITF_TYPE_VPORT) {
+		struct cpfl_vport *vport = (void *)itf;
+
+		return vport->base.devarg_id;
+	}
+
+	return CPFL_INVALID_HW_ID;
+}
+
+static inline uint16_t
+cpfl_get_vsi_id(struct cpfl_itf *itf)
+{
+	struct cpfl_adapter_ext *adapter = itf->adapter;
+	struct cpfl_vport_info *info;
+	uint32_t vport_id;
+	int ret;
+	struct cpfl_vport_id vport_identity;
+
+	if (!itf)
+		return CPFL_INVALID_HW_ID;
+
+	if (itf->type == CPFL_ITF_TYPE_REPRESENTOR) {
+		struct cpfl_repr *repr = (void *)itf;
+
+		return repr->vport_info->vport_info.vsi_id;
+	} else if (itf->type == CPFL_ITF_TYPE_VPORT) {
+		vport_id = ((struct cpfl_vport *)itf)->base.vport_id;
+		vport_identity.func_type = CPCHNL2_FUNC_TYPE_PF;
+		/* host: HOST0_CPF_ID, acc: ACC_CPF_ID */
+		vport_identity.pf_id = ACC_CPF_ID;
+		vport_identity.vf_id = 0;
+		vport_identity.vport_id = vport_id;
+
+		ret = rte_hash_lookup_data(adapter->vport_map_hash, &vport_identity,
+					  (void **)&info);
+		if (ret < 0) {
+			PMD_DRV_LOG(ERR, "vport id not exist");
+			goto err;
+		}
+
+		/* rte_spinlock_unlock(&adapter->vport_map_lock); */
+		return info->vport_info.vsi_id;
+	}
+
+err:
+	/* rte_spinlock_unlock(&adapter->vport_map_lock); */
+	return CPFL_INVALID_HW_ID;
+}
+
+static inline struct cpfl_itf *
+cpfl_get_itf_by_port_id(uint16_t port_id)
+{
+	struct rte_eth_dev *dev;
+
+	if (port_id >= RTE_MAX_ETHPORTS) {
+		PMD_DRV_LOG(ERR, "port_id should be < %d.", RTE_MAX_ETHPORTS);
+		return NULL;
+	}
+
+	dev = &rte_eth_devices[port_id];
+
+	if (dev->state == RTE_ETH_DEV_UNUSED) {
+		PMD_DRV_LOG(ERR, "eth_dev[%d] is unused.", port_id);
+		return NULL;
+	}
+
+	if (!dev->data) {
+		PMD_DRV_LOG(ERR, "eth_dev[%d] data not be allocated.", port_id);
+		return NULL;
+	}
+
+	return CPFL_DEV_TO_ITF(dev);
+}
 
 #endif /* _CPFL_ETHDEV_H_ */
diff a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build	(rejected hunks)
@@ -43,6 +43,7 @@ js_dep = dependency('json-c', required: false, method : 'pkg-config')
 if js_dep.found()
     sources += files(
         'cpfl_flow.c',
+	'cpfl_flow_engine_fxp.c',
         'cpfl_flow_parser.c',
         'cpfl_rules.c',
         'cpfl_controlq.c',

https://lab.dpdk.org/results/dashboard/patchsets/27323/

UNH-IOL DPDK Community Lab

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-12  7:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-12  7:50 |WARNING| pw130251-130255 [PATCH] [v1, 5/5] net/cpfl: add fxp flow engine dpdklab

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).