automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw131655 [PATCH] [v5, 25/26] net/nfp: refact the cppcore and PCIe module
@ 2023-09-20  3:11 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2023-09-20  3:11 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

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

_apply patch failure_

Submitter: Chaoyong He <chaoyong.he@corigine.com>
Date: Wednesday, September 20 2023 01:28:46 
Applied on: CommitID:a4e700a878e7fa2651fd718e61f7228c3277e556
Apply patch set 131655 failed:

Checking patch drivers/net/nfp/nfp_ethdev.c...
Hunk #2 succeeded at 915 (offset -5 lines).
Hunk #3 succeeded at 1124 (offset 3 lines).
Checking patch drivers/net/nfp/nfpcore/nfp6000_pcie.c...
error: drivers/net/nfp/nfpcore/nfp6000_pcie.c: does not exist in index
Checking patch drivers/net/nfp/nfpcore/nfp6000_pcie.h...
error: drivers/net/nfp/nfpcore/nfp6000_pcie.h: does not exist in index
Checking patch drivers/net/nfp/nfpcore/nfp_cpp.h...
error: while searching for:

/* NFP CPP core interface for CPP clients */
struct nfp_cpp *nfp_cpp_from_device_name(struct rte_pci_device *dev,
		int driver_lock_needed);

void nfp_cpp_free(struct nfp_cpp *cpp);

#define NFP_CPP_MODEL_INVALID   0xffffffff

/**
 * Retrieve the chip ID from the model ID
 *
 * The chip ID is a 16-bit BCD+A-F encoding for the chip type.
 *
 * @param model
 *   NFP CPP model id
 *
 * @return
 *   NFP CPP chip id
 */
#define NFP_CPP_MODEL_CHIP_of(model)        (((model) >> 16) & 0xffff)

/**
 * Check for the NFP6000 family of devices
 *
 * NOTE: The NFP4000 series is considered as a NFP6000 series variant.
 *
 * @param model
 *   NFP CPP model id
 *
 * @return
 *   true if model is in the NFP6000 family, false otherwise.
 */
#define NFP_CPP_MODEL_IS_6000(model)                         \
		((NFP_CPP_MODEL_CHIP_of(model) >= 0x3800) && \
		(NFP_CPP_MODEL_CHIP_of(model) < 0x7000))

uint32_t nfp_cpp_model(struct nfp_cpp *cpp);

/*

error: patch failed: drivers/net/nfp/nfpcore/nfp_cpp.h:226
error: while searching for:
 */
#define NFP_CPP_INTERFACE_CHANNEL_of(interface)	(((interface) >>  0) & 0xff)

uint16_t nfp_cpp_interface(struct nfp_cpp *cpp);

uint32_t nfp_cpp_serial(struct nfp_cpp *cpp, const uint8_t **serial);

error: patch failed: drivers/net/nfp/nfpcore/nfp_cpp.h:330
Checking patch drivers/net/nfp/nfpcore/nfp_cppcore.c...
error: while searching for:
}

static struct nfp_cpp *
nfp_cpp_alloc(struct rte_pci_device *dev,
		int driver_lock_needed)
{
	int err;
	struct nfp_cpp *cpp;
	const struct nfp_cpp_operations *ops;


error: patch failed: drivers/net/nfp/nfpcore/nfp_cppcore.c:909
error: while searching for:
		return NULL;

	cpp->op = ops;
	cpp->driver_lock_needed = driver_lock_needed;

	if (cpp->op->init) {
		err = cpp->op->init(cpp, dev);
		if (err < 0) {
			free(cpp);
			return NULL;
		}
	}

	if (NFP_CPP_MODEL_IS_6000(nfp_cpp_model(cpp))) {
		uint32_t xpb_addr;
		size_t target;

		for (target = 0; target < RTE_DIM(cpp->imb_cat_table); target++) {
			/* Hardcoded XPB IMB Base, island 0 */
			xpb_addr = 0x000a0000 + (target * 4);
			err = nfp_xpb_readl(cpp, xpb_addr,
					(uint32_t *)&cpp->imb_cat_table[target]);
			if (err < 0) {
				free(cpp);
				return NULL;
			}
		}
	}

	err = nfp_cpp_set_mu_locality_lsb(cpp);
	if (err < 0) {
		PMD_DRV_LOG(ERR, "Can't calculate MU locality bit offset");

error: patch failed: drivers/net/nfp/nfpcore/nfp_cppcore.c:925
error: while searching for:
 *
 * @param dev
 *   PCI device
 * @param driver_lock_needed
 *   Driver lock flag
 *

error: patch failed: drivers/net/nfp/nfpcore/nfp_cppcore.c:981
error: while searching for:
 */
struct nfp_cpp *
nfp_cpp_from_device_name(struct rte_pci_device *dev,
		int driver_lock_needed)
{
	return nfp_cpp_alloc(dev, driver_lock_needed);
}

/**

error: patch failed: drivers/net/nfp/nfpcore/nfp_cppcore.c:991
Applied patch drivers/net/nfp/nfp_ethdev.c cleanly.
Applying patch drivers/net/nfp/nfpcore/nfp_cpp.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch drivers/net/nfp/nfpcore/nfp_cppcore.c with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
hint: Use 'git am --show-current-patch' to see the failed patch
diff a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h	(rejected hunks)
@@ -226,40 +226,12 @@ uint32_t nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model);
 
 /* NFP CPP core interface for CPP clients */
 struct nfp_cpp *nfp_cpp_from_device_name(struct rte_pci_device *dev,
-		int driver_lock_needed);
+		void *priv, bool driver_lock_needed);
 
 void nfp_cpp_free(struct nfp_cpp *cpp);
 
 #define NFP_CPP_MODEL_INVALID   0xffffffff
 
-/**
- * Retrieve the chip ID from the model ID
- *
- * The chip ID is a 16-bit BCD+A-F encoding for the chip type.
- *
- * @param model
- *   NFP CPP model id
- *
- * @return
- *   NFP CPP chip id
- */
-#define NFP_CPP_MODEL_CHIP_of(model)        (((model) >> 16) & 0xffff)
-
-/**
- * Check for the NFP6000 family of devices
- *
- * NOTE: The NFP4000 series is considered as a NFP6000 series variant.
- *
- * @param model
- *   NFP CPP model id
- *
- * @return
- *   true if model is in the NFP6000 family, false otherwise.
- */
-#define NFP_CPP_MODEL_IS_6000(model)                         \
-		((NFP_CPP_MODEL_CHIP_of(model) >= 0x3800) && \
-		(NFP_CPP_MODEL_CHIP_of(model) < 0x7000))
-
 uint32_t nfp_cpp_model(struct nfp_cpp *cpp);
 
 /*
@@ -330,6 +302,12 @@ uint32_t nfp_cpp_model(struct nfp_cpp *cpp);
  */
 #define NFP_CPP_INTERFACE_CHANNEL_of(interface)	(((interface) >>  0) & 0xff)
 
+/*
+ * Use this channel ID for multiple virtual channel interfaces
+ * (ie ARM and PCIe) when setting up the interface field.
+ */
+#define NFP_CPP_INTERFACE_CHANNEL_PEROPENER    255
+
 uint16_t nfp_cpp_interface(struct nfp_cpp *cpp);
 
 uint32_t nfp_cpp_serial(struct nfp_cpp *cpp, const uint8_t **serial);
diff a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c	(rejected hunks)
@@ -909,10 +909,13 @@ nfp_xpb_readl(struct nfp_cpp *cpp,
 }
 
 static struct nfp_cpp *
-nfp_cpp_alloc(struct rte_pci_device *dev,
-		int driver_lock_needed)
+nfp_cpp_alloc(struct rte_pci_device *pci_dev,
+		void *priv,
+		bool driver_lock_needed)
 {
 	int err;
+	size_t target;
+	uint32_t xpb_addr;
 	struct nfp_cpp *cpp;
 	const struct nfp_cpp_operations *ops;
 
@@ -925,32 +928,50 @@ nfp_cpp_alloc(struct rte_pci_device *dev,
 		return NULL;
 
 	cpp->op = ops;
+	cpp->priv = priv;
 	cpp->driver_lock_needed = driver_lock_needed;
 
-	if (cpp->op->init) {
-		err = cpp->op->init(cpp, dev);
+	err = ops->get_interface(pci_dev, &cpp->interface);
+	if (err != 0) {
+		free(cpp);
+		return NULL;
+	}
+
+	err = ops->get_serial(pci_dev, cpp->serial, NFP_SERIAL_LEN);
+	if (err != 0) {
+		free(cpp);
+		return NULL;
+	}
+
+	/*
+	 * NOTE: cpp_lock is NOT locked for op->init,
+	 * since it may call NFP CPP API operations
+	 */
+	err = cpp->op->init(cpp, pci_dev);
+	if (err < 0) {
+		PMD_DRV_LOG(ERR, "NFP interface initialization failed");
+		free(cpp);
+		return NULL;
+	}
+
+	err = nfp_cpp_model_autodetect(cpp, &cpp->model);
+	if (err < 0) {
+		PMD_DRV_LOG(ERR, "NFP model detection failed");
+		free(cpp);
+		return NULL;
+	}
+
+	for (target = 0; target < RTE_DIM(cpp->imb_cat_table); target++) {
+		/* Hardcoded XPB IMB Base, island 0 */
+		xpb_addr = 0x000a0000 + (target * 4);
+		err = nfp_xpb_readl(cpp, xpb_addr, &cpp->imb_cat_table[target]);
 		if (err < 0) {
+			PMD_DRV_LOG(ERR, "Can't read CPP mapping from device");
 			free(cpp);
 			return NULL;
 		}
 	}
 
-	if (NFP_CPP_MODEL_IS_6000(nfp_cpp_model(cpp))) {
-		uint32_t xpb_addr;
-		size_t target;
-
-		for (target = 0; target < RTE_DIM(cpp->imb_cat_table); target++) {
-			/* Hardcoded XPB IMB Base, island 0 */
-			xpb_addr = 0x000a0000 + (target * 4);
-			err = nfp_xpb_readl(cpp, xpb_addr,
-					(uint32_t *)&cpp->imb_cat_table[target]);
-			if (err < 0) {
-				free(cpp);
-				return NULL;
-			}
-		}
-	}
-
 	err = nfp_cpp_set_mu_locality_lsb(cpp);
 	if (err < 0) {
 		PMD_DRV_LOG(ERR, "Can't calculate MU locality bit offset");
@@ -981,6 +1002,8 @@ nfp_cpp_free(struct nfp_cpp *cpp)
  *
  * @param dev
  *   PCI device
+ * @param priv
+ *   Private data of low-level implementation
  * @param driver_lock_needed
  *   Driver lock flag
  *
@@ -991,9 +1014,10 @@ nfp_cpp_free(struct nfp_cpp *cpp)
  */
 struct nfp_cpp *
 nfp_cpp_from_device_name(struct rte_pci_device *dev,
-		int driver_lock_needed)
+		void *priv,
+		bool driver_lock_needed)
 {
-	return nfp_cpp_alloc(dev, driver_lock_needed);
+	return nfp_cpp_alloc(dev, priv, driver_lock_needed);
 }
 
 /**

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

UNH-IOL DPDK Community Lab

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

only message in thread, other threads:[~2023-09-20  3:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-20  3:11 |WARNING| pw131655 [PATCH] [v5, 25/26] net/nfp: refact the cppcore and PCIe module 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).