automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw113282-113294 [PATCH] [v4, 13/13] net/nfp: modify RSS logic
@ 2022-06-23  2:50 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2022-06-23  2:50 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

[-- Attachment #1: Type: text/plain, Size: 113828 bytes --]

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

_apply patch failure_

Submitter: Jin Liu <jin.liu@corigine.com>
Date: Thursday, June 23 2022 02:26:15 
Applied on: CommitID:69033e3b843c81c74bcdd5e678c896c1fe1535ef
Apply patch set 113282-113294 failed:

Checking patch drivers/net/nfp/nfp_ethdev.c...
error: while searching for:

	/* unregister callback func from eal lib */
	rte_intr_callback_unregister(pci_dev->intr_handle,
				     nfp_net_dev_interrupt_handler,
				     (void *)dev);

	/*
	 * The ixgbe PMD disables the pcie master on the

error: patch failed: drivers/net/nfp/nfp_ethdev.c:340
error: while searching for:
	struct nfp_pf_dev *pf_dev;
	struct nfp_net_hw *hw;
	struct rte_ether_addr *tmp_ether_addr;

	uint64_t tx_bar_off = 0, rx_bar_off = 0;
	uint32_t start_q;
	int stride = 4;
	int port = 0;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:388
error: while searching for:

	/* NFP can not handle DMA addresses requiring more than 40 bits */
	if (rte_mem_check_dma_mask(40)) {
		RTE_LOG(ERR, PMD, "device %s can not be used:",
				   pci_dev->device.name);
		RTE_LOG(ERR, PMD, "\trestricted dma mask to 40 bits!\n");
		return -ENODEV;
	};

	port = ((struct nfp_net_hw *)eth_dev->data->dev_private)->idx;
	if (port < 0 || port > 7) {

error: patch failed: drivers/net/nfp/nfp_ethdev.c:404
error: while searching for:
		return -ENODEV;
	}

	/* Use PF array of physical ports to get pointer to
	 * this specific port
	 */
	hw = pf_dev->ports[port];

	PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, "
			    "NFP internal port number: %d",
			    port, hw->nfp_idx);

	eth_dev->dev_ops = &nfp_net_eth_dev_ops;
	eth_dev->rx_queue_count = nfp_net_rx_queue_count;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:416
error: while searching for:
	if (port == 0) {
		hw->ctrl_bar = pf_dev->ctrl_bar;
	} else {
		if (!pf_dev->ctrl_bar)
			return -ENODEV;
		/* Use port offset in pf ctrl_bar for this
		 * ports control bar
		 */
		hw->ctrl_bar = pf_dev->ctrl_bar +
			       (port * NFP_PF_CSR_SLICE_SIZE);
	}

	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);

error: patch failed: drivers/net/nfp/nfp_ethdev.c:456
error: while searching for:

	tmp_ether_addr = (struct rte_ether_addr *)&hw->mac_addr;
	if (!rte_is_valid_assigned_ether_addr(tmp_ether_addr)) {
		PMD_INIT_LOG(INFO, "Using random mac address for port %d",
				   port);
		/* Using random mac addresses for VFs */
		rte_eth_random_addr(&hw->mac_addr[0]);
		nfp_net_write_mac(hw, (uint8_t *)&hw->mac_addr);

error: patch failed: drivers/net/nfp/nfp_ethdev.c:557
error: while searching for:
	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
		/* Registering LSC interrupt handler */
		rte_intr_callback_register(pci_dev->intr_handle,
					   nfp_net_dev_interrupt_handler,
					   (void *)eth_dev);
		/* Telling the firmware about the LSC interrupt entry */
		nn_cfg_writeb(hw, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX);
		/* Recording current stats counters values */

error: patch failed: drivers/net/nfp/nfp_ethdev.c:583
error: while searching for:
}

static int
nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,
	     struct nfp_eth_table *nfp_eth_table, struct nfp_hwinfo *hwinfo)
{
	struct nfp_nsp *nsp;
	const char *nfp_fw_model;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:656
error: while searching for:

	if (nfp_eth_table->count == 0 || nfp_eth_table->count > 8) {
		PMD_DRV_LOG(ERR, "NFP ethernet table reports wrong ports: %u",
		       nfp_eth_table->count);
		return -EIO;
	}

	PMD_DRV_LOG(INFO, "NFP ethernet port table reports %u ports",
			   nfp_eth_table->count);

	PMD_DRV_LOG(INFO, "Port speed: %u", nfp_eth_table->ports[0].speed);


error: patch failed: drivers/net/nfp/nfp_ethdev.c:675
error: while searching for:
			nfp_eth_table->ports[0].speed / 1000);

	nsp = nfp_nsp_open(cpp);
	if (!nsp) {
		PMD_DRV_LOG(ERR, "NFP error when obtaining NSP handle");
		return -EIO;
	}

error: patch failed: drivers/net/nfp/nfp_ethdev.c:689
error: while searching for:
	return err;
}

static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)
{
	struct nfp_net_hw *hw;
	struct rte_eth_dev *eth_dev;
	struct nfp_eth_table *nfp_eth_table = NULL;
	int ret = 0;
	int i;

	nfp_eth_table = nfp_eth_read_ports(pf_dev->cpp);
	if (!nfp_eth_table) {
		PMD_INIT_LOG(ERR, "Error reading NFP ethernet table");
		ret = -EIO;
		goto error;
	}

	/* Loop through all physical ports on PF */

error: patch failed: drivers/net/nfp/nfp_ethdev.c:701
error: while searching for:

		/* Allocate a eth_dev for this phyport */
		eth_dev = rte_eth_dev_allocate(port_name);
		if (!eth_dev) {
			ret = -ENODEV;
			goto port_cleanup;
		}

error: patch failed: drivers/net/nfp/nfp_ethdev.c:726
error: while searching for:
		/* Allocate memory for this phyport */
		eth_dev->data->dev_private =
			rte_zmalloc_socket(port_name, sizeof(struct nfp_net_hw),
					   RTE_CACHE_LINE_SIZE, numa_node);
		if (!eth_dev->data->dev_private) {
			ret = -ENOMEM;
			rte_eth_dev_release_port(eth_dev);
			goto port_cleanup;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:734
error: while searching for:
		 * nfp_net_init
		 */
		ret = nfp_net_init(eth_dev);

		if (ret) {
			ret = -ENODEV;
			goto port_cleanup;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:759
error: while searching for:
	}
eth_table_cleanup:
	free(nfp_eth_table);
error:
	return ret;
}

static int nfp_pf_init(struct rte_pci_device *pci_dev)
{
	struct nfp_pf_dev *pf_dev = NULL;
	struct nfp_cpp *cpp;
	struct nfp_hwinfo *hwinfo;
	struct nfp_rtsym_table *sym_tbl;
	struct nfp_eth_table *nfp_eth_table = NULL;
	char name[RTE_ETH_NAME_MAX_LEN];
	int total_ports;
	int ret = -ENODEV;
	int err;

	if (!pci_dev)
		return ret;

	/*
	 * When device bound to UIO, the device could be used, by mistake,

error: patch failed: drivers/net/nfp/nfp_ethdev.c:782
error: while searching for:
	else
		cpp = nfp_cpp_from_device_name(pci_dev, 1);

	if (!cpp) {
		PMD_INIT_LOG(ERR, "A CPP handle can not be obtained");
		ret = -EIO;
		goto error;
	}

	hwinfo = nfp_hwinfo_read(cpp);
	if (!hwinfo) {
		PMD_INIT_LOG(ERR, "Error reading hwinfo table");
		ret = -EIO;
		goto error;
	}

	nfp_eth_table = nfp_eth_read_ports(cpp);
	if (!nfp_eth_table) {
		PMD_INIT_LOG(ERR, "Error reading NFP ethernet table");
		ret = -EIO;
		goto hwinfo_cleanup;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:813
error: while searching for:

	/* Now the symbol table should be there */
	sym_tbl = nfp_rtsym_table_read(cpp);
	if (!sym_tbl) {
		PMD_INIT_LOG(ERR, "Something is wrong with the firmware"
				" symbol table");
		ret = -EIO;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:841
error: while searching for:
	/* Allocate memory for the PF "device" */
	snprintf(name, sizeof(name), "nfp_pf%d", 0);
	pf_dev = rte_zmalloc(name, sizeof(*pf_dev), 0);
	if (!pf_dev) {
		ret = -ENOMEM;
		goto sym_tbl_cleanup;
	}

error: patch failed: drivers/net/nfp/nfp_ethdev.c:865
error: while searching for:

	/* Map the symbol table */
	pf_dev->ctrl_bar = nfp_rtsym_map(pf_dev->sym_tbl, "_pf0_net_bar0",
				     pf_dev->total_phyports * 32768,
				     &pf_dev->ctrl_area);
	if (!pf_dev->ctrl_bar) {
		PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for _pf0_net_ctrl_bar");
		ret = -EIO;
		goto pf_cleanup;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:883
error: while searching for:

	/* configure access to tx/rx vNIC BARs */
	pf_dev->hw_queues = nfp_cpp_map_area(pf_dev->cpp, 0, 0,
					      NFP_PCIE_QUEUE(0),
					      NFP_QCP_QUEUE_AREA_SZ,
					      &pf_dev->hwqueues_area);
	if (!pf_dev->hw_queues) {
		PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for net.qc");
		ret = -EIO;
		goto ctrl_area_cleanup;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:895
error: while searching for:

	PMD_INIT_LOG(DEBUG, "tx/rx bar address: 0x%p", pf_dev->hw_queues);

	/* Initialize and prep physical ports now
	 * This will loop through all physical ports
	 */
	ret = nfp_init_phyports(pf_dev);

error: patch failed: drivers/net/nfp/nfp_ethdev.c:906
error: while searching for:
 * is no need to initialise the PF again. Only minimal work is required
 * here
 */
static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
{
	struct nfp_cpp *cpp;
	struct nfp_rtsym_table *sym_tbl;
	int total_ports;
	int i;
	int err;

	if (!pci_dev)
		return -ENODEV;

	/*

error: patch failed: drivers/net/nfp/nfp_ethdev.c:941
error: while searching for:
	else
		cpp = nfp_cpp_from_device_name(pci_dev, 1);

	if (!cpp) {
		PMD_INIT_LOG(ERR, "A CPP handle can not be obtained");
		return -EIO;
	}

error: patch failed: drivers/net/nfp/nfp_ethdev.c:964
error: while searching for:
	 * here so we have to read the number of ports from firmware
	 */
	sym_tbl = nfp_rtsym_table_read(cpp);
	if (!sym_tbl) {
		PMD_INIT_LOG(ERR, "Something is wrong with the firmware"
				" symbol table");
		return -EIO;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:974
error: while searching for:
		snprintf(port_name, sizeof(port_name), "%s_port%d",
			 pci_dev->device.name, i);

		PMD_DRV_LOG(DEBUG, "Secondary attaching to port %s",
		    port_name);
		eth_dev = rte_eth_dev_attach_secondary(port_name);
		if (!eth_dev) {
			RTE_LOG(ERR, EAL,
			"secondary process attach failed, "
			"ethdev doesn't exist");
			return -ENODEV;
		}
		eth_dev->process_private = cpp;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:989
error: while searching for:
	return 0;
}

static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
			    struct rte_pci_device *dev)
{
	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
		return nfp_pf_init(dev);

error: patch failed: drivers/net/nfp/nfp_ethdev.c:1012
error: while searching for:
	},
};

static int nfp_pci_uninit(struct rte_eth_dev *eth_dev)
{
	struct rte_pci_device *pci_dev;
	uint16_t port_id;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:1035
error: while searching for:
	return -ENOTSUP;
}

static int eth_nfp_pci_remove(struct rte_pci_device *pci_dev)
{
	return rte_eth_dev_pci_generic_remove(pci_dev, nfp_pci_uninit);
}

error: patch failed: drivers/net/nfp/nfp_ethdev.c:1052
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
error: while searching for:

	/* NFP can not handle DMA addresses requiring more than 40 bits */
	if (rte_mem_check_dma_mask(40)) {
		RTE_LOG(ERR, PMD, "device %s can not be used:",
				   pci_dev->device.name);
		RTE_LOG(ERR, PMD, "\trestricted dma mask to 40 bits!\n");
		return -ENODEV;
	};

	hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);


error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:296
Applying patch drivers/net/nfp/nfp_ethdev.c with 28 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk #7.
Rejected hunk #8.
Rejected hunk #9.
Rejected hunk #10.
Rejected hunk #11.
Rejected hunk #12.
Rejected hunk #13.
Rejected hunk #14.
Rejected hunk #15.
Rejected hunk #16.
Rejected hunk #17.
Rejected hunk #18.
Rejected hunk #19.
Rejected hunk #20.
Rejected hunk #21.
Rejected hunk #22.
Rejected hunk #23.
Rejected hunk #24.
Rejected hunk #25.
Rejected hunk #26.
Rejected hunk #27.
Rejected hunk #28.
Applying patch drivers/net/nfp/nfp_ethdev_vf.c with 1 reject...
Rejected hunk #1.
diff a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c	(rejected hunks)
@@ -340,8 +340,7 @@ nfp_net_close(struct rte_eth_dev *dev)
 
 	/* unregister callback func from eal lib */
 	rte_intr_callback_unregister(pci_dev->intr_handle,
-				     nfp_net_dev_interrupt_handler,
-				     (void *)dev);
+			nfp_net_dev_interrupt_handler, (void *)dev);
 
 	/*
 	 * The ixgbe PMD disables the pcie master on the
@@ -388,8 +387,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	struct nfp_pf_dev *pf_dev;
 	struct nfp_net_hw *hw;
 	struct rte_ether_addr *tmp_ether_addr;
-
-	uint64_t tx_bar_off = 0, rx_bar_off = 0;
+	uint64_t rx_bar_off = 0;
+	uint64_t tx_bar_off = 0;
 	uint32_t start_q;
 	int stride = 4;
 	int port = 0;
@@ -404,11 +403,11 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 
 	/* NFP can not handle DMA addresses requiring more than 40 bits */
 	if (rte_mem_check_dma_mask(40)) {
-		RTE_LOG(ERR, PMD, "device %s can not be used:",
-				   pci_dev->device.name);
-		RTE_LOG(ERR, PMD, "\trestricted dma mask to 40 bits!\n");
+		RTE_LOG(ERR, PMD,
+			"device %s can not be used: restricted dma mask to 40 bits!\n",
+			pci_dev->device.name);
 		return -ENODEV;
-	};
+	}
 
 	port = ((struct nfp_net_hw *)eth_dev->data->dev_private)->idx;
 	if (port < 0 || port > 7) {
@@ -416,14 +415,14 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 		return -ENODEV;
 	}
 
-	/* Use PF array of physical ports to get pointer to
+	/*
+	 * Use PF array of physical ports to get pointer to
 	 * this specific port
 	 */
 	hw = pf_dev->ports[port];
 
 	PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, "
-			    "NFP internal port number: %d",
-			    port, hw->nfp_idx);
+			"NFP internal port number: %d", port, hw->nfp_idx);
 
 	eth_dev->dev_ops = &nfp_net_eth_dev_ops;
 	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
@@ -456,13 +455,10 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	if (port == 0) {
 		hw->ctrl_bar = pf_dev->ctrl_bar;
 	} else {
-		if (!pf_dev->ctrl_bar)
+		if (pf_dev->ctrl_bar == NULL)
 			return -ENODEV;
-		/* Use port offset in pf ctrl_bar for this
-		 * ports control bar
-		 */
-		hw->ctrl_bar = pf_dev->ctrl_bar +
-			       (port * NFP_PF_CSR_SLICE_SIZE);
+		/* Use port offset in pf ctrl_bar for this ports control bar */
+		hw->ctrl_bar = pf_dev->ctrl_bar + (port * NFP_PF_CSR_SLICE_SIZE);
 	}
 
 	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);
@@ -557,8 +553,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 
 	tmp_ether_addr = (struct rte_ether_addr *)&hw->mac_addr;
 	if (!rte_is_valid_assigned_ether_addr(tmp_ether_addr)) {
-		PMD_INIT_LOG(INFO, "Using random mac address for port %d",
-				   port);
+		PMD_INIT_LOG(INFO, "Using random mac address for port %d", port);
 		/* Using random mac addresses for VFs */
 		rte_eth_random_addr(&hw->mac_addr[0]);
 		nfp_net_write_mac(hw, (uint8_t *)&hw->mac_addr);
@@ -583,8 +578,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		/* Registering LSC interrupt handler */
 		rte_intr_callback_register(pci_dev->intr_handle,
-					   nfp_net_dev_interrupt_handler,
-					   (void *)eth_dev);
+				nfp_net_dev_interrupt_handler, (void *)eth_dev);
 		/* Telling the firmware about the LSC interrupt entry */
 		nn_cfg_writeb(hw, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX);
 		/* Recording current stats counters values */
@@ -656,8 +650,10 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
 }
 
 static int
-nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,
-	     struct nfp_eth_table *nfp_eth_table, struct nfp_hwinfo *hwinfo)
+nfp_fw_setup(struct rte_pci_device *dev,
+		struct nfp_cpp *cpp,
+		struct nfp_eth_table *nfp_eth_table,
+		struct nfp_hwinfo *hwinfo)
 {
 	struct nfp_nsp *nsp;
 	const char *nfp_fw_model;
@@ -675,12 +671,12 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,
 
 	if (nfp_eth_table->count == 0 || nfp_eth_table->count > 8) {
 		PMD_DRV_LOG(ERR, "NFP ethernet table reports wrong ports: %u",
-		       nfp_eth_table->count);
+			nfp_eth_table->count);
 		return -EIO;
 	}
 
 	PMD_DRV_LOG(INFO, "NFP ethernet port table reports %u ports",
-			   nfp_eth_table->count);
+			nfp_eth_table->count);
 
 	PMD_DRV_LOG(INFO, "Port speed: %u", nfp_eth_table->ports[0].speed);
 
@@ -689,7 +685,7 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,
 			nfp_eth_table->ports[0].speed / 1000);
 
 	nsp = nfp_nsp_open(cpp);
-	if (!nsp) {
+	if (nsp == NULL) {
 		PMD_DRV_LOG(ERR, "NFP error when obtaining NSP handle");
 		return -EIO;
 	}
@@ -701,19 +697,19 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,
 	return err;
 }
 
-static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)
+static int
+nfp_init_phyports(struct nfp_pf_dev *pf_dev)
 {
+	int i;
+	int ret = 0;
 	struct nfp_net_hw *hw;
 	struct rte_eth_dev *eth_dev;
-	struct nfp_eth_table *nfp_eth_table = NULL;
-	int ret = 0;
-	int i;
+	struct nfp_eth_table *nfp_eth_table;
 
 	nfp_eth_table = nfp_eth_read_ports(pf_dev->cpp);
-	if (!nfp_eth_table) {
+	if (nfp_eth_table == NULL) {
 		PMD_INIT_LOG(ERR, "Error reading NFP ethernet table");
-		ret = -EIO;
-		goto error;
+		return -EIO;
 	}
 
 	/* Loop through all physical ports on PF */
@@ -726,7 +722,7 @@ static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)
 
 		/* Allocate a eth_dev for this phyport */
 		eth_dev = rte_eth_dev_allocate(port_name);
-		if (!eth_dev) {
+		if (eth_dev == NULL) {
 			ret = -ENODEV;
 			goto port_cleanup;
 		}
@@ -734,8 +730,8 @@ static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)
 		/* Allocate memory for this phyport */
 		eth_dev->data->dev_private =
 			rte_zmalloc_socket(port_name, sizeof(struct nfp_net_hw),
-					   RTE_CACHE_LINE_SIZE, numa_node);
-		if (!eth_dev->data->dev_private) {
+				RTE_CACHE_LINE_SIZE, numa_node);
+		if (eth_dev->data->dev_private == NULL) {
 			ret = -ENOMEM;
 			rte_eth_dev_release_port(eth_dev);
 			goto port_cleanup;
@@ -759,7 +755,6 @@ static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)
 		 * nfp_net_init
 		 */
 		ret = nfp_net_init(eth_dev);
-
 		if (ret) {
 			ret = -ENODEV;
 			goto port_cleanup;
@@ -782,24 +777,25 @@ static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)
 	}
 eth_table_cleanup:
 	free(nfp_eth_table);
-error:
+
 	return ret;
 }
 
-static int nfp_pf_init(struct rte_pci_device *pci_dev)
+static int
+nfp_pf_init(struct rte_pci_device *pci_dev)
 {
-	struct nfp_pf_dev *pf_dev = NULL;
+	int err;
+	int ret = 0;
+	int total_ports;
 	struct nfp_cpp *cpp;
+	struct nfp_pf_dev *pf_dev;
 	struct nfp_hwinfo *hwinfo;
-	struct nfp_rtsym_table *sym_tbl;
-	struct nfp_eth_table *nfp_eth_table = NULL;
 	char name[RTE_ETH_NAME_MAX_LEN];
-	int total_ports;
-	int ret = -ENODEV;
-	int err;
+	struct nfp_rtsym_table *sym_tbl;
+	struct nfp_eth_table *nfp_eth_table;
 
-	if (!pci_dev)
-		return ret;
+	if (pci_dev == NULL)
+		return -ENODEV;
 
 	/*
 	 * When device bound to UIO, the device could be used, by mistake,
@@ -813,21 +809,21 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)
 	else
 		cpp = nfp_cpp_from_device_name(pci_dev, 1);
 
-	if (!cpp) {
+	if (cpp == NULL) {
 		PMD_INIT_LOG(ERR, "A CPP handle can not be obtained");
 		ret = -EIO;
 		goto error;
 	}
 
 	hwinfo = nfp_hwinfo_read(cpp);
-	if (!hwinfo) {
+	if (hwinfo == NULL) {
 		PMD_INIT_LOG(ERR, "Error reading hwinfo table");
 		ret = -EIO;
 		goto error;
 	}
 
 	nfp_eth_table = nfp_eth_read_ports(cpp);
-	if (!nfp_eth_table) {
+	if (nfp_eth_table == NULL) {
 		PMD_INIT_LOG(ERR, "Error reading NFP ethernet table");
 		ret = -EIO;
 		goto hwinfo_cleanup;
@@ -841,7 +837,7 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)
 
 	/* Now the symbol table should be there */
 	sym_tbl = nfp_rtsym_table_read(cpp);
-	if (!sym_tbl) {
+	if (sym_tbl == NULL) {
 		PMD_INIT_LOG(ERR, "Something is wrong with the firmware"
 				" symbol table");
 		ret = -EIO;
@@ -865,7 +861,7 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)
 	/* Allocate memory for the PF "device" */
 	snprintf(name, sizeof(name), "nfp_pf%d", 0);
 	pf_dev = rte_zmalloc(name, sizeof(*pf_dev), 0);
-	if (!pf_dev) {
+	if (pf_dev == NULL) {
 		ret = -ENOMEM;
 		goto sym_tbl_cleanup;
 	}
@@ -883,9 +879,8 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)
 
 	/* Map the symbol table */
 	pf_dev->ctrl_bar = nfp_rtsym_map(pf_dev->sym_tbl, "_pf0_net_bar0",
-				     pf_dev->total_phyports * 32768,
-				     &pf_dev->ctrl_area);
-	if (!pf_dev->ctrl_bar) {
+			pf_dev->total_phyports * 32768, &pf_dev->ctrl_area);
+	if (pf_dev->ctrl_bar == NULL) {
 		PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for _pf0_net_ctrl_bar");
 		ret = -EIO;
 		goto pf_cleanup;
@@ -895,10 +890,9 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)
 
 	/* configure access to tx/rx vNIC BARs */
 	pf_dev->hw_queues = nfp_cpp_map_area(pf_dev->cpp, 0, 0,
-					      NFP_PCIE_QUEUE(0),
-					      NFP_QCP_QUEUE_AREA_SZ,
-					      &pf_dev->hwqueues_area);
-	if (!pf_dev->hw_queues) {
+			NFP_PCIE_QUEUE(0), NFP_QCP_QUEUE_AREA_SZ,
+			&pf_dev->hwqueues_area);
+	if (pf_dev->hw_queues == NULL) {
 		PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for net.qc");
 		ret = -EIO;
 		goto ctrl_area_cleanup;
@@ -906,7 +900,8 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)
 
 	PMD_INIT_LOG(DEBUG, "tx/rx bar address: 0x%p", pf_dev->hw_queues);
 
-	/* Initialize and prep physical ports now
+	/*
+	 * Initialize and prep physical ports now
 	 * This will loop through all physical ports
 	 */
 	ret = nfp_init_phyports(pf_dev);
@@ -941,15 +936,16 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)
  * is no need to initialise the PF again. Only minimal work is required
  * here
  */
-static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
+static int
+nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 {
-	struct nfp_cpp *cpp;
-	struct nfp_rtsym_table *sym_tbl;
-	int total_ports;
 	int i;
 	int err;
+	int total_ports;
+	struct nfp_cpp *cpp;
+	struct nfp_rtsym_table *sym_tbl;
 
-	if (!pci_dev)
+	if (pci_dev == NULL)
 		return -ENODEV;
 
 	/*
@@ -964,7 +960,7 @@ static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 	else
 		cpp = nfp_cpp_from_device_name(pci_dev, 1);
 
-	if (!cpp) {
+	if (cpp == NULL) {
 		PMD_INIT_LOG(ERR, "A CPP handle can not be obtained");
 		return -EIO;
 	}
@@ -974,7 +970,7 @@ static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 	 * here so we have to read the number of ports from firmware
 	 */
 	sym_tbl = nfp_rtsym_table_read(cpp);
-	if (!sym_tbl) {
+	if (sym_tbl == NULL) {
 		PMD_INIT_LOG(ERR, "Something is wrong with the firmware"
 				" symbol table");
 		return -EIO;
@@ -989,13 +985,11 @@ static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 		snprintf(port_name, sizeof(port_name), "%s_port%d",
 			 pci_dev->device.name, i);
 
-		PMD_DRV_LOG(DEBUG, "Secondary attaching to port %s",
-		    port_name);
+		PMD_DRV_LOG(DEBUG, "Secondary attaching to port %s", port_name);
 		eth_dev = rte_eth_dev_attach_secondary(port_name);
-		if (!eth_dev) {
+		if (eth_dev == NULL) {
 			RTE_LOG(ERR, EAL,
-			"secondary process attach failed, "
-			"ethdev doesn't exist");
+				"secondary process attach failed, ethdev doesn't exist");
 			return -ENODEV;
 		}
 		eth_dev->process_private = cpp;
@@ -1012,8 +1006,9 @@ static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 	return 0;
 }
 
-static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
-			    struct rte_pci_device *dev)
+static int
+nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+		struct rte_pci_device *dev)
 {
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
 		return nfp_pf_init(dev);
@@ -1035,7 +1030,8 @@ static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
 	},
 };
 
-static int nfp_pci_uninit(struct rte_eth_dev *eth_dev)
+static int
+nfp_pci_uninit(struct rte_eth_dev *eth_dev)
 {
 	struct rte_pci_device *pci_dev;
 	uint16_t port_id;
@@ -1052,7 +1048,8 @@ static int nfp_pci_uninit(struct rte_eth_dev *eth_dev)
 	return -ENOTSUP;
 }
 
-static int eth_nfp_pci_remove(struct rte_pci_device *pci_dev)
+static int
+eth_nfp_pci_remove(struct rte_pci_device *pci_dev)
 {
 	return rte_eth_dev_pci_generic_remove(pci_dev, nfp_pci_uninit);
 }
diff a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c	(rejected hunks)
@@ -296,11 +296,11 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
 
 	/* NFP can not handle DMA addresses requiring more than 40 bits */
 	if (rte_mem_check_dma_mask(40)) {
-		RTE_LOG(ERR, PMD, "device %s can not be used:",
-				   pci_dev->device.name);
-		RTE_LOG(ERR, PMD, "\trestricted dma mask to 40 bits!\n");
+		RTE_LOG(ERR, PMD,
+			"device %s can not be used: restricted dma mask to 40 bits!\n",
+			pci_dev->device.name);
 		return -ENODEV;
-	};
+	}
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
 
Checking patch drivers/net/nfp/nfp_ethdev.c...
error: while searching for:
#include "nfp_ctrl.h"
#include "nfp_cpp_bridge.h"


static int nfp_net_pf_read_mac(struct nfp_pf_dev *pf_dev, int port);
static int nfp_net_start(struct rte_eth_dev *dev);
static int nfp_net_stop(struct rte_eth_dev *dev);
static int nfp_net_set_link_up(struct rte_eth_dev *dev);
static int nfp_net_set_link_down(struct rte_eth_dev *dev);
static int nfp_net_close(struct rte_eth_dev *dev);
static int nfp_net_init(struct rte_eth_dev *eth_dev);
static int nfp_fw_upload(struct rte_pci_device *dev,
			 struct nfp_nsp *nsp, char *card);
static int nfp_fw_setup(struct rte_pci_device *dev,
			struct nfp_cpp *cpp,
			struct nfp_eth_table *nfp_eth_table,
			struct nfp_hwinfo *hwinfo);
static int nfp_init_phyports(struct nfp_pf_dev *pf_dev);
static int nfp_pf_init(struct rte_pci_device *pci_dev);
static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev);
static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
			    struct rte_pci_device *dev);
static int nfp_pci_uninit(struct rte_eth_dev *eth_dev);
static int eth_nfp_pci_remove(struct rte_pci_device *pci_dev);

static int
nfp_net_pf_read_mac(struct nfp_pf_dev *pf_dev, int port)
{

error: patch failed: drivers/net/nfp/nfp_ethdev.c:38
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
error: while searching for:
#include "nfp_logs.h"
#include "nfp_ctrl.h"

static void nfp_netvf_read_mac(struct nfp_net_hw *hw);
static int nfp_netvf_start(struct rte_eth_dev *dev);
static int nfp_netvf_stop(struct rte_eth_dev *dev);
static int nfp_netvf_set_link_up(struct rte_eth_dev *dev);
static int nfp_netvf_set_link_down(struct rte_eth_dev *dev);
static int nfp_netvf_close(struct rte_eth_dev *dev);
static int nfp_netvf_init(struct rte_eth_dev *eth_dev);
static int nfp_vf_pci_uninit(struct rte_eth_dev *eth_dev);
static int eth_nfp_vf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
	struct rte_pci_device *pci_dev);
static int eth_nfp_vf_pci_remove(struct rte_pci_device *pci_dev);

static void
nfp_netvf_read_mac(struct nfp_net_hw *hw)
{

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:23
Checking patch drivers/net/nfp/nfp_rxtx.c...
error: while searching for:
#include "nfp_logs.h"
#include "nfp_ctrl.h"

/* Prototypes */
static int nfp_net_rx_fill_freelist(struct nfp_net_rxq *rxq);
static inline void nfp_net_mbuf_alloc_failed(struct nfp_net_rxq *rxq);
static inline void nfp_net_set_hash(struct nfp_net_rxq *rxq,
				    struct nfp_net_rx_desc *rxd,
				    struct rte_mbuf *mbuf);
static inline void nfp_net_rx_cksum(struct nfp_net_rxq *rxq,
				    struct nfp_net_rx_desc *rxd,
				    struct rte_mbuf *mb);
static void nfp_net_rx_queue_release_mbufs(struct nfp_net_rxq *rxq);
static int nfp_net_tx_free_bufs(struct nfp_net_txq *txq);
static void nfp_net_tx_queue_release_mbufs(struct nfp_net_txq *txq);
static inline uint32_t nfp_free_tx_desc(struct nfp_net_txq *txq);
static inline uint32_t nfp_net_txq_full(struct nfp_net_txq *txq);
static inline void nfp_net_tx_tso(struct nfp_net_txq *txq,
				  struct nfp_net_tx_desc *txd,
				  struct rte_mbuf *mb);
static inline void nfp_net_tx_cksum(struct nfp_net_txq *txq,
				    struct nfp_net_tx_desc *txd,
				    struct rte_mbuf *mb);

static int
nfp_net_rx_fill_freelist(struct nfp_net_rxq *rxq)
{

error: patch failed: drivers/net/nfp/nfp_rxtx.c:21
Applying patch drivers/net/nfp/nfp_ethdev.c with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_ethdev_vf.c with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_rxtx.c with 1 reject...
Rejected hunk #1.
diff a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c	(rejected hunks)
@@ -38,28 +38,6 @@
 #include "nfp_ctrl.h"
 #include "nfp_cpp_bridge.h"
 
-
-static int nfp_net_pf_read_mac(struct nfp_pf_dev *pf_dev, int port);
-static int nfp_net_start(struct rte_eth_dev *dev);
-static int nfp_net_stop(struct rte_eth_dev *dev);
-static int nfp_net_set_link_up(struct rte_eth_dev *dev);
-static int nfp_net_set_link_down(struct rte_eth_dev *dev);
-static int nfp_net_close(struct rte_eth_dev *dev);
-static int nfp_net_init(struct rte_eth_dev *eth_dev);
-static int nfp_fw_upload(struct rte_pci_device *dev,
-			 struct nfp_nsp *nsp, char *card);
-static int nfp_fw_setup(struct rte_pci_device *dev,
-			struct nfp_cpp *cpp,
-			struct nfp_eth_table *nfp_eth_table,
-			struct nfp_hwinfo *hwinfo);
-static int nfp_init_phyports(struct nfp_pf_dev *pf_dev);
-static int nfp_pf_init(struct rte_pci_device *pci_dev);
-static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev);
-static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
-			    struct rte_pci_device *dev);
-static int nfp_pci_uninit(struct rte_eth_dev *eth_dev);
-static int eth_nfp_pci_remove(struct rte_pci_device *pci_dev);
-
 static int
 nfp_net_pf_read_mac(struct nfp_pf_dev *pf_dev, int port)
 {
diff a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c	(rejected hunks)
@@ -23,18 +23,6 @@
 #include "nfp_logs.h"
 #include "nfp_ctrl.h"
 
-static void nfp_netvf_read_mac(struct nfp_net_hw *hw);
-static int nfp_netvf_start(struct rte_eth_dev *dev);
-static int nfp_netvf_stop(struct rte_eth_dev *dev);
-static int nfp_netvf_set_link_up(struct rte_eth_dev *dev);
-static int nfp_netvf_set_link_down(struct rte_eth_dev *dev);
-static int nfp_netvf_close(struct rte_eth_dev *dev);
-static int nfp_netvf_init(struct rte_eth_dev *eth_dev);
-static int nfp_vf_pci_uninit(struct rte_eth_dev *eth_dev);
-static int eth_nfp_vf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
-	struct rte_pci_device *pci_dev);
-static int eth_nfp_vf_pci_remove(struct rte_pci_device *pci_dev);
-
 static void
 nfp_netvf_read_mac(struct nfp_net_hw *hw)
 {
diff a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c	(rejected hunks)
@@ -21,27 +21,6 @@
 #include "nfp_logs.h"
 #include "nfp_ctrl.h"
 
-/* Prototypes */
-static int nfp_net_rx_fill_freelist(struct nfp_net_rxq *rxq);
-static inline void nfp_net_mbuf_alloc_failed(struct nfp_net_rxq *rxq);
-static inline void nfp_net_set_hash(struct nfp_net_rxq *rxq,
-				    struct nfp_net_rx_desc *rxd,
-				    struct rte_mbuf *mbuf);
-static inline void nfp_net_rx_cksum(struct nfp_net_rxq *rxq,
-				    struct nfp_net_rx_desc *rxd,
-				    struct rte_mbuf *mb);
-static void nfp_net_rx_queue_release_mbufs(struct nfp_net_rxq *rxq);
-static int nfp_net_tx_free_bufs(struct nfp_net_txq *txq);
-static void nfp_net_tx_queue_release_mbufs(struct nfp_net_txq *txq);
-static inline uint32_t nfp_free_tx_desc(struct nfp_net_txq *txq);
-static inline uint32_t nfp_net_txq_full(struct nfp_net_txq *txq);
-static inline void nfp_net_tx_tso(struct nfp_net_txq *txq,
-				  struct nfp_net_tx_desc *txd,
-				  struct rte_mbuf *mb);
-static inline void nfp_net_tx_cksum(struct nfp_net_txq *txq,
-				    struct nfp_net_tx_desc *txd,
-				    struct rte_mbuf *mb);
-
 static int
 nfp_net_rx_fill_freelist(struct nfp_net_rxq *rxq)
 {
Checking patch drivers/net/nfp/nfp_common.h...
error: while searching for:
/* The offset of the queue controller queues in the PCIe Target */
#define NFP_PCIE_QUEUE(_q) (0x80000 + (NFP_QCP_QUEUE_ADDR_SZ * ((_q) & 0xff)))

/* Maximum value which can be added to a queue with one transaction */
#define NFP_QCP_MAX_ADD	0x7f

/* Interrupt definitions */
#define NFP_NET_IRQ_LSC_IDX             0


error: patch failed: drivers/net/nfp/nfp_common.h:44
error: while searching for:
 * @q: Base address for queue structure
 * @ptr: Add to the Read or Write pointer
 * @val: Value to add to the queue pointer
 *
 * If @val is greater than @NFP_QCP_MAX_ADD multiple writes are performed.
 */
static inline void
nfp_qcp_ptr_add(uint8_t *q, enum nfp_qcp_ptr ptr, uint32_t val)

error: patch failed: drivers/net/nfp/nfp_common.h:307
error: while searching for:
	else
		off = NFP_QCP_QUEUE_ADD_WPTR;

	while (val > NFP_QCP_MAX_ADD) {
		nn_writel(rte_cpu_to_le_32(NFP_QCP_MAX_ADD), q + off);
		val -= NFP_QCP_MAX_ADD;
}

nn_writel(rte_cpu_to_le_32(val), q + off);
}

/*

error: patch failed: drivers/net/nfp/nfp_common.h:320
Applying patch drivers/net/nfp/nfp_common.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h	(rejected hunks)
@@ -44,9 +44,6 @@ struct nfp_net_adapter;
 /* The offset of the queue controller queues in the PCIe Target */
 #define NFP_PCIE_QUEUE(_q) (0x80000 + (NFP_QCP_QUEUE_ADDR_SZ * ((_q) & 0xff)))
 
-/* Maximum value which can be added to a queue with one transaction */
-#define NFP_QCP_MAX_ADD	0x7f
-
 /* Interrupt definitions */
 #define NFP_NET_IRQ_LSC_IDX             0
 
@@ -307,8 +304,6 @@ nn_cfg_writeq(struct nfp_net_hw *hw, int off, uint64_t val)
  * @q: Base address for queue structure
  * @ptr: Add to the Read or Write pointer
  * @val: Value to add to the queue pointer
- *
- * If @val is greater than @NFP_QCP_MAX_ADD multiple writes are performed.
  */
 static inline void
 nfp_qcp_ptr_add(uint8_t *q, enum nfp_qcp_ptr ptr, uint32_t val)
@@ -320,12 +315,7 @@ nfp_qcp_ptr_add(uint8_t *q, enum nfp_qcp_ptr ptr, uint32_t val)
 	else
 		off = NFP_QCP_QUEUE_ADD_WPTR;
 
-	while (val > NFP_QCP_MAX_ADD) {
-		nn_writel(rte_cpu_to_le_32(NFP_QCP_MAX_ADD), q + off);
-		val -= NFP_QCP_MAX_ADD;
-}
-
-nn_writel(rte_cpu_to_le_32(val), q + off);
+	nn_writel(rte_cpu_to_le_32(val), q + off);
 }
 
 /*
Checking patch drivers/net/nfp/nfp_common.c...
error: while searching for:
}

int
nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
	struct nfp_net_hw *hw;
	uint32_t update, ctrl;

error: patch failed: drivers/net/nfp/nfp_common.c:274
Checking patch drivers/net/nfp/nfp_common.h...
error: while searching for:
void nfp_net_params_setup(struct nfp_net_hw *hw);
void nfp_eth_copy_mac(uint8_t *dst, const uint8_t *src);
void nfp_net_write_mac(struct nfp_net_hw *hw, uint8_t *mac);
int nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr);
int nfp_configure_rx_interrupt(struct rte_eth_dev *dev,
			       struct rte_intr_handle *intr_handle);
uint32_t nfp_check_offloads(struct rte_eth_dev *dev);

error: patch failed: drivers/net/nfp/nfp_common.h:350
Checking patch drivers/net/nfp/nfp_ethdev.c...
error: while searching for:
	.dev_infos_get		= nfp_net_infos_get,
	.dev_supported_ptypes_get = nfp_net_supported_ptypes_get,
	.mtu_set		= nfp_net_dev_mtu_set,
	.mac_addr_set           = nfp_set_mac_addr,
	.vlan_offload_set	= nfp_net_vlan_offload_set,
	.reta_update		= nfp_net_reta_update,
	.reta_query		= nfp_net_reta_query,

error: patch failed: drivers/net/nfp/nfp_ethdev.c:344
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
error: while searching for:
	.dev_infos_get		= nfp_net_infos_get,
	.dev_supported_ptypes_get = nfp_net_supported_ptypes_get,
	.mtu_set		= nfp_net_dev_mtu_set,
	.mac_addr_set           = nfp_set_mac_addr,
	.vlan_offload_set	= nfp_net_vlan_offload_set,
	.reta_update		= nfp_net_reta_update,
	.reta_query		= nfp_net_reta_query,

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:251
Applying patch drivers/net/nfp/nfp_common.c with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_common.h with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_ethdev.c with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_ethdev_vf.c with 1 reject...
Rejected hunk #1.
diff a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c	(rejected hunks)
@@ -274,7 +274,7 @@ nfp_net_write_mac(struct nfp_net_hw *hw, uint8_t *mac)
 }
 
 int
-nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
+nfp_net_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 {
 	struct nfp_net_hw *hw;
 	uint32_t update, ctrl;
diff a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h	(rejected hunks)
@@ -350,7 +350,7 @@ void nfp_net_disable_queues(struct rte_eth_dev *dev);
 void nfp_net_params_setup(struct nfp_net_hw *hw);
 void nfp_eth_copy_mac(uint8_t *dst, const uint8_t *src);
 void nfp_net_write_mac(struct nfp_net_hw *hw, uint8_t *mac);
-int nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr);
+int nfp_net_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr);
 int nfp_configure_rx_interrupt(struct rte_eth_dev *dev,
 			       struct rte_intr_handle *intr_handle);
 uint32_t nfp_check_offloads(struct rte_eth_dev *dev);
diff a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c	(rejected hunks)
@@ -344,7 +344,7 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = {
 	.dev_infos_get		= nfp_net_infos_get,
 	.dev_supported_ptypes_get = nfp_net_supported_ptypes_get,
 	.mtu_set		= nfp_net_dev_mtu_set,
-	.mac_addr_set           = nfp_set_mac_addr,
+	.mac_addr_set		= nfp_net_set_mac_addr,
 	.vlan_offload_set	= nfp_net_vlan_offload_set,
 	.reta_update		= nfp_net_reta_update,
 	.reta_query		= nfp_net_reta_query,
diff a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c	(rejected hunks)
@@ -251,7 +251,7 @@ static const struct eth_dev_ops nfp_netvf_eth_dev_ops = {
 	.dev_infos_get		= nfp_net_infos_get,
 	.dev_supported_ptypes_get = nfp_net_supported_ptypes_get,
 	.mtu_set		= nfp_net_dev_mtu_set,
-	.mac_addr_set           = nfp_set_mac_addr,
+	.mac_addr_set		= nfp_net_set_mac_addr,
 	.vlan_offload_set	= nfp_net_vlan_offload_set,
 	.reta_update		= nfp_net_reta_update,
 	.reta_query		= nfp_net_reta_query,
Checking patch drivers/net/nfp/nfp_ethdev.c...
error: while searching for:
}

/* Initialise and register driver with DPDK Application */
static const struct eth_dev_ops nfp_net_eth_dev_ops = {
	.dev_configure		= nfp_net_configure,
	.dev_start		= nfp_net_start,
	.dev_stop		= nfp_net_stop,

error: patch failed: drivers/net/nfp/nfp_ethdev.c:329
error: while searching for:
	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
	.rx_queue_setup		= nfp_net_rx_queue_setup,
	.rx_queue_release	= nfp_net_rx_queue_release,
	.tx_queue_setup		= nfp_net_tx_queue_setup,
	.tx_queue_release	= nfp_net_tx_queue_release,
	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,

error: patch failed: drivers/net/nfp/nfp_ethdev.c:352
error: while searching for:
	PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, "
			"NFP internal port number: %d", port, hw->nfp_idx);

	eth_dev->dev_ops = &nfp_net_eth_dev_ops;
	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
	eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;

	/* For secondary processes, the primary has done all the work */
	if (rte_eal_process_type() != RTE_PROC_PRIMARY)

error: patch failed: drivers/net/nfp/nfp_ethdev.c:402
error: while searching for:
			return -ENODEV;
		}
		eth_dev->process_private = cpp;
		eth_dev->dev_ops = &nfp_net_eth_dev_ops;
		eth_dev->rx_queue_count = nfp_net_rx_queue_count;
		eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
		eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
		rte_eth_dev_probing_finish(eth_dev);
	}


error: patch failed: drivers/net/nfp/nfp_ethdev.c:971
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
error: while searching for:
}

/* Initialise and register VF driver with DPDK Application */
static const struct eth_dev_ops nfp_netvf_eth_dev_ops = {
	.dev_configure		= nfp_net_configure,
	.dev_start		= nfp_netvf_start,
	.dev_stop		= nfp_netvf_stop,

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:236
error: while searching for:
	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
	.rx_queue_setup		= nfp_net_rx_queue_setup,
	.rx_queue_release	= nfp_net_rx_queue_release,
	.tx_queue_setup		= nfp_net_tx_queue_setup,
	.tx_queue_release	= nfp_net_tx_queue_release,
	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:259
error: while searching for:

	hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);

	eth_dev->dev_ops = &nfp_netvf_eth_dev_ops;
	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
	eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;

	/* For secondary processes, the primary has done all the work */
	if (rte_eal_process_type() != RTE_PROC_PRIMARY)

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:292
Checking patch drivers/net/nfp/nfp_rxtx.c...
error: while searching for:
}

int
nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
		       uint16_t nb_desc, unsigned int socket_id,
		       const struct rte_eth_txconf *tx_conf)
{

error: patch failed: drivers/net/nfp/nfp_rxtx.c:655
error: while searching for:
	PMD_INIT_FUNC_TRACE();

	/* Validating number of descriptors */
	tx_desc_sz = nb_desc * sizeof(struct nfp_net_tx_desc);
	if (tx_desc_sz % NFP_ALIGN_RING_DESC != 0 ||
	    nb_desc > NFP_NET_MAX_TX_DESC ||
	    nb_desc < NFP_NET_MIN_TX_DESC) {

error: patch failed: drivers/net/nfp/nfp_rxtx.c:670
error: while searching for:
	 * resizing in later calls to the queue setup function.
	 */
	tz = rte_eth_dma_zone_reserve(dev, "tx_ring", queue_idx,
				   sizeof(struct nfp_net_tx_desc) *
				   NFP_NET_MAX_TX_DESC, NFP_MEMZONE_ALIGN,
				   socket_id);
	if (tz == NULL) {

error: patch failed: drivers/net/nfp/nfp_rxtx.c:718
error: while searching for:

	/* Saving physical and virtual addresses for the TX ring */
	txq->dma = (uint64_t)tz->iova;
	txq->txds = (struct nfp_net_tx_desc *)tz->addr;

	/* mbuf pointers array for referencing mbufs linked to TX descriptors */
	txq->txbufs = rte_zmalloc_socket("txq->txbufs",

error: patch failed: drivers/net/nfp/nfp_rxtx.c:743
error: while searching for:

/* Leaving always free descriptors for avoiding wrapping confusion */
static inline
uint32_t nfp_free_tx_desc(struct nfp_net_txq *txq)
{
	if (txq->wr_p >= txq->rd_p)
		return txq->tx_count - (txq->wr_p - txq->rd_p) - 8;

error: patch failed: drivers/net/nfp/nfp_rxtx.c:773
error: while searching for:
 * This function uses the host copy* of read/write pointers
 */
static inline
uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
{
	return (nfp_free_tx_desc(txq) < txq->tx_free_thresh);
}

/* nfp_net_tx_tso - Set TX descriptor for TSO */
static inline void
nfp_net_tx_tso(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
	       struct rte_mbuf *mb)
{
	uint64_t ol_flags;

error: patch failed: drivers/net/nfp/nfp_rxtx.c:790
error: while searching for:

/* nfp_net_tx_cksum - Set TX CSUM offload flags in TX descriptor */
static inline void
nfp_net_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
		 struct rte_mbuf *mb)
{
	uint64_t ol_flags;

error: patch failed: drivers/net/nfp/nfp_rxtx.c:828
error: while searching for:
}

uint16_t
nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
{
	struct nfp_net_txq *txq;
	struct nfp_net_hw *hw;
	struct nfp_net_tx_desc *txds, txd;
	struct rte_mbuf *pkt;
	uint64_t dma_addr;
	int pkt_size, dma_size;

error: patch failed: drivers/net/nfp/nfp_rxtx.c:857
error: while searching for:
	PMD_TX_LOG(DEBUG, "working for queue %u at pos %d and %u packets",
		   txq->qidx, txq->wr_p, nb_pkts);

	if ((nfp_free_tx_desc(txq) < nb_pkts) || (nfp_net_txq_full(txq)))
		nfp_net_tx_free_bufs(txq);

	free_descs = (uint16_t)nfp_free_tx_desc(txq);
	if (unlikely(free_descs == 0))
		return 0;


error: patch failed: drivers/net/nfp/nfp_rxtx.c:876
error: while searching for:
		 * multisegment packet, but TSO info needs to be in all of them.
		 */
		txd.data_len = pkt->pkt_len;
		nfp_net_tx_tso(txq, &txd, pkt);
		nfp_net_tx_cksum(txq, &txd, pkt);

		if ((pkt->ol_flags & RTE_MBUF_F_TX_VLAN) &&
		    (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)) {

error: patch failed: drivers/net/nfp/nfp_rxtx.c:913
Checking patch drivers/net/nfp/nfp_rxtx.h...
error: while searching for:
#define PCIE_DESC_TX_ENCAP_VXLAN        (1 << 1)
#define PCIE_DESC_TX_ENCAP_GRE          (1 << 0)

struct nfp_net_tx_desc {
	union {
		struct {
			uint8_t dma_addr_hi; /* High bits of host buf address */

error: patch failed: drivers/net/nfp/nfp_rxtx.h:53
error: while searching for:
	 * of the queue and @size is the size in bytes for the queue
	 * (needed for free)
	 */
	struct nfp_net_tx_desc *txds;

	/*
	 * At this point 48 bytes have been used for all the fields in the

error: patch failed: drivers/net/nfp/nfp_rxtx.h:124
error: while searching for:
				  struct rte_mempool *mp);
void nfp_net_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx);
void nfp_net_reset_tx_queue(struct nfp_net_txq *txq);
int nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
				  uint16_t nb_desc, unsigned int socket_id,
				  const struct rte_eth_txconf *tx_conf);
uint16_t nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
				  uint16_t nb_pkts);

#endif /* _NFP_RXTX_H_ */

error: patch failed: drivers/net/nfp/nfp_rxtx.h:286
Applying patch drivers/net/nfp/nfp_ethdev.c with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Applying patch drivers/net/nfp/nfp_ethdev_vf.c with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Applying patch drivers/net/nfp/nfp_rxtx.c with 10 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk #7.
Rejected hunk #8.
Rejected hunk #9.
Rejected hunk #10.
Applying patch drivers/net/nfp/nfp_rxtx.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c	(rejected hunks)
@@ -329,7 +329,7 @@ nfp_net_close(struct rte_eth_dev *dev)
 }
 
 /* Initialise and register driver with DPDK Application */
-static const struct eth_dev_ops nfp_net_eth_dev_ops = {
+static const struct eth_dev_ops nfp_net_nfd3_eth_dev_ops = {
 	.dev_configure		= nfp_net_configure,
 	.dev_start		= nfp_net_start,
 	.dev_stop		= nfp_net_stop,
@@ -352,7 +352,7 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = {
 	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
 	.rx_queue_setup		= nfp_net_rx_queue_setup,
 	.rx_queue_release	= nfp_net_rx_queue_release,
-	.tx_queue_setup		= nfp_net_tx_queue_setup,
+	.tx_queue_setup		= nfp_net_nfd3_tx_queue_setup,
 	.tx_queue_release	= nfp_net_tx_queue_release,
 	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
 	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
@@ -402,10 +402,10 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, "
 			"NFP internal port number: %d", port, hw->nfp_idx);
 
-	eth_dev->dev_ops = &nfp_net_eth_dev_ops;
+	eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
 	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
 	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
-	eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
+	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
@@ -971,10 +971,10 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 			return -ENODEV;
 		}
 		eth_dev->process_private = cpp;
-		eth_dev->dev_ops = &nfp_net_eth_dev_ops;
+		eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
 		eth_dev->rx_queue_count = nfp_net_rx_queue_count;
 		eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
-		eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
+		eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
 		rte_eth_dev_probing_finish(eth_dev);
 	}
 
diff a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c	(rejected hunks)
@@ -236,7 +236,7 @@ nfp_netvf_close(struct rte_eth_dev *dev)
 }
 
 /* Initialise and register VF driver with DPDK Application */
-static const struct eth_dev_ops nfp_netvf_eth_dev_ops = {
+static const struct eth_dev_ops nfp_netvf_nfd3_eth_dev_ops = {
 	.dev_configure		= nfp_net_configure,
 	.dev_start		= nfp_netvf_start,
 	.dev_stop		= nfp_netvf_stop,
@@ -259,7 +259,7 @@ static const struct eth_dev_ops nfp_netvf_eth_dev_ops = {
 	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
 	.rx_queue_setup		= nfp_net_rx_queue_setup,
 	.rx_queue_release	= nfp_net_rx_queue_release,
-	.tx_queue_setup		= nfp_net_tx_queue_setup,
+	.tx_queue_setup		= nfp_net_nfd3_tx_queue_setup,
 	.tx_queue_release	= nfp_net_tx_queue_release,
 	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
 	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
@@ -292,10 +292,10 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
 
-	eth_dev->dev_ops = &nfp_netvf_eth_dev_ops;
+	eth_dev->dev_ops = &nfp_netvf_nfd3_eth_dev_ops;
 	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
 	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
-	eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
+	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
diff a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c	(rejected hunks)
@@ -655,7 +655,7 @@ nfp_net_reset_tx_queue(struct nfp_net_txq *txq)
 }
 
 int
-nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+nfp_net_nfd3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		       uint16_t nb_desc, unsigned int socket_id,
 		       const struct rte_eth_txconf *tx_conf)
 {
@@ -670,7 +670,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	PMD_INIT_FUNC_TRACE();
 
 	/* Validating number of descriptors */
-	tx_desc_sz = nb_desc * sizeof(struct nfp_net_tx_desc);
+	tx_desc_sz = nb_desc * sizeof(struct nfp_net_nfd3_tx_desc);
 	if (tx_desc_sz % NFP_ALIGN_RING_DESC != 0 ||
 	    nb_desc > NFP_NET_MAX_TX_DESC ||
 	    nb_desc < NFP_NET_MIN_TX_DESC) {
@@ -718,7 +718,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	 * resizing in later calls to the queue setup function.
 	 */
 	tz = rte_eth_dma_zone_reserve(dev, "tx_ring", queue_idx,
-				   sizeof(struct nfp_net_tx_desc) *
+				   sizeof(struct nfp_net_nfd3_tx_desc) *
 				   NFP_NET_MAX_TX_DESC, NFP_MEMZONE_ALIGN,
 				   socket_id);
 	if (tz == NULL) {
@@ -743,7 +743,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 
 	/* Saving physical and virtual addresses for the TX ring */
 	txq->dma = (uint64_t)tz->iova;
-	txq->txds = (struct nfp_net_tx_desc *)tz->addr;
+	txq->txds = (struct nfp_net_nfd3_tx_desc *)tz->addr;
 
 	/* mbuf pointers array for referencing mbufs linked to TX descriptors */
 	txq->txbufs = rte_zmalloc_socket("txq->txbufs",
@@ -773,7 +773,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 
 /* Leaving always free descriptors for avoiding wrapping confusion */
 static inline
-uint32_t nfp_free_tx_desc(struct nfp_net_txq *txq)
+uint32_t nfp_net_nfd3_free_tx_desc(struct nfp_net_txq *txq)
 {
 	if (txq->wr_p >= txq->rd_p)
 		return txq->tx_count - (txq->wr_p - txq->rd_p) - 8;
@@ -790,14 +790,14 @@ uint32_t nfp_free_tx_desc(struct nfp_net_txq *txq)
  * This function uses the host copy* of read/write pointers
  */
 static inline
-uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
+uint32_t nfp_net_nfd3_txq_full(struct nfp_net_txq *txq)
 {
-	return (nfp_free_tx_desc(txq) < txq->tx_free_thresh);
+	return (nfp_net_nfd3_free_tx_desc(txq) < txq->tx_free_thresh);
 }
 
 /* nfp_net_tx_tso - Set TX descriptor for TSO */
 static inline void
-nfp_net_tx_tso(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
+nfp_net_nfd3_tx_tso(struct nfp_net_txq *txq, struct nfp_net_nfd3_tx_desc *txd,
 	       struct rte_mbuf *mb)
 {
 	uint64_t ol_flags;
@@ -828,7 +828,7 @@ nfp_net_tx_tso(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
 
 /* nfp_net_tx_cksum - Set TX CSUM offload flags in TX descriptor */
 static inline void
-nfp_net_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
+nfp_net_nfd3_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_nfd3_tx_desc *txd,
 		 struct rte_mbuf *mb)
 {
 	uint64_t ol_flags;
@@ -857,11 +857,11 @@ nfp_net_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
 }
 
 uint16_t
-nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+nfp_net_nfd3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct nfp_net_txq *txq;
 	struct nfp_net_hw *hw;
-	struct nfp_net_tx_desc *txds, txd;
+	struct nfp_net_nfd3_tx_desc *txds, txd;
 	struct rte_mbuf *pkt;
 	uint64_t dma_addr;
 	int pkt_size, dma_size;
@@ -876,10 +876,10 @@ nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	PMD_TX_LOG(DEBUG, "working for queue %u at pos %d and %u packets",
 		   txq->qidx, txq->wr_p, nb_pkts);
 
-	if ((nfp_free_tx_desc(txq) < nb_pkts) || (nfp_net_txq_full(txq)))
+	if ((nfp_net_nfd3_free_tx_desc(txq) < nb_pkts) || (nfp_net_nfd3_txq_full(txq)))
 		nfp_net_tx_free_bufs(txq);
 
-	free_descs = (uint16_t)nfp_free_tx_desc(txq);
+	free_descs = (uint16_t)nfp_net_nfd3_free_tx_desc(txq);
 	if (unlikely(free_descs == 0))
 		return 0;
 
@@ -913,8 +913,8 @@ nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		 * multisegment packet, but TSO info needs to be in all of them.
 		 */
 		txd.data_len = pkt->pkt_len;
-		nfp_net_tx_tso(txq, &txd, pkt);
-		nfp_net_tx_cksum(txq, &txd, pkt);
+		nfp_net_nfd3_tx_tso(txq, &txd, pkt);
+		nfp_net_nfd3_tx_cksum(txq, &txd, pkt);
 
 		if ((pkt->ol_flags & RTE_MBUF_F_TX_VLAN) &&
 		    (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)) {
diff a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h	(rejected hunks)
@@ -53,7 +53,7 @@
 #define PCIE_DESC_TX_ENCAP_VXLAN        (1 << 1)
 #define PCIE_DESC_TX_ENCAP_GRE          (1 << 0)
 
-struct nfp_net_tx_desc {
+struct nfp_net_nfd3_tx_desc {
 	union {
 		struct {
 			uint8_t dma_addr_hi; /* High bits of host buf address */
@@ -124,7 +124,7 @@ struct nfp_net_txq {
 	 * of the queue and @size is the size in bytes for the queue
 	 * (needed for free)
 	 */
-	struct nfp_net_tx_desc *txds;
+	struct nfp_net_nfd3_tx_desc *txds;
 
 	/*
 	 * At this point 48 bytes have been used for all the fields in the
@@ -286,10 +286,10 @@ int nfp_net_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 				  struct rte_mempool *mp);
 void nfp_net_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx);
 void nfp_net_reset_tx_queue(struct nfp_net_txq *txq);
-int nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+int nfp_net_nfd3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 				  uint16_t nb_desc, unsigned int socket_id,
 				  const struct rte_eth_txconf *tx_conf);
-uint16_t nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+uint16_t nfp_net_nfd3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 				  uint16_t nb_pkts);
 
 #endif /* _NFP_RXTX_H_ */
Checking patch doc/guides/nics/nfp.rst...
error: while searching for:

This document explains how to use DPDK with the Netronome Poll Mode
Driver (PMD) supporting Netronome's Network Flow Processor 6xxx
(NFP-6xxx) and Netronome's Flow Processor 4xxx (NFP-4xxx).

NFP is a SRIOV capable device and the PMD supports the physical
function (PF) and the virtual functions (VFs).

error: patch failed: doc/guides/nics/nfp.rst:12
Checking patch doc/guides/rel_notes/release_22_07.rst...
error: while searching for:
  * Added support for MTU on Windows.
  * Added matching and RSS on IPsec ESP.

* **Updated VMware vmxnet3 networking driver.**

  * Added version 5 support.

error: patch failed: doc/guides/rel_notes/release_22_07.rst:108
Checking patch drivers/net/nfp/nfp_common.h...
error: while searching for:

#define NFP_NET_PMD_VERSION "0.1"
#define PCI_VENDOR_ID_NETRONOME         0x19ee
#define PCI_DEVICE_ID_NFP4000_PF_NIC    0x4000
#define PCI_DEVICE_ID_NFP6000_PF_NIC    0x6000
#define PCI_DEVICE_ID_NFP6000_VF_NIC    0x6003

/* Forward declaration */
struct nfp_net_adapter;

error: patch failed: drivers/net/nfp/nfp_common.h:16
error: while searching for:
#define NFP_QCP_QUEUE_STS_HI                    0x000c
#define NFP_QCP_QUEUE_STS_HI_WRITEPTR_mask    (0x3ffff)

/* The offset of the queue controller queues in the PCIe Target */
#define NFP_PCIE_QUEUE(_q) (0x80000 + (NFP_QCP_QUEUE_ADDR_SZ * ((_q) & 0xff)))

/* Interrupt definitions */
#define NFP_NET_IRQ_LSC_IDX             0

error: patch failed: drivers/net/nfp/nfp_common.h:41
error: while searching for:
		return val & NFP_QCP_QUEUE_STS_HI_WRITEPTR_mask;
}

/* Prototypes for common NFP functions */
int nfp_net_reconfig(struct nfp_net_hw *hw, uint32_t ctrl, uint32_t update);
int nfp_net_configure(struct rte_eth_dev *dev);

error: patch failed: drivers/net/nfp/nfp_common.h:342
Checking patch drivers/net/nfp/nfp_ethdev.c...
error: while searching for:

	/* Work out where in the BAR the queues start. */
	switch (pci_dev->id.device_id) {
	case PCI_DEVICE_ID_NFP4000_PF_NIC:
	case PCI_DEVICE_ID_NFP6000_PF_NIC:
		start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_TXQ);
		tx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;
		start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ);
		rx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;
		break;
	default:
		PMD_DRV_LOG(ERR, "nfp_net: no device ID matching");

error: patch failed: drivers/net/nfp/nfp_ethdev.c:446
error: while searching for:
{
	int err;
	int ret = 0;
	int total_ports;
	struct nfp_cpp *cpp;
	struct nfp_pf_dev *pf_dev;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:764
error: while searching for:
	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", pf_dev->ctrl_bar);

	/* configure access to tx/rx vNIC BARs */
	pf_dev->hw_queues = nfp_cpp_map_area(pf_dev->cpp, 0, 0,
			NFP_PCIE_QUEUE(0), NFP_QCP_QUEUE_AREA_SZ,
			&pf_dev->hwqueues_area);
	if (pf_dev->hw_queues == NULL) {
		PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for net.qc");

error: patch failed: drivers/net/nfp/nfp_ethdev.c:867
error: while searching for:
}

static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
	{
		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
			       PCI_DEVICE_ID_NFP4000_PF_NIC)

error: patch failed: drivers/net/nfp/nfp_ethdev.c:995
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
error: while searching for:

	/* Work out where in the BAR the queues start. */
	switch (pci_dev->id.device_id) {
	case PCI_DEVICE_ID_NFP6000_VF_NIC:
		start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_TXQ);
		tx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;
		start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ);
		rx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;
		break;
	default:
		PMD_DRV_LOG(ERR, "nfp_net: no device ID matching");

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:327
error: while searching for:
}

static const struct rte_pci_id pci_id_nfp_vf_net_map[] = {
	{
		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
			       PCI_DEVICE_ID_NFP6000_VF_NIC)

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:456
Checking patch drivers/net/nfp/nfpcore/nfp_cpp.h...
error: while searching for:
 * @return		true if model is in the NFP6000 family, false otherwise.
 */
#define NFP_CPP_MODEL_IS_6000(model)		     \
		((NFP_CPP_MODEL_CHIP_of(model) >= 0x4000) && \
		(NFP_CPP_MODEL_CHIP_of(model) < 0x7000))

/*

error: patch failed: drivers/net/nfp/nfpcore/nfp_cpp.h:214
Checking patch drivers/net/nfp/nfpcore/nfp_nsp_eth.c...
error: while searching for:
	struct nfp_eth_table *table;
	uint32_t table_sz;
	int i, j, ret, cnt = 0;

	entries = malloc(NSP_ETH_TABLE_SIZE);
	if (!entries)

error: patch failed: drivers/net/nfp/nfpcore/nfp_nsp_eth.c:266
error: while searching for:
		goto err;
	}

	for (i = 0; i < NSP_ETH_MAX_COUNT; i++)
		if (entries[i].port & NSP_ETH_PORT_LANES_MASK)
			cnt++;

	/* Some versions of flash will give us 0 instead of port count. For
	 * those that give a port count, verify it against the value calculated

error: patch failed: drivers/net/nfp/nfpcore/nfp_nsp_eth.c:278
error: while searching for:

	memset(table, 0, table_sz);
	table->count = cnt;
	for (i = 0, j = 0; i < NSP_ETH_MAX_COUNT; i++)
		if (entries[i].port & NSP_ETH_PORT_LANES_MASK)
			nfp_eth_port_translate(nsp, &entries[i], i,
					       &table->ports[j++]);

	nfp_eth_calc_port_geometry(table);
	for (i = 0; i < (int)table->count; i++)

error: patch failed: drivers/net/nfp/nfpcore/nfp_nsp_eth.c:299
Applying patch doc/guides/nics/nfp.rst with 1 reject...
Rejected hunk #1.
Applying patch doc/guides/rel_notes/release_22_07.rst with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_common.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Applying patch drivers/net/nfp/nfp_ethdev.c with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Applying patch drivers/net/nfp/nfp_ethdev_vf.c with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch drivers/net/nfp/nfpcore/nfp_cpp.h with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfpcore/nfp_nsp_eth.c with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst	(rejected hunks)
@@ -12,7 +12,8 @@ up to 400-Gb/s.
 
 This document explains how to use DPDK with the Netronome Poll Mode
 Driver (PMD) supporting Netronome's Network Flow Processor 6xxx
-(NFP-6xxx) and Netronome's Flow Processor 4xxx (NFP-4xxx).
+(NFP-6xxx), Netronome's Network Flow Processor 4xxx (NFP-4xxx) and
+Netronome's Network Flow Processor 38xx (NFP-38xx).
 
 NFP is a SRIOV capable device and the PMD supports the physical
 function (PF) and the virtual functions (VFs).
diff a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst	(rejected hunks)
@@ -108,6 +108,10 @@ New Features
   * Added support for MTU on Windows.
   * Added matching and RSS on IPsec ESP.
 
+* **Updated Netronome nfp driver.**
+
+  * Added support for NFP3800 NIC.
+
 * **Updated VMware vmxnet3 networking driver.**
 
   * Added version 5 support.
diff a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h	(rejected hunks)
@@ -16,9 +16,11 @@
 
 #define NFP_NET_PMD_VERSION "0.1"
 #define PCI_VENDOR_ID_NETRONOME         0x19ee
+#define PCI_DEVICE_ID_NFP3800_PF_NIC    0x3800
+#define PCI_DEVICE_ID_NFP3800_VF_NIC    0x3803
 #define PCI_DEVICE_ID_NFP4000_PF_NIC    0x4000
 #define PCI_DEVICE_ID_NFP6000_PF_NIC    0x6000
-#define PCI_DEVICE_ID_NFP6000_VF_NIC    0x6003
+#define PCI_DEVICE_ID_NFP6000_VF_NIC    0x6003  /* Include NFP4000VF */
 
 /* Forward declaration */
 struct nfp_net_adapter;
@@ -41,8 +43,16 @@ struct nfp_net_adapter;
 #define NFP_QCP_QUEUE_STS_HI                    0x000c
 #define NFP_QCP_QUEUE_STS_HI_WRITEPTR_mask    (0x3ffff)
 
+#define NFP_PCIE_QCP_NFP3800_OFFSET            0x400000
+#define NFP_PCIE_QCP_NFP6000_OFFSET            0x80000
+#define NFP_PCIE_QUEUE_NFP3800_MASK            0x1ff
+#define NFP_PCIE_QUEUE_NFP6000_MASK            0xff
+#define NFP_PCIE_QCP_PF_OFFSET                 0x0
+#define NFP_PCIE_QCP_VF_OFFSET                 0x0
+
 /* The offset of the queue controller queues in the PCIe Target */
-#define NFP_PCIE_QUEUE(_q) (0x80000 + (NFP_QCP_QUEUE_ADDR_SZ * ((_q) & 0xff)))
+#define NFP_PCIE_QUEUE(_offset, _q, _mask)    \
+		((_offset) + (NFP_QCP_QUEUE_ADDR_SZ * ((_q) & (_mask))))
 
 /* Interrupt definitions */
 #define NFP_NET_IRQ_LSC_IDX             0
@@ -342,6 +352,26 @@ nfp_qcp_read(uint8_t *q, enum nfp_qcp_ptr ptr)
 		return val & NFP_QCP_QUEUE_STS_HI_WRITEPTR_mask;
 }
 
+static inline uint32_t
+nfp_pci_queue(struct rte_pci_device *pdev, uint16_t queue)
+{
+	switch (pdev->id.device_id) {
+	case PCI_DEVICE_ID_NFP4000_PF_NIC:
+	case PCI_DEVICE_ID_NFP6000_PF_NIC:
+		return NFP_PCIE_QUEUE(NFP_PCIE_QCP_PF_OFFSET, queue,
+				NFP_PCIE_QUEUE_NFP6000_MASK);
+	case PCI_DEVICE_ID_NFP3800_VF_NIC:
+		return NFP_PCIE_QUEUE(NFP_PCIE_QCP_VF_OFFSET, queue,
+				NFP_PCIE_QUEUE_NFP3800_MASK);
+	case PCI_DEVICE_ID_NFP6000_VF_NIC:
+		return NFP_PCIE_QUEUE(NFP_PCIE_QCP_VF_OFFSET, queue,
+				NFP_PCIE_QUEUE_NFP6000_MASK);
+	default:
+		return NFP_PCIE_QUEUE(NFP_PCIE_QCP_PF_OFFSET, queue,
+				NFP_PCIE_QUEUE_NFP3800_MASK);
+	}
+}
+
 /* Prototypes for common NFP functions */
 int nfp_net_reconfig(struct nfp_net_hw *hw, uint32_t ctrl, uint32_t update);
 int nfp_net_configure(struct rte_eth_dev *dev);
diff a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c	(rejected hunks)
@@ -446,12 +446,13 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 
 	/* Work out where in the BAR the queues start. */
 	switch (pci_dev->id.device_id) {
+	case PCI_DEVICE_ID_NFP3800_PF_NIC:
 	case PCI_DEVICE_ID_NFP4000_PF_NIC:
 	case PCI_DEVICE_ID_NFP6000_PF_NIC:
 		start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_TXQ);
-		tx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;
+		tx_bar_off = nfp_pci_queue(pci_dev, start_q);
 		start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ);
-		rx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;
+		rx_bar_off = nfp_pci_queue(pci_dev, start_q);
 		break;
 	default:
 		PMD_DRV_LOG(ERR, "nfp_net: no device ID matching");
@@ -764,6 +765,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 {
 	int err;
 	int ret = 0;
+	uint64_t addr;
 	int total_ports;
 	struct nfp_cpp *cpp;
 	struct nfp_pf_dev *pf_dev;
@@ -867,8 +869,24 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", pf_dev->ctrl_bar);
 
 	/* configure access to tx/rx vNIC BARs */
+	switch (pci_dev->id.device_id) {
+	case PCI_DEVICE_ID_NFP3800_PF_NIC:
+		addr = NFP_PCIE_QUEUE(NFP_PCIE_QCP_NFP3800_OFFSET,
+					0, NFP_PCIE_QUEUE_NFP3800_MASK);
+		break;
+	case PCI_DEVICE_ID_NFP4000_PF_NIC:
+	case PCI_DEVICE_ID_NFP6000_PF_NIC:
+		addr = NFP_PCIE_QUEUE(NFP_PCIE_QCP_NFP6000_OFFSET,
+					0, NFP_PCIE_QUEUE_NFP6000_MASK);
+		break;
+	default:
+		PMD_INIT_LOG(ERR, "nfp_net: no device ID matching");
+		err = -ENODEV;
+		goto ctrl_area_cleanup;
+	}
+
 	pf_dev->hw_queues = nfp_cpp_map_area(pf_dev->cpp, 0, 0,
-			NFP_PCIE_QUEUE(0), NFP_QCP_QUEUE_AREA_SZ,
+			addr, NFP_QCP_QUEUE_AREA_SZ,
 			&pf_dev->hwqueues_area);
 	if (pf_dev->hw_queues == NULL) {
 		PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for net.qc");
@@ -995,6 +1013,10 @@ nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 }
 
 static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
+	{
+		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
+			       PCI_DEVICE_ID_NFP3800_PF_NIC)
+	},
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
 			       PCI_DEVICE_ID_NFP4000_PF_NIC)
diff a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c	(rejected hunks)
@@ -327,11 +327,12 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
 
 	/* Work out where in the BAR the queues start. */
 	switch (pci_dev->id.device_id) {
+	case PCI_DEVICE_ID_NFP3800_VF_NIC:
 	case PCI_DEVICE_ID_NFP6000_VF_NIC:
 		start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_TXQ);
-		tx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;
+		tx_bar_off = nfp_pci_queue(pci_dev, start_q);
 		start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ);
-		rx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;
+		rx_bar_off = nfp_pci_queue(pci_dev, start_q);
 		break;
 	default:
 		PMD_DRV_LOG(ERR, "nfp_net: no device ID matching");
@@ -456,6 +457,10 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
 }
 
 static const struct rte_pci_id pci_id_nfp_vf_net_map[] = {
+	{
+		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
+			       PCI_DEVICE_ID_NFP3800_VF_NIC)
+	},
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
 			       PCI_DEVICE_ID_NFP6000_VF_NIC)
diff a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h	(rejected hunks)
@@ -214,7 +214,7 @@ void nfp_cpp_free(struct nfp_cpp *cpp);
  * @return		true if model is in the NFP6000 family, false otherwise.
  */
 #define NFP_CPP_MODEL_IS_6000(model)		     \
-		((NFP_CPP_MODEL_CHIP_of(model) >= 0x4000) && \
+		((NFP_CPP_MODEL_CHIP_of(model) >= 0x3800) && \
 		(NFP_CPP_MODEL_CHIP_of(model) < 0x7000))
 
 /*
diff a/drivers/net/nfp/nfpcore/nfp_nsp_eth.c b/drivers/net/nfp/nfpcore/nfp_nsp_eth.c	(rejected hunks)
@@ -266,6 +266,7 @@ __nfp_eth_read_ports(struct nfp_nsp *nsp)
 	struct nfp_eth_table *table;
 	uint32_t table_sz;
 	int i, j, ret, cnt = 0;
+	const struct rte_ether_addr *mac;
 
 	entries = malloc(NSP_ETH_TABLE_SIZE);
 	if (!entries)
@@ -278,9 +279,15 @@ __nfp_eth_read_ports(struct nfp_nsp *nsp)
 		goto err;
 	}
 
-	for (i = 0; i < NSP_ETH_MAX_COUNT; i++)
-		if (entries[i].port & NSP_ETH_PORT_LANES_MASK)
+	/* The NFP3800 NIC support 8 ports, but only 2 ports are valid,
+	 * the rest 6 ports mac are all 0, ensure we don't use these port
+	 */
+	for (i = 0; i < NSP_ETH_MAX_COUNT; i++) {
+		mac = (const struct rte_ether_addr *)entries[i].mac_addr;
+		if ((entries[i].port & NSP_ETH_PORT_LANES_MASK) &&
+				(!rte_is_zero_ether_addr(mac)))
 			cnt++;
+	}
 
 	/* Some versions of flash will give us 0 instead of port count. For
 	 * those that give a port count, verify it against the value calculated
@@ -299,10 +306,13 @@ __nfp_eth_read_ports(struct nfp_nsp *nsp)
 
 	memset(table, 0, table_sz);
 	table->count = cnt;
-	for (i = 0, j = 0; i < NSP_ETH_MAX_COUNT; i++)
-		if (entries[i].port & NSP_ETH_PORT_LANES_MASK)
+	for (i = 0, j = 0; i < NSP_ETH_MAX_COUNT; i++) {
+		mac = (const struct rte_ether_addr *)entries[i].mac_addr;
+		if ((entries[i].port & NSP_ETH_PORT_LANES_MASK) &&
+				(!rte_is_zero_ether_addr(mac)))
 			nfp_eth_port_translate(nsp, &entries[i], i,
-					       &table->ports[j++]);
+					&table->ports[j++]);
+	}
 
 	nfp_eth_calc_port_geometry(table);
 	for (i = 0; i < (int)table->count; i++)
Checking patch doc/guides/nics/nfp.rst...
error: while searching for:
different firmware to each SmartNIC.

   .. Note::
      Currently the NFP PMD supports using the PF with Agilio Basic Firmware. See
      https://help.netronome.com/support/solutions for more information on the
      various firmwares supported by the Netronome Agilio CX smartNIC.

PF multiport support
--------------------

error: patch failed: doc/guides/nics/nfp.rst:100
Checking patch doc/guides/rel_notes/release_22_07.rst...
error: while searching for:
* **Updated Netronome nfp driver.**

  * Added support for NFP3800 NIC.

* **Updated VMware vmxnet3 networking driver.**


error: patch failed: doc/guides/rel_notes/release_22_07.rst:111
Checking patch drivers/net/nfp/nfp_ctrl.h...
error: while searching for:
 * - define more STS bits
 */
#define NFP_NET_CFG_VERSION             0x0030
#define   NFP_NET_CFG_VERSION_RESERVED_MASK	(0xff << 24)
#define   NFP_NET_CFG_VERSION_CLASS_MASK  (0xff << 16)
#define   NFP_NET_CFG_VERSION_CLASS(x)    (((x) & 0xff) << 16)

error: patch failed: drivers/net/nfp/nfp_ctrl.h:135
Checking patch drivers/net/nfp/nfp_ethdev.c...
error: while searching for:
	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
};

static int
nfp_net_init(struct rte_eth_dev *eth_dev)
{

error: patch failed: drivers/net/nfp/nfp_ethdev.c:358
error: while searching for:
	PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, "
			"NFP internal port number: %d", port, hw->nfp_idx);

	eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;

	/* For secondary processes, the primary has done all the work */
	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
		return 0;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:402
error: while searching for:

	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);

	hw->max_rx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_RXRINGS);
	hw->max_tx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_TXRINGS);


error: patch failed: drivers/net/nfp/nfp_ethdev.c:441
error: while searching for:
	nfp_net_cfg_queue_setup(hw);

	/* Get some of the read-only fields from the config BAR */
	hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
	hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP);
	hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU);
	hw->mtu = RTE_ETHER_MTU;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:473
error: while searching for:
	int err;
	int total_ports;
	struct nfp_cpp *cpp;
	struct nfp_rtsym_table *sym_tbl;

	if (pci_dev == NULL)

error: patch failed: drivers/net/nfp/nfp_ethdev.c:939
error: while searching for:
				"secondary process attach failed, ethdev doesn't exist");
			return -ENODEV;
		}
		eth_dev->process_private = cpp;
		eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
		eth_dev->rx_queue_count = nfp_net_rx_queue_count;
		eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
		eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
		rte_eth_dev_probing_finish(eth_dev);
	}


error: patch failed: drivers/net/nfp/nfp_ethdev.c:988
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
error: while searching for:
	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
};

static int
nfp_netvf_init(struct rte_eth_dev *eth_dev)
{

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:265
error: while searching for:

	hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);

	eth_dev->dev_ops = &nfp_netvf_nfd3_eth_dev_ops;
	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;

	/* For secondary processes, the primary has done all the work */
	if (rte_eal_process_type() != RTE_PROC_PRIMARY)

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:292
error: while searching for:
		     pci_dev->addr.domain, pci_dev->addr.bus,
		     pci_dev->addr.devid, pci_dev->addr.function);

	hw->ctrl_bar = (uint8_t *)pci_dev->mem_resource[0].addr;
	if (hw->ctrl_bar == NULL) {
		PMD_DRV_LOG(ERR,
			"hw->ctrl_bar is NULL. BAR0 not configured");
		return -ENODEV;
	}

	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);

	hw->max_rx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_RXRINGS);
	hw->max_tx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_TXRINGS);


error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:313
error: while searching for:
	nfp_net_cfg_queue_setup(hw);

	/* Get some of the read-only fields from the config BAR */
	hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
	hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP);
	hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU);
	hw->mtu = RTE_ETHER_MTU;

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:354
Applying patch doc/guides/nics/nfp.rst with 1 reject...
Rejected hunk #1.
Applying patch doc/guides/rel_notes/release_22_07.rst with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_ctrl.h with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_ethdev.c with 6 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Applying patch drivers/net/nfp/nfp_ethdev_vf.c with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
diff a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst	(rejected hunks)
@@ -100,9 +100,10 @@ more than one SmartNIC, same type of SmartNIC or different ones, and to upload a
 different firmware to each SmartNIC.
 
    .. Note::
-      Currently the NFP PMD supports using the PF with Agilio Basic Firmware. See
-      https://help.netronome.com/support/solutions for more information on the
-      various firmwares supported by the Netronome Agilio CX smartNIC.
+      Currently the NFP PMD supports using the PF with Agilio Firmware with NFD3
+      and Agilio Firmware with NFDk. See https://help.netronome.com/support/solutions
+      for more information on the various firmwares supported by the Netronome
+      Agilio CX smartNIC.
 
 PF multiport support
 --------------------
diff a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst	(rejected hunks)
@@ -111,6 +111,7 @@ New Features
 * **Updated Netronome nfp driver.**
 
   * Added support for NFP3800 NIC.
+  * Added support for firmware with NFDk.
 
 * **Updated VMware vmxnet3 networking driver.**
 
diff a/drivers/net/nfp/nfp_ctrl.h b/drivers/net/nfp/nfp_ctrl.h	(rejected hunks)
@@ -135,6 +135,8 @@
  * - define more STS bits
  */
 #define NFP_NET_CFG_VERSION             0x0030
+#define   NFP_NET_CFG_VERSION_DP_NFD3   0
+#define   NFP_NET_CFG_VERSION_DP_NFDK   1
 #define   NFP_NET_CFG_VERSION_RESERVED_MASK	(0xff << 24)
 #define   NFP_NET_CFG_VERSION_CLASS_MASK  (0xff << 16)
 #define   NFP_NET_CFG_VERSION_CLASS(x)    (((x) & 0xff) << 16)
diff a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c	(rejected hunks)
@@ -358,6 +358,32 @@ static const struct eth_dev_ops nfp_net_nfd3_eth_dev_ops = {
 	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
 };
 
+static inline int
+nfp_net_ethdev_ops_mount(struct nfp_net_hw *hw, struct rte_eth_dev *eth_dev)
+{
+	switch (NFD_CFG_CLASS_VER_of(hw->ver)) {
+	case NFP_NET_CFG_VERSION_DP_NFD3:
+		break;
+	case NFP_NET_CFG_VERSION_DP_NFDK:
+		if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 5) {
+			PMD_DRV_LOG(ERR, "NFDK must use ABI 5 or newer, found: %d",
+				NFD_CFG_MAJOR_VERSION_of(hw->ver));
+			return -EINVAL;
+		}
+		break;
+	default:
+		PMD_DRV_LOG(ERR, "The version of firmware is not correct.");
+		return -EINVAL;
+	}
+
+	eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
+	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
+	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
+	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
+
+	return 0;
+}
+
 static int
 nfp_net_init(struct rte_eth_dev *eth_dev)
 {
@@ -402,11 +428,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, "
 			"NFP internal port number: %d", port, hw->nfp_idx);
 
-	eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
-	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
-	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
-	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
-
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
@@ -441,6 +462,11 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);
 
+	hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
+
+	if (nfp_net_ethdev_ops_mount(hw, eth_dev))
+		return -EINVAL;
+
 	hw->max_rx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_RXRINGS);
 	hw->max_tx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_TXRINGS);
 
@@ -473,7 +499,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	nfp_net_cfg_queue_setup(hw);
 
 	/* Get some of the read-only fields from the config BAR */
-	hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
 	hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP);
 	hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU);
 	hw->mtu = RTE_ETHER_MTU;
@@ -939,6 +964,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 	int err;
 	int total_ports;
 	struct nfp_cpp *cpp;
+	struct nfp_net_hw *hw;
 	struct nfp_rtsym_table *sym_tbl;
 
 	if (pci_dev == NULL)
@@ -988,11 +1014,14 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 				"secondary process attach failed, ethdev doesn't exist");
 			return -ENODEV;
 		}
+
+		hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
+
+		if (nfp_net_ethdev_ops_mount(hw, eth_dev))
+			return -EINVAL;
+
 		eth_dev->process_private = cpp;
-		eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
-		eth_dev->rx_queue_count = nfp_net_rx_queue_count;
-		eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
-		eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
+
 		rte_eth_dev_probing_finish(eth_dev);
 	}
 
diff a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c	(rejected hunks)
@@ -265,6 +265,32 @@ static const struct eth_dev_ops nfp_netvf_nfd3_eth_dev_ops = {
 	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
 };
 
+static inline int
+nfp_netvf_ethdev_ops_mount(struct nfp_net_hw *hw, struct rte_eth_dev *eth_dev)
+{
+	switch (NFD_CFG_CLASS_VER_of(hw->ver)) {
+	case NFP_NET_CFG_VERSION_DP_NFD3:
+		break;
+	case NFP_NET_CFG_VERSION_DP_NFDK:
+		if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 5) {
+			PMD_DRV_LOG(ERR, "NFDK must use ABI 5 or newer, found: %d",
+				NFD_CFG_MAJOR_VERSION_of(hw->ver));
+			return -EINVAL;
+		}
+		break;
+	default:
+		PMD_DRV_LOG(ERR, "The version of firmware is not correct.");
+		return -EINVAL;
+	}
+
+	eth_dev->dev_ops = &nfp_netvf_nfd3_eth_dev_ops;
+	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
+	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
+	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
+
+	return 0;
+}
+
 static int
 nfp_netvf_init(struct rte_eth_dev *eth_dev)
 {
@@ -292,10 +318,19 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
 
-	eth_dev->dev_ops = &nfp_netvf_nfd3_eth_dev_ops;
-	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
-	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
-	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
+	hw->ctrl_bar = (uint8_t *)pci_dev->mem_resource[0].addr;
+	if (hw->ctrl_bar == NULL) {
+		PMD_DRV_LOG(ERR,
+			"hw->ctrl_bar is NULL. BAR0 not configured");
+		return -ENODEV;
+	}
+
+	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);
+
+	hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
+
+	if (nfp_netvf_ethdev_ops_mount(hw, eth_dev))
+		return -EINVAL;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
@@ -313,15 +348,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
 		     pci_dev->addr.domain, pci_dev->addr.bus,
 		     pci_dev->addr.devid, pci_dev->addr.function);
 
-	hw->ctrl_bar = (uint8_t *)pci_dev->mem_resource[0].addr;
-	if (hw->ctrl_bar == NULL) {
-		PMD_DRV_LOG(ERR,
-			"hw->ctrl_bar is NULL. BAR0 not configured");
-		return -ENODEV;
-	}
-
-	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);
-
 	hw->max_rx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_RXRINGS);
 	hw->max_tx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_TXRINGS);
 
@@ -354,7 +380,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
 	nfp_net_cfg_queue_setup(hw);
 
 	/* Get some of the read-only fields from the config BAR */
-	hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
 	hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP);
 	hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU);
 	hw->mtu = RTE_ETHER_MTU;
Checking patch drivers/net/nfp/nfp_rxtx.h...
error: while searching for:
#define PCIE_DESC_TX_ENCAP_VXLAN        (1 << 1)
#define PCIE_DESC_TX_ENCAP_GRE          (1 << 0)

struct nfp_net_nfd3_tx_desc {
	union {
		struct {

error: patch failed: drivers/net/nfp/nfp_rxtx.h:53
Hunk #2 succeeded at 136 (offset 27 lines).
error: while searching for:
	 * of the queue and @size is the size in bytes for the queue
	 * (needed for free)
	 */
	struct nfp_net_nfd3_tx_desc *txds;

	/*
	 * At this point 48 bytes have been used for all the fields in the

error: patch failed: drivers/net/nfp/nfp_rxtx.h:124
error: while searching for:
	uint32_t tx_hthresh;   /* not used by now. Future? */
	uint32_t tx_wthresh;   /* not used by now. Future? */
	uint16_t port_id;
	int qidx;
	int tx_qcidx;
	__le64 dma;

error: patch failed: drivers/net/nfp/nfp_rxtx.h:137
Applying patch drivers/net/nfp/nfp_rxtx.h with 3 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
Rejected hunk #4.
diff a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h	(rejected hunks)
@@ -53,6 +53,31 @@
 #define PCIE_DESC_TX_ENCAP_VXLAN        (1 << 1)
 #define PCIE_DESC_TX_ENCAP_GRE          (1 << 0)
 
+#define NFDK_TX_MAX_DATA_PER_HEAD       0x00001000
+#define NFDK_DESC_TX_DMA_LEN_HEAD       0x0fff
+#define NFDK_DESC_TX_TYPE_HEAD          0xf000
+#define NFDK_DESC_TX_DMA_LEN            0x3fff
+#define NFDK_TX_DESC_PER_SIMPLE_PKT     2
+#define NFDK_DESC_TX_TYPE_TSO           2
+#define NFDK_DESC_TX_TYPE_SIMPLE        8
+#define NFDK_DESC_TX_TYPE_GATHER        1
+#define NFDK_DESC_TX_EOP                BIT(14)
+#define NFDK_DESC_TX_L4_CSUM            BIT(1)
+#define NFDK_DESC_TX_L3_CSUM            BIT(0)
+
+#define NFDK_TX_MAX_DATA_PER_DESC      0x00004000
+#define NFDK_TX_DESC_GATHER_MAX        17
+#define DIV_ROUND_UP(n, d)             (((n) + (d) - 1) / (d))
+#define NFDK_TX_DESC_BLOCK_SZ          256
+#define NFDK_TX_DESC_BLOCK_CNT         (NFDK_TX_DESC_BLOCK_SZ /         \
+					sizeof(struct nfp_net_nfdk_tx_desc))
+#define NFDK_TX_DESC_STOP_CNT          (NFDK_TX_DESC_BLOCK_CNT *        \
+					NFDK_TX_DESC_PER_SIMPLE_PKT)
+#define NFDK_TX_MAX_DATA_PER_BLOCK     0x00010000
+#define D_BLOCK_CPL(idx)               (NFDK_TX_DESC_BLOCK_CNT -        \
+					(idx) % NFDK_TX_DESC_BLOCK_CNT)
+#define D_IDX(ring, idx)               ((idx) & ((ring)->tx_count - 1))
+
 struct nfp_net_nfd3_tx_desc {
 	union {
 		struct {
@@ -124,7 +176,10 @@ struct nfp_net_txq {
 	 * of the queue and @size is the size in bytes for the queue
 	 * (needed for free)
 	 */
-	struct nfp_net_nfd3_tx_desc *txds;
+	union {
+		struct nfp_net_nfd3_tx_desc *txds;
+		struct nfp_net_nfdk_tx_desc *ktxds;
+	};
 
 	/*
 	 * At this point 48 bytes have been used for all the fields in the
@@ -137,6 +192,7 @@ struct nfp_net_txq {
 	uint32_t tx_hthresh;   /* not used by now. Future? */
 	uint32_t tx_wthresh;   /* not used by now. Future? */
 	uint16_t port_id;
+	uint16_t data_pending; /* used by nfdk only */
 	int qidx;
 	int tx_qcidx;
 	__le64 dma;
Checking patch drivers/net/nfp/nfp_ethdev.c...
error: while searching for:
	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
};

static inline int
nfp_net_ethdev_ops_mount(struct nfp_net_hw *hw, struct rte_eth_dev *eth_dev)
{
	switch (NFD_CFG_CLASS_VER_of(hw->ver)) {
	case NFP_NET_CFG_VERSION_DP_NFD3:
		break;
	case NFP_NET_CFG_VERSION_DP_NFDK:
		if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 5) {

error: patch failed: drivers/net/nfp/nfp_ethdev.c:358
error: while searching for:
				NFD_CFG_MAJOR_VERSION_of(hw->ver));
			return -EINVAL;
		}
		break;
	default:
		PMD_DRV_LOG(ERR, "The version of firmware is not correct.");
		return -EINVAL;
	}

	eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;

error: patch failed: drivers/net/nfp/nfp_ethdev.c:370
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
error: while searching for:
	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
};

static inline int
nfp_netvf_ethdev_ops_mount(struct nfp_net_hw *hw, struct rte_eth_dev *eth_dev)
{
	switch (NFD_CFG_CLASS_VER_of(hw->ver)) {
	case NFP_NET_CFG_VERSION_DP_NFD3:
		break;
	case NFP_NET_CFG_VERSION_DP_NFDK:
		if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 5) {

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:265
error: while searching for:
				NFD_CFG_MAJOR_VERSION_of(hw->ver));
			return -EINVAL;
		}
		break;
	default:
		PMD_DRV_LOG(ERR, "The version of firmware is not correct.");
		return -EINVAL;
	}

	eth_dev->dev_ops = &nfp_netvf_nfd3_eth_dev_ops;
	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:277
Checking patch drivers/net/nfp/nfp_rxtx.c...
error: while searching for:

	return i;
}

error: patch failed: drivers/net/nfp/nfp_rxtx.c:987
Checking patch drivers/net/nfp/nfp_rxtx.h...
error: drivers/net/nfp/nfp_rxtx.h: does not match index
Applying patch drivers/net/nfp/nfp_ethdev.c with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch drivers/net/nfp/nfp_ethdev_vf.c with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch drivers/net/nfp/nfp_rxtx.c with 1 reject...
Rejected hunk #1.
diff a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c	(rejected hunks)
@@ -358,11 +358,41 @@ static const struct eth_dev_ops nfp_net_nfd3_eth_dev_ops = {
 	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
 };
 
+static const struct eth_dev_ops nfp_net_nfdk_eth_dev_ops = {
+	.dev_configure		= nfp_net_configure,
+	.dev_start		= nfp_net_start,
+	.dev_stop		= nfp_net_stop,
+	.dev_set_link_up	= nfp_net_set_link_up,
+	.dev_set_link_down	= nfp_net_set_link_down,
+	.dev_close		= nfp_net_close,
+	.promiscuous_enable	= nfp_net_promisc_enable,
+	.promiscuous_disable	= nfp_net_promisc_disable,
+	.link_update		= nfp_net_link_update,
+	.stats_get		= nfp_net_stats_get,
+	.stats_reset		= nfp_net_stats_reset,
+	.dev_infos_get		= nfp_net_infos_get,
+	.dev_supported_ptypes_get = nfp_net_supported_ptypes_get,
+	.mtu_set		= nfp_net_dev_mtu_set,
+	.mac_addr_set		= nfp_net_set_mac_addr,
+	.vlan_offload_set	= nfp_net_vlan_offload_set,
+	.reta_update		= nfp_net_reta_update,
+	.reta_query		= nfp_net_reta_query,
+	.rss_hash_update	= nfp_net_rss_hash_update,
+	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
+	.rx_queue_setup		= nfp_net_rx_queue_setup,
+	.rx_queue_release	= nfp_net_rx_queue_release,
+	.tx_queue_setup		= nfp_net_nfdk_tx_queue_setup,
+	.tx_queue_release	= nfp_net_tx_queue_release,
+	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
+	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
+};
+
 static inline int
 nfp_net_ethdev_ops_mount(struct nfp_net_hw *hw, struct rte_eth_dev *eth_dev)
 {
 	switch (NFD_CFG_CLASS_VER_of(hw->ver)) {
 	case NFP_NET_CFG_VERSION_DP_NFD3:
+		eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
 		break;
 	case NFP_NET_CFG_VERSION_DP_NFDK:
 		if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 5) {
@@ -370,13 +400,13 @@ nfp_net_ethdev_ops_mount(struct nfp_net_hw *hw, struct rte_eth_dev *eth_dev)
 				NFD_CFG_MAJOR_VERSION_of(hw->ver));
 			return -EINVAL;
 		}
+		eth_dev->dev_ops = &nfp_net_nfdk_eth_dev_ops;
 		break;
 	default:
 		PMD_DRV_LOG(ERR, "The version of firmware is not correct.");
 		return -EINVAL;
 	}
 
-	eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
 	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
 	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
 	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
diff a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c	(rejected hunks)
@@ -265,11 +265,41 @@ static const struct eth_dev_ops nfp_netvf_nfd3_eth_dev_ops = {
 	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
 };
 
+static const struct eth_dev_ops nfp_netvf_nfdk_eth_dev_ops = {
+	.dev_configure		= nfp_net_configure,
+	.dev_start		= nfp_netvf_start,
+	.dev_stop		= nfp_netvf_stop,
+	.dev_set_link_up	= nfp_netvf_set_link_up,
+	.dev_set_link_down	= nfp_netvf_set_link_down,
+	.dev_close		= nfp_netvf_close,
+	.promiscuous_enable	= nfp_net_promisc_enable,
+	.promiscuous_disable	= nfp_net_promisc_disable,
+	.link_update		= nfp_net_link_update,
+	.stats_get		= nfp_net_stats_get,
+	.stats_reset		= nfp_net_stats_reset,
+	.dev_infos_get		= nfp_net_infos_get,
+	.dev_supported_ptypes_get = nfp_net_supported_ptypes_get,
+	.mtu_set		= nfp_net_dev_mtu_set,
+	.mac_addr_set		= nfp_net_set_mac_addr,
+	.vlan_offload_set	= nfp_net_vlan_offload_set,
+	.reta_update		= nfp_net_reta_update,
+	.reta_query		= nfp_net_reta_query,
+	.rss_hash_update	= nfp_net_rss_hash_update,
+	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
+	.rx_queue_setup		= nfp_net_rx_queue_setup,
+	.rx_queue_release	= nfp_net_rx_queue_release,
+	.tx_queue_setup		= nfp_net_nfdk_tx_queue_setup,
+	.tx_queue_release	= nfp_net_tx_queue_release,
+	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
+	.rx_queue_intr_disable  = nfp_rx_queue_intr_disable,
+};
+
 static inline int
 nfp_netvf_ethdev_ops_mount(struct nfp_net_hw *hw, struct rte_eth_dev *eth_dev)
 {
 	switch (NFD_CFG_CLASS_VER_of(hw->ver)) {
 	case NFP_NET_CFG_VERSION_DP_NFD3:
+		eth_dev->dev_ops = &nfp_netvf_nfd3_eth_dev_ops;
 		break;
 	case NFP_NET_CFG_VERSION_DP_NFDK:
 		if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 5) {
@@ -277,13 +307,13 @@ nfp_netvf_ethdev_ops_mount(struct nfp_net_hw *hw, struct rte_eth_dev *eth_dev)
 				NFD_CFG_MAJOR_VERSION_of(hw->ver));
 			return -EINVAL;
 		}
+		eth_dev->dev_ops = &nfp_netvf_nfdk_eth_dev_ops;
 		break;
 	default:
 		PMD_DRV_LOG(ERR, "The version of firmware is not correct.");
 		return -EINVAL;
 	}
 
-	eth_dev->dev_ops = &nfp_netvf_nfd3_eth_dev_ops;
 	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
 	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
 	eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
diff a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c	(rejected hunks)
@@ -987,3 +987,120 @@ nfp_net_nfd3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pk
 
 	return i;
 }
+
+int
+nfp_net_nfdk_tx_queue_setup(struct rte_eth_dev *dev,
+		uint16_t queue_idx,
+		uint16_t nb_desc,
+		unsigned int socket_id,
+		const struct rte_eth_txconf *tx_conf)
+{
+	const struct rte_memzone *tz;
+	struct nfp_net_txq *txq;
+	uint16_t tx_free_thresh;
+	struct nfp_net_hw *hw;
+	uint32_t tx_desc_sz;
+
+	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	PMD_INIT_FUNC_TRACE();
+
+	/* Validating number of descriptors */
+	tx_desc_sz = nb_desc * sizeof(struct nfp_net_nfdk_tx_desc);
+	if (((NFDK_TX_DESC_PER_SIMPLE_PKT * tx_desc_sz) % NFP_ALIGN_RING_DESC) != 0 ||
+	    ((NFDK_TX_DESC_PER_SIMPLE_PKT * nb_desc) % NFDK_TX_DESC_BLOCK_CNT) != 0 ||
+	      nb_desc > NFP_NET_MAX_TX_DESC || nb_desc < NFP_NET_MIN_TX_DESC) {
+		PMD_DRV_LOG(ERR, "Wrong nb_desc value");
+		return -EINVAL;
+	}
+
+	tx_free_thresh = (uint16_t)((tx_conf->tx_free_thresh) ?
+				tx_conf->tx_free_thresh :
+				DEFAULT_TX_FREE_THRESH);
+
+	if (tx_free_thresh > (nb_desc)) {
+		PMD_DRV_LOG(ERR,
+			"tx_free_thresh must be less than the number of TX "
+			"descriptors. (tx_free_thresh=%u port=%d "
+			"queue=%d)", (unsigned int)tx_free_thresh,
+			dev->data->port_id, (int)queue_idx);
+		return -(EINVAL);
+	}
+
+	/*
+	 * Free memory prior to re-allocation if needed. This is the case after
+	 * calling nfp_net_stop
+	 */
+	if (dev->data->tx_queues[queue_idx]) {
+		PMD_TX_LOG(DEBUG, "Freeing memory prior to re-allocation %d",
+				queue_idx);
+		nfp_net_tx_queue_release(dev, queue_idx);
+		dev->data->tx_queues[queue_idx] = NULL;
+	}
+
+	/* Allocating tx queue data structure */
+	txq = rte_zmalloc_socket("ethdev TX queue", sizeof(struct nfp_net_txq),
+			RTE_CACHE_LINE_SIZE, socket_id);
+	if (txq == NULL) {
+		PMD_DRV_LOG(ERR, "Error allocating tx dma");
+		return -ENOMEM;
+	}
+
+	/*
+	 * Allocate TX ring hardware descriptors. A memzone large enough to
+	 * handle the maximum ring size is allocated in order to allow for
+	 * resizing in later calls to the queue setup function.
+	 */
+	tz = rte_eth_dma_zone_reserve(dev, "tx_ring", queue_idx,
+				sizeof(struct nfp_net_nfdk_tx_desc) *
+				NFDK_TX_DESC_PER_SIMPLE_PKT *
+				NFP_NET_MAX_TX_DESC, NFP_MEMZONE_ALIGN,
+				socket_id);
+	if (tz == NULL) {
+		PMD_DRV_LOG(ERR, "Error allocating tx dma");
+		nfp_net_tx_queue_release(dev, queue_idx);
+		return -ENOMEM;
+	}
+
+	txq->tx_count = nb_desc * NFDK_TX_DESC_PER_SIMPLE_PKT;
+	txq->tx_free_thresh = tx_free_thresh;
+	txq->tx_pthresh = tx_conf->tx_thresh.pthresh;
+	txq->tx_hthresh = tx_conf->tx_thresh.hthresh;
+	txq->tx_wthresh = tx_conf->tx_thresh.wthresh;
+
+	/* queue mapping based on firmware configuration */
+	txq->qidx = queue_idx;
+	txq->tx_qcidx = queue_idx * hw->stride_tx;
+	txq->qcp_q = hw->tx_bar + NFP_QCP_QUEUE_OFF(txq->tx_qcidx);
+
+	txq->port_id = dev->data->port_id;
+
+	/* Saving physical and virtual addresses for the TX ring */
+	txq->dma = (uint64_t)tz->iova;
+	txq->ktxds = (struct nfp_net_nfdk_tx_desc *)tz->addr;
+
+	/* mbuf pointers array for referencing mbufs linked to TX descriptors */
+	txq->txbufs = rte_zmalloc_socket("txq->txbufs",
+				sizeof(*txq->txbufs) * txq->tx_count,
+				RTE_CACHE_LINE_SIZE, socket_id);
+
+	if (txq->txbufs == NULL) {
+		nfp_net_tx_queue_release(dev, queue_idx);
+		return -ENOMEM;
+	}
+	PMD_TX_LOG(DEBUG, "txbufs=%p hw_ring=%p dma_addr=0x%" PRIx64,
+		txq->txbufs, txq->ktxds, (unsigned long)txq->dma);
+
+	nfp_net_reset_tx_queue(txq);
+
+	dev->data->tx_queues[queue_idx] = txq;
+	txq->hw = hw;
+	/*
+	 * Telling the HW about the physical address of the TX ring and number
+	 * of descriptors in log2 format
+	 */
+	nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(queue_idx), txq->dma);
+	nn_cfg_writeb(hw, NFP_NET_CFG_TXR_SZ(queue_idx), rte_log2_u32(txq->tx_count));
+
+	return 0;
+}
Checking patch drivers/net/nfp/nfp_common.c...
error: while searching for:
	return ret;
}

RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE);
RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE);
/*

error: patch failed: drivers/net/nfp/nfp_common.c:1320
Checking patch drivers/net/nfp/nfp_common.h...
error: while searching for:
int nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
			      struct rte_eth_rss_conf *rss_conf);
int nfp_net_rss_config_default(struct rte_eth_dev *dev);

#define NFP_NET_DEV_PRIVATE_TO_HW(adapter)\
	(&((struct nfp_net_adapter *)adapter)->hw)

error: patch failed: drivers/net/nfp/nfp_common.h:413
Checking patch drivers/net/nfp/nfp_ethdev.c...
error: while searching for:
static int
nfp_net_stop(struct rte_eth_dev *dev)
{
	int i;
	struct nfp_net_hw *hw;
	struct nfp_net_txq *this_tx_q;
	struct nfp_net_rxq *this_rx_q;

	PMD_INIT_LOG(DEBUG, "Stop");


error: patch failed: drivers/net/nfp/nfp_ethdev.c:181
error: while searching for:
	nfp_net_disable_queues(dev);

	/* Clear queues */
	for (i = 0; i < dev->data->nb_tx_queues; i++) {
		this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
		nfp_net_reset_tx_queue(this_tx_q);
	}

	for (i = 0; i < dev->data->nb_rx_queues; i++) {
		this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
		nfp_net_reset_rx_queue(this_rx_q);
	}

	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
		/* Configure the physical port down */

error: patch failed: drivers/net/nfp/nfp_ethdev.c:193
error: while searching for:
	struct nfp_net_hw *hw;
	struct rte_pci_device *pci_dev;
	struct nfp_pf_dev *pf_dev;
	struct nfp_net_txq *this_tx_q;
	struct nfp_net_rxq *this_rx_q;
	int i;

	if (rte_eal_process_type() != RTE_PROC_PRIMARY)

error: patch failed: drivers/net/nfp/nfp_ethdev.c:256
error: while searching for:
	nfp_net_disable_queues(dev);

	/* Clear queues */
	for (i = 0; i < dev->data->nb_tx_queues; i++) {
		this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
		nfp_net_reset_tx_queue(this_tx_q);
		nfp_net_tx_queue_release(dev, i);
	}

	for (i = 0; i < dev->data->nb_rx_queues; i++) {
		this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
		nfp_net_reset_rx_queue(this_rx_q);
		nfp_net_rx_queue_release(dev, i);
	}

	/* Cancel possible impending LSC work here before releasing the port*/
	rte_eal_alarm_cancel(nfp_net_dev_interrupt_delayed_handler,

error: patch failed: drivers/net/nfp/nfp_ethdev.c:277
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
error: while searching for:
static int
nfp_netvf_stop(struct rte_eth_dev *dev)
{
	struct nfp_net_txq *this_tx_q;
	struct nfp_net_rxq *this_rx_q;
	int i;

	PMD_INIT_LOG(DEBUG, "Stop");

	nfp_net_disable_queues(dev);

	/* Clear queues */
	for (i = 0; i < dev->data->nb_tx_queues; i++) {
		this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
		nfp_net_reset_tx_queue(this_tx_q);
	}

	for (i = 0; i < dev->data->nb_rx_queues; i++) {
		this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
		nfp_net_reset_rx_queue(this_rx_q);
	}

	return 0;
}

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:145
error: while searching for:
nfp_netvf_close(struct rte_eth_dev *dev)
{
	struct rte_pci_device *pci_dev;
	struct nfp_net_txq *this_tx_q;
	struct nfp_net_rxq *this_rx_q;
	int i;

	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
		return 0;

error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:185
error: while searching for:
	nfp_net_disable_queues(dev);

	/* Clear queues */
	for (i = 0; i < dev->data->nb_tx_queues; i++) {
		this_tx_q =  (struct nfp_net_txq *)dev->data->tx_queues[i];
		nfp_net_reset_tx_queue(this_tx_q);
		nfp_net_tx_queue_release(dev, i);
	}

	for (i = 0; i < dev->data->nb_rx_queues; i++) {
		this_rx_q =  (struct nfp_net_rxq *)dev->data->rx_queues[i];
		nfp_net_reset_rx_queue(this_rx_q);
		nfp_net_rx_queue_release(dev, i);
	}

	rte_intr_disable(pci_dev->intr_handle);


error: patch failed: drivers/net/nfp/nfp_ethdev_vf.c:204
Applying patch drivers/net/nfp/nfp_common.c with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_common.h with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_ethdev.c with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Applying patch drivers/net/nfp/nfp_ethdev_vf.c with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c	(rejected hunks)
@@ -1320,6 +1320,56 @@ nfp_net_rss_config_default(struct rte_eth_dev *dev)
 	return ret;
 }
 
+void
+nfp_net_stop_rx_queue(struct rte_eth_dev *dev)
+{
+	uint16_t i;
+	struct nfp_net_rxq *this_rx_q;
+
+	for (i = 0; i < dev->data->nb_rx_queues; i++) {
+		this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
+		nfp_net_reset_rx_queue(this_rx_q);
+	}
+}
+
+void
+nfp_net_close_rx_queue(struct rte_eth_dev *dev)
+{
+	uint16_t i;
+	struct nfp_net_rxq *this_rx_q;
+
+	for (i = 0; i < dev->data->nb_rx_queues; i++) {
+		this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
+		nfp_net_reset_rx_queue(this_rx_q);
+		nfp_net_rx_queue_release(dev, i);
+	}
+}
+
+void
+nfp_net_stop_tx_queue(struct rte_eth_dev *dev)
+{
+	uint16_t i;
+	struct nfp_net_txq *this_tx_q;
+
+	for (i = 0; i < dev->data->nb_tx_queues; i++) {
+		this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
+		nfp_net_reset_tx_queue(this_tx_q);
+	}
+}
+
+void
+nfp_net_close_tx_queue(struct rte_eth_dev *dev)
+{
+	uint16_t i;
+	struct nfp_net_txq *this_tx_q;
+
+	for (i = 0; i < dev->data->nb_tx_queues; i++) {
+		this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
+		nfp_net_reset_tx_queue(this_tx_q);
+		nfp_net_tx_queue_release(dev, i);
+	}
+}
+
 RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE);
 RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE);
 /*
diff a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h	(rejected hunks)
@@ -413,6 +413,10 @@ int nfp_net_rss_hash_update(struct rte_eth_dev *dev,
 int nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
 			      struct rte_eth_rss_conf *rss_conf);
 int nfp_net_rss_config_default(struct rte_eth_dev *dev);
+void nfp_net_stop_rx_queue(struct rte_eth_dev *dev);
+void nfp_net_close_rx_queue(struct rte_eth_dev *dev);
+void nfp_net_stop_tx_queue(struct rte_eth_dev *dev);
+void nfp_net_close_tx_queue(struct rte_eth_dev *dev);
 
 #define NFP_NET_DEV_PRIVATE_TO_HW(adapter)\
 	(&((struct nfp_net_adapter *)adapter)->hw)
diff a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c	(rejected hunks)
@@ -181,10 +181,7 @@ nfp_net_start(struct rte_eth_dev *dev)
 static int
 nfp_net_stop(struct rte_eth_dev *dev)
 {
-	int i;
 	struct nfp_net_hw *hw;
-	struct nfp_net_txq *this_tx_q;
-	struct nfp_net_rxq *this_rx_q;
 
 	PMD_INIT_LOG(DEBUG, "Stop");
 
@@ -193,15 +190,9 @@ nfp_net_stop(struct rte_eth_dev *dev)
 	nfp_net_disable_queues(dev);
 
 	/* Clear queues */
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
-		nfp_net_reset_tx_queue(this_tx_q);
-	}
+	nfp_net_stop_tx_queue(dev);
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
-		nfp_net_reset_rx_queue(this_rx_q);
-	}
+	nfp_net_stop_rx_queue(dev);
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
 		/* Configure the physical port down */
@@ -256,8 +247,6 @@ nfp_net_close(struct rte_eth_dev *dev)
 	struct nfp_net_hw *hw;
 	struct rte_pci_device *pci_dev;
 	struct nfp_pf_dev *pf_dev;
-	struct nfp_net_txq *this_tx_q;
-	struct nfp_net_rxq *this_rx_q;
 	int i;
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
@@ -277,17 +266,9 @@ nfp_net_close(struct rte_eth_dev *dev)
 	nfp_net_disable_queues(dev);
 
 	/* Clear queues */
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
-		nfp_net_reset_tx_queue(this_tx_q);
-		nfp_net_tx_queue_release(dev, i);
-	}
+	nfp_net_close_tx_queue(dev);
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
-		nfp_net_reset_rx_queue(this_rx_q);
-		nfp_net_rx_queue_release(dev, i);
-	}
+	nfp_net_close_rx_queue(dev);
 
 	/* Cancel possible impending LSC work here before releasing the port*/
 	rte_eal_alarm_cancel(nfp_net_dev_interrupt_delayed_handler,
diff a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c	(rejected hunks)
@@ -145,24 +145,14 @@ nfp_netvf_start(struct rte_eth_dev *dev)
 static int
 nfp_netvf_stop(struct rte_eth_dev *dev)
 {
-	struct nfp_net_txq *this_tx_q;
-	struct nfp_net_rxq *this_rx_q;
-	int i;
-
 	PMD_INIT_LOG(DEBUG, "Stop");
 
 	nfp_net_disable_queues(dev);
 
 	/* Clear queues */
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
-		nfp_net_reset_tx_queue(this_tx_q);
-	}
+	nfp_net_stop_tx_queue(dev);
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
-		nfp_net_reset_rx_queue(this_rx_q);
-	}
+	nfp_net_stop_rx_queue(dev);
 
 	return 0;
 }
@@ -185,9 +175,6 @@ static int
 nfp_netvf_close(struct rte_eth_dev *dev)
 {
 	struct rte_pci_device *pci_dev;
-	struct nfp_net_txq *this_tx_q;
-	struct nfp_net_rxq *this_rx_q;
-	int i;
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
@@ -204,17 +191,9 @@ nfp_netvf_close(struct rte_eth_dev *dev)
 	nfp_net_disable_queues(dev);
 
 	/* Clear queues */
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		this_tx_q =  (struct nfp_net_txq *)dev->data->tx_queues[i];
-		nfp_net_reset_tx_queue(this_tx_q);
-		nfp_net_tx_queue_release(dev, i);
-	}
+	nfp_net_close_tx_queue(dev);
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		this_rx_q =  (struct nfp_net_rxq *)dev->data->rx_queues[i];
-		nfp_net_reset_rx_queue(this_rx_q);
-		nfp_net_rx_queue_release(dev, i);
-	}
+	nfp_net_close_rx_queue(dev);
 
 	rte_intr_disable(pci_dev->intr_handle);
 
Checking patch drivers/net/nfp/nfpcore/nfp_rtsym.c...
error: while searching for:
	return rtbl;
}

/*
 * This looks more complex than it should be. But we need to get the type for
 * the ~ right in round_down (it needs to be as wide as the result!), and we
 * want to evaluate the macro arguments just once each.
 */
#define __round_mask(x, y) ((__typeof__(x))((y) - 1))

#define round_up(x, y) \
	(__extension__ ({ \
		typeof(x) _x = (x); \
		((((_x) - 1) | __round_mask(_x, y)) + 1); \
	}))

#define round_down(x, y) \
	(__extension__ ({ \
		typeof(x) _x = (x); \
		((_x) & ~__round_mask(_x, y)); \
	}))

struct nfp_rtsym_table *
__nfp_rtsym_table_read(struct nfp_cpp *cpp, const struct nfp_mip *mip)
{

error: patch failed: drivers/net/nfp/nfpcore/nfp_rtsym.c:94
Checking patch drivers/net/nfp/nfpcore/nfp_rtsym.h...
error: while searching for:
#define NFP_RTSYM_TARGET_LMEM           -1
#define NFP_RTSYM_TARGET_EMU_CACHE      -7

/*
 * Structure describing a run-time NFP symbol.
 *

error: patch failed: drivers/net/nfp/nfpcore/nfp_rtsym.h:15
Applying patch drivers/net/nfp/nfpcore/nfp_rtsym.c with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfpcore/nfp_rtsym.h with 1 reject...
Rejected hunk #1.
diff a/drivers/net/nfp/nfpcore/nfp_rtsym.c b/drivers/net/nfp/nfpcore/nfp_rtsym.c	(rejected hunks)
@@ -94,25 +94,6 @@ nfp_rtsym_table_read(struct nfp_cpp *cpp)
 	return rtbl;
 }
 
-/*
- * This looks more complex than it should be. But we need to get the type for
- * the ~ right in round_down (it needs to be as wide as the result!), and we
- * want to evaluate the macro arguments just once each.
- */
-#define __round_mask(x, y) ((__typeof__(x))((y) - 1))
-
-#define round_up(x, y) \
-	(__extension__ ({ \
-		typeof(x) _x = (x); \
-		((((_x) - 1) | __round_mask(_x, y)) + 1); \
-	}))
-
-#define round_down(x, y) \
-	(__extension__ ({ \
-		typeof(x) _x = (x); \
-		((_x) & ~__round_mask(_x, y)); \
-	}))
-
 struct nfp_rtsym_table *
 __nfp_rtsym_table_read(struct nfp_cpp *cpp, const struct nfp_mip *mip)
 {
diff a/drivers/net/nfp/nfpcore/nfp_rtsym.h b/drivers/net/nfp/nfpcore/nfp_rtsym.h	(rejected hunks)
@@ -15,6 +15,25 @@
 #define NFP_RTSYM_TARGET_LMEM           -1
 #define NFP_RTSYM_TARGET_EMU_CACHE      -7
 
+/*
+ * This looks more complex than it should be. But we need to get the type for
+ * the ~ right in round_down (it needs to be as wide as the result!), and we
+ * want to evaluate the macro arguments just once each.
+ */
+#define __round_mask(x, y) ((__typeof__(x))((y) - 1))
+
+#define round_up(x, y) \
+	(__extension__ ({ \
+		typeof(x) _x = (x); \
+		((((_x) - 1) | __round_mask(_x, y)) + 1); \
+	}))
+
+#define round_down(x, y) \
+	(__extension__ ({ \
+		typeof(x) _x = (x); \
+		((_x) & ~__round_mask(_x, y)); \
+	}))
+
 /*
  * Structure describing a run-time NFP symbol.
  *
Checking patch drivers/net/nfp/nfp_ethdev.c...
Hunk #1 succeeded at 377 (offset 3 lines).
Hunk #2 succeeded at 386 (offset 3 lines).
Hunk #3 succeeded at 395 (offset 3 lines).
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
Hunk #1 succeeded at 282 (offset 3 lines).
Hunk #2 succeeded at 291 (offset 3 lines).
Hunk #3 succeeded at 300 (offset 3 lines).
Checking patch drivers/net/nfp/nfp_rxtx.c...
Checking patch drivers/net/nfp/nfp_rxtx.h...
error: drivers/net/nfp/nfp_rxtx.h: does not match index
Applied patch drivers/net/nfp/nfp_ethdev.c cleanly.
Applied patch drivers/net/nfp/nfp_ethdev_vf.c cleanly.
Applied patch drivers/net/nfp/nfp_rxtx.c cleanly.
Checking patch drivers/net/nfp/nfp_common.c...
error: while searching for:

	/* Checking RX mode */
	if (rxmode->mq_mode & RTE_ETH_MQ_RX_RSS &&
	    !(hw->cap & NFP_NET_CFG_CTRL_RSS)) {
		PMD_INIT_LOG(INFO, "RSS not supported");
		return -EINVAL;
	}

error: patch failed: drivers/net/nfp/nfp_common.c:171
error: while searching for:
		.nb_mtu_seg_max = NFP_TX_MAX_MTU_SEG,
	};

	if (hw->cap & NFP_NET_CFG_CTRL_RSS) {
		dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_RSS_HASH;

		dev_info->flow_type_rss_offloads = RTE_ETH_RSS_IPV4 |

error: patch failed: drivers/net/nfp/nfp_common.c:769
error: while searching for:
	uint32_t update;
	int ret;

	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS))
		return -EINVAL;

	ret = nfp_net_rss_reta_write(dev, reta_conf, reta_size);

error: patch failed: drivers/net/nfp/nfp_common.c:1080
error: while searching for:

	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);

	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS))
		return -EINVAL;

	if (reta_size != NFP_NET_CFG_RSS_ITBL_SZ) {

error: patch failed: drivers/net/nfp/nfp_common.c:1108
error: while searching for:
	rss_hf = rss_conf->rss_hf;

	/* Checking if RSS is enabled */
	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS)) {
		if (rss_hf != 0) { /* Enable RSS? */
			PMD_DRV_LOG(ERR, "RSS unsupported");
			return -EINVAL;

error: patch failed: drivers/net/nfp/nfp_common.c:1206
error: while searching for:

	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);

	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS))
		return -EINVAL;

	rss_hf = rss_conf->rss_hf;

error: patch failed: drivers/net/nfp/nfp_common.c:1241
Checking patch drivers/net/nfp/nfp_ctrl.h...
error: while searching for:
#define NFP_NET_CFG_MACADDR             0x0024

#define NFP_NET_CFG_CTRL_LSO_ANY (NFP_NET_CFG_CTRL_LSO | NFP_NET_CFG_CTRL_LSO2)

/*
 * Read-only words (0x0030 - 0x0050):

error: patch failed: drivers/net/nfp/nfp_ctrl.h:119
Checking patch drivers/net/nfp/nfp_ethdev.c...
error: drivers/net/nfp/nfp_ethdev.c: does not match index
Checking patch drivers/net/nfp/nfp_ethdev_vf.c...
error: drivers/net/nfp/nfp_ethdev_vf.c: does not match index
Checking patch drivers/net/nfp/nfp_rxtx.c...
error: drivers/net/nfp/nfp_rxtx.c: does not match index
Applying patch drivers/net/nfp/nfp_common.c with 6 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Applying patch drivers/net/nfp/nfp_ctrl.h with 1 reject...
Rejected hunk #1.
diff a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c	(rejected hunks)
@@ -171,7 +171,7 @@ nfp_net_configure(struct rte_eth_dev *dev)
 
 	/* Checking RX mode */
 	if (rxmode->mq_mode & RTE_ETH_MQ_RX_RSS &&
-	    !(hw->cap & NFP_NET_CFG_CTRL_RSS)) {
+	    !(hw->cap & NFP_NET_CFG_CTRL_RSS_ANY)) {
 		PMD_INIT_LOG(INFO, "RSS not supported");
 		return -EINVAL;
 	}
@@ -769,7 +769,7 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		.nb_mtu_seg_max = NFP_TX_MAX_MTU_SEG,
 	};
 
-	if (hw->cap & NFP_NET_CFG_CTRL_RSS) {
+	if (hw->cap & NFP_NET_CFG_CTRL_RSS_ANY) {
 		dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
 
 		dev_info->flow_type_rss_offloads = RTE_ETH_RSS_IPV4 |
@@ -1080,7 +1080,7 @@ nfp_net_reta_update(struct rte_eth_dev *dev,
 	uint32_t update;
 	int ret;
 
-	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS))
+	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS_ANY))
 		return -EINVAL;
 
 	ret = nfp_net_rss_reta_write(dev, reta_conf, reta_size);
@@ -1108,7 +1108,7 @@ nfp_net_reta_query(struct rte_eth_dev *dev,
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS))
+	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS_ANY))
 		return -EINVAL;
 
 	if (reta_size != NFP_NET_CFG_RSS_ITBL_SZ) {
@@ -1206,7 +1206,7 @@ nfp_net_rss_hash_update(struct rte_eth_dev *dev,
 	rss_hf = rss_conf->rss_hf;
 
 	/* Checking if RSS is enabled */
-	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS)) {
+	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS_ANY)) {
 		if (rss_hf != 0) { /* Enable RSS? */
 			PMD_DRV_LOG(ERR, "RSS unsupported");
 			return -EINVAL;
@@ -1241,7 +1241,7 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS))
+	if (!(hw->ctrl & NFP_NET_CFG_CTRL_RSS_ANY))
 		return -EINVAL;
 
 	rss_hf = rss_conf->rss_hf;
diff a/drivers/net/nfp/nfp_ctrl.h b/drivers/net/nfp/nfp_ctrl.h	(rejected hunks)
@@ -119,6 +119,7 @@
 #define NFP_NET_CFG_MACADDR             0x0024
 
 #define NFP_NET_CFG_CTRL_LSO_ANY (NFP_NET_CFG_CTRL_LSO | NFP_NET_CFG_CTRL_LSO2)
+#define NFP_NET_CFG_CTRL_RSS_ANY (NFP_NET_CFG_CTRL_RSS | NFP_NET_CFG_CTRL_RSS2)
 
 /*
  * Read-only words (0x0030 - 0x0050):

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

UNH-IOL DPDK Community Lab

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

only message in thread, other threads:[~2022-06-23  2:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23  2:50 |WARNING| pw113282-113294 [PATCH] [v4, 13/13] net/nfp: modify RSS logic 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).