From: Harman Kalra <hkalra@marvell.com>
To: <jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
"Kiran Kumar K" <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>,
Anatoly Burakov <anatoly.burakov@intel.com>
Cc: <dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>
Subject: [PATCH 2/9] net/cnxk: probing representor ports
Date: Fri, 11 Aug 2023 22:04:12 +0530 [thread overview]
Message-ID: <20230811163419.165790-3-hkalra@marvell.com> (raw)
In-Reply-To: <20230811163419.165790-1-hkalra@marvell.com>
Basic skeleton for probing representor devices. If PF device is
passed with "representor" devargs, representor ports gets probed
as a separate ethdev device.
Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
doc/guides/nics/cnxk.rst | 39 +++++
drivers/net/cnxk/cn10k_ethdev.c | 4 +-
drivers/net/cnxk/cn9k_ethdev.c | 4 +-
drivers/net/cnxk/cnxk_ethdev.c | 42 ++++-
drivers/net/cnxk/cnxk_ethdev.h | 12 ++
drivers/net/cnxk/cnxk_rep.c | 262 ++++++++++++++++++++++++++++++++
drivers/net/cnxk/cnxk_rep.h | 51 +++++++
drivers/net/cnxk/cnxk_rep_ops.c | 112 ++++++++++++++
drivers/net/cnxk/meson.build | 2 +
9 files changed, 516 insertions(+), 12 deletions(-)
create mode 100644 drivers/net/cnxk/cnxk_rep.c
create mode 100644 drivers/net/cnxk/cnxk_rep.h
create mode 100644 drivers/net/cnxk/cnxk_rep_ops.c
diff --git a/doc/guides/nics/cnxk.rst b/doc/guides/nics/cnxk.rst
index 9229056f6f..dd14102efa 100644
--- a/doc/guides/nics/cnxk.rst
+++ b/doc/guides/nics/cnxk.rst
@@ -37,6 +37,8 @@ Features of the CNXK Ethdev PMD are:
- Inline IPsec processing support
- Ingress meter support
- Queue based priority flow control support
+- Virtual function representors
+- Represented port pattern matching and action
Prerequisites
-------------
@@ -581,6 +583,41 @@ Runtime Config Options for inline device
With the above configuration, driver would poll for soft expiry events every
1000 usec.
+Virtual Function Representors
+-----------------------------
+
+The CNXK driver supports port representor model by adding virtual ethernet
+ports providing a logical representation in DPDK for SR-IOV virtual function
+(VF) devices for control and monitoring.
+
+These port representor ethdev instances can be spawned on an as needed basis
+through configuration parameters passed to the driver of the underlying
+base device using devargs ``-a pci:dbdf,representor=[0]``
+
+.. note::
+
+ Base device is the PF whose VFs will be represented by these representors
+
+ Above devarg parameters can be provided as a range of representor device
+ ``-a pci:dbdf,representor=[0-3]`` or a single representor device on need
+ basis ``-a pci:dbdf,representor=[0]``
+
+In case of exception path (i.e. until the flow definition is offloaded to the
+hardware), packets transmitted by the VFs shall be received by these
+representor port, while packets transmitted by representor ports shall be
+received by respective VFs.
+
+On receiving the VF traffic via these representor ports, applications holding
+these representor ports can decide to offload the traffic flow into the HW.
+Henceforth the matching traffic shall be directly steered to the respective
+VFs without being received by the application.
+
+Current virtual representor port PMD supports following operations:
+
+- Get and clear VF statistics
+- Set mac address
+- Flow operations - create, validate, destroy, query, flush, dump
+
Debugging Options
-----------------
@@ -595,3 +632,5 @@ Debugging Options
+---+------------+-------------------------------------------------------+
| 2 | NPC | --log-level='pmd\.net.cnxk\.flow,8' |
+---+------------+-------------------------------------------------------+
+ | 3 | REP | --log-level='pmd\.net.cnxk\.rep,8' |
+ +---+------------+-------------------------------------------------------+
diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index 4c4acc7cf0..a6a4665af1 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -912,8 +912,8 @@ static const struct rte_pci_id cn10k_pci_nix_map[] = {
static struct rte_pci_driver cn10k_pci_nix = {
.id_table = cn10k_pci_nix_map,
- .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_NEED_IOVA_AS_VA |
- RTE_PCI_DRV_INTR_LSC,
+ .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_NEED_IOVA_AS_VA | RTE_PCI_DRV_INTR_LSC |
+ RTE_PCI_DRV_PROBE_AGAIN,
.probe = cn10k_nix_probe,
.remove = cn10k_nix_remove,
};
diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c
index bae4dda5e2..0448d7e219 100644
--- a/drivers/net/cnxk/cn9k_ethdev.c
+++ b/drivers/net/cnxk/cn9k_ethdev.c
@@ -834,8 +834,8 @@ static const struct rte_pci_id cn9k_pci_nix_map[] = {
static struct rte_pci_driver cn9k_pci_nix = {
.id_table = cn9k_pci_nix_map,
- .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_NEED_IOVA_AS_VA |
- RTE_PCI_DRV_INTR_LSC,
+ .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_NEED_IOVA_AS_VA | RTE_PCI_DRV_INTR_LSC |
+ RTE_PCI_DRV_PROBE_AGAIN,
.probe = cn9k_nix_probe,
.remove = cn9k_nix_remove,
};
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 4b98faa729..902e6df72d 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -2102,6 +2102,10 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset)
rte_free(eth_dev->data->mac_addrs);
eth_dev->data->mac_addrs = NULL;
+ /* Remove representor devices associated with PF */
+ if (dev->num_reps)
+ cnxk_rep_dev_remove(eth_dev);
+
rc = roc_nix_dev_fini(nix);
/* Can be freed later by PMD if NPA LF is in use */
if (rc == -EAGAIN) {
@@ -2180,18 +2184,40 @@ cnxk_nix_remove(struct rte_pci_device *pci_dev)
int
cnxk_nix_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
{
- int rc;
+ struct rte_eth_devargs eth_da = {.nb_representor_ports = 0};
+ struct rte_eth_dev *pf_ethdev;
+ uint16_t num_rep;
+ int rc = 0;
RTE_SET_USED(pci_drv);
- rc = rte_eth_dev_pci_generic_probe(pci_dev, sizeof(struct cnxk_eth_dev),
- cnxk_eth_dev_init);
+ if (pci_dev->device.devargs) {
+ rc = rte_eth_devargs_parse(pci_dev->device.devargs->args, ð_da);
+ if (rc)
+ return rc;
+ }
+
+ num_rep = eth_da.nb_representor_ports;
+ plt_rep_dbg("nb_representor_ports = %d\n", num_rep);
- /* On error on secondary, recheck if port exists in primary or
- * in mid of detach state.
+ /* This probing API may get invoked even after first level of probe is
+ * done, as part of an application bringup(OVS-DPDK vswitchd), checking
+ * if eth_dev is allocated for the PF device
*/
- if (rte_eal_process_type() != RTE_PROC_PRIMARY && rc)
- if (!rte_eth_dev_allocated(pci_dev->device.name))
- return 0;
+ pf_ethdev = rte_eth_dev_allocated(pci_dev->device.name);
+ if (pf_ethdev == NULL) {
+ rc = rte_eth_dev_pci_generic_probe(pci_dev, sizeof(struct cnxk_eth_dev),
+ cnxk_eth_dev_init);
+ if (rc || !num_rep)
+ return rc;
+
+ pf_ethdev = rte_eth_dev_allocated(pci_dev->device.name);
+ }
+
+ if (!num_rep)
+ return rc;
+
+ rc = cnxk_rep_dev_probe(pci_dev, pf_ethdev, ð_da);
+
return rc;
}
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index ed531fb277..3896db38e1 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -22,7 +22,9 @@
#include <rte_tm_driver.h>
#include "roc_api.h"
+
#include <cnxk_ethdev_dp.h>
+#include <cnxk_rep.h>
#define CNXK_ETH_DEV_PMD_VERSION "1.0"
@@ -307,6 +309,10 @@ struct cnxk_macsec_sess {
};
TAILQ_HEAD(cnxk_macsec_sess_list, cnxk_macsec_sess);
+struct cnxk_rep_info {
+ struct rte_eth_dev *rep_eth_dev;
+};
+
struct cnxk_eth_dev {
/* ROC NIX */
struct roc_nix nix;
@@ -414,6 +420,12 @@ struct cnxk_eth_dev {
/* MCS device */
struct cnxk_mcs_dev *mcs_dev;
struct cnxk_macsec_sess_list mcs_list;
+
+ /* Port representor fields */
+ uint16_t switch_domain_id;
+ uint16_t num_reps;
+ uint16_t rep_xport_vdev;
+ struct cnxk_rep_info *rep_info;
};
struct cnxk_eth_rxq_sp {
diff --git a/drivers/net/cnxk/cnxk_rep.c b/drivers/net/cnxk/cnxk_rep.c
new file mode 100644
index 0000000000..ebefc34ac8
--- /dev/null
+++ b/drivers/net/cnxk/cnxk_rep.c
@@ -0,0 +1,262 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2023 Marvell.
+ */
+#include <cnxk_rep.h>
+
+/* CNXK platform representor dev ops */
+struct eth_dev_ops cnxk_rep_dev_ops = {
+ .dev_infos_get = cnxk_rep_dev_info_get,
+ .dev_configure = cnxk_rep_dev_configure,
+ .dev_start = cnxk_rep_dev_start,
+ .rx_queue_setup = cnxk_rep_rx_queue_setup,
+ .rx_queue_release = cnxk_rep_rx_queue_release,
+ .tx_queue_setup = cnxk_rep_tx_queue_setup,
+ .tx_queue_release = cnxk_rep_tx_queue_release,
+ .link_update = cnxk_rep_link_update,
+ .dev_close = cnxk_rep_dev_close,
+ .dev_stop = cnxk_rep_dev_stop,
+ .stats_get = cnxk_rep_stats_get,
+ .stats_reset = cnxk_rep_stats_reset,
+ .flow_ops_get = cnxk_rep_flow_ops_get
+};
+
+int
+cnxk_rep_dev_uninit(struct rte_eth_dev *ethdev)
+{
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
+ plt_rep_dbg("Representor port:%d uninit", ethdev->data->port_id);
+ rte_free(ethdev->data->mac_addrs);
+ ethdev->data->mac_addrs = NULL;
+
+ return 0;
+}
+
+int
+cnxk_rep_dev_remove(struct rte_eth_dev *pf_ethdev)
+{
+ struct cnxk_eth_dev *pf_dev = cnxk_eth_pmd_priv(pf_ethdev);
+ int rc = 0;
+
+ rc = rte_eth_switch_domain_free(pf_dev->switch_domain_id);
+ if (rc)
+ plt_err("Failed to alloc switch domain: %d", rc);
+
+ return rc;
+}
+
+static int
+hotplug_rep_xport_vdev(struct cnxk_eth_dev *pf_dev)
+{
+ char rep_xport_devargs[] = CNXK_REP_XPORT_VDEV_DEVARGS;
+ char name[] = CNXK_REP_XPORT_VDEV_NAME;
+ uint16_t portid;
+ int rc = 0;
+
+ rc = rte_eth_dev_get_port_by_name(name, &portid);
+ if (rc != 0) {
+ if (rc == -ENODEV) {
+ /* rep_xport device should get added once during first PF probe */
+ rc = rte_eal_hotplug_add("vdev", name, rep_xport_devargs);
+ if (rc) {
+ plt_err("rep base hotplug failed %d", -rte_errno);
+ goto fail;
+ }
+
+ /* Get the portID of rep_xport port */
+ if (rte_eth_dev_get_port_by_name(name, &portid)) {
+ plt_err("cannot find added vdev %s", name);
+ goto free;
+ }
+ } else {
+ plt_err("cannot find added vdev %s", name);
+ goto free;
+ }
+ }
+
+ plt_rep_dbg("rep_xport vdev port %d, name %s", portid, name);
+ pf_dev->rep_xport_vdev = portid;
+
+ return 0;
+free:
+ rte_eal_hotplug_remove("vdev", name);
+fail:
+ return rc;
+}
+
+static int
+cnxk_init_rep_internal(struct cnxk_eth_dev *pf_dev)
+{
+ int rc;
+
+ if (pf_dev->rep_info)
+ return 0;
+
+ pf_dev->rep_info =
+ plt_zmalloc(sizeof(pf_dev->rep_info[0]) * CNXK_MAX_REP_PORTS, 0);
+ if (!pf_dev->rep_info) {
+ plt_err("Failed to alloc memory for rep info");
+ rc = -ENOMEM;
+ goto fail;
+ }
+
+ /* Allocate switch domain for this PF */
+ rc = rte_eth_switch_domain_alloc(&pf_dev->switch_domain_id);
+ if (rc) {
+ plt_err("Failed to alloc switch domain: %d", rc);
+ goto fail;
+ }
+
+ rc = hotplug_rep_xport_vdev(pf_dev);
+ if (rc) {
+ plt_err("Failed to hotplug representor base port, err %d", rc);
+ goto fail;
+ }
+
+ return 0;
+fail:
+ return rc;
+}
+
+static uint16_t
+cnxk_rep_tx_burst(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+{
+ PLT_SET_USED(tx_queue);
+ PLT_SET_USED(tx_pkts);
+ PLT_SET_USED(nb_pkts);
+
+ return 0;
+}
+
+static uint16_t
+cnxk_rep_rx_burst(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+{
+ PLT_SET_USED(rx_queue);
+ PLT_SET_USED(rx_pkts);
+ PLT_SET_USED(nb_pkts);
+
+ return 0;
+}
+
+static int
+cnxk_rep_dev_init(struct rte_eth_dev *eth_dev, void *params)
+{
+ struct cnxk_rep_dev *rep_dev = cnxk_rep_pmd_priv(eth_dev);
+ struct cnxk_rep_dev *rep_params = (struct cnxk_rep_dev *)params;
+ struct rte_eth_link *link;
+ struct cnxk_eth_dev *pf_dev;
+
+ rep_dev->vf_id = rep_params->vf_id;
+ rep_dev->switch_domain_id = rep_params->switch_domain_id;
+ rep_dev->parent_dev = rep_params->parent_dev;
+
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
+ eth_dev->data->representor_id = rep_params->vf_id;
+ eth_dev->data->backer_port_id = rep_params->parent_dev->data->port_id;
+
+ eth_dev->data->mac_addrs = plt_zmalloc(RTE_ETHER_ADDR_LEN, 0);
+ if (!eth_dev->data->mac_addrs) {
+ plt_err("Failed to allocate memory for mac addr");
+ return -ENOMEM;
+ }
+
+ rte_eth_random_addr(rep_dev->mac_addr);
+ memcpy(eth_dev->data->mac_addrs, rep_dev->mac_addr, RTE_ETHER_ADDR_LEN);
+
+ /* Set the device operations */
+ eth_dev->dev_ops = &cnxk_rep_dev_ops;
+
+ /* Rx/Tx functions stubs to avoid crashing */
+ eth_dev->rx_pkt_burst = cnxk_rep_rx_burst;
+ eth_dev->tx_pkt_burst = cnxk_rep_tx_burst;
+
+ /* Link state. Inherited from PF */
+ pf_dev = cnxk_eth_pmd_priv(rep_dev->parent_dev);
+ link = &pf_dev->eth_dev->data->dev_link;
+
+ eth_dev->data->dev_link.link_speed = link->link_speed;
+ eth_dev->data->dev_link.link_duplex = link->link_duplex;
+ eth_dev->data->dev_link.link_status = link->link_status;
+ eth_dev->data->dev_link.link_autoneg = link->link_autoneg;
+
+ return 0;
+}
+
+int
+cnxk_rep_dev_probe(struct rte_pci_device *pci_dev, struct rte_eth_dev *pf_ethdev,
+ struct rte_eth_devargs *eth_da)
+{
+ char name[RTE_ETH_NAME_MAX_LEN];
+ struct rte_eth_dev *rep_eth_dev;
+ struct cnxk_eth_dev *pf_dev;
+ uint16_t num_rep;
+ int i, rc;
+
+ /* Get the PF device */
+ pf_dev = cnxk_eth_pmd_priv(pf_ethdev);
+
+ /* Check the representor devargs */
+ if (eth_da->type == RTE_ETH_REPRESENTOR_NONE)
+ return 0;
+ if (eth_da->type != RTE_ETH_REPRESENTOR_VF) {
+ plt_err("unsupported representor type %d\n", eth_da->type);
+ return -ENOTSUP;
+ }
+ num_rep = eth_da->nb_representor_ports;
+ if (num_rep > CNXK_MAX_REP_PORTS) {
+ plt_err("nb_representor_ports = %d > %d MAX VF REPS\n", num_rep,
+ CNXK_MAX_REP_PORTS);
+ return -EINVAL;
+ }
+
+ if (num_rep >= RTE_MAX_ETHPORTS) {
+ plt_err("nb_representor_ports = %d > %d MAX ETHPORTS\n", num_rep, RTE_MAX_ETHPORTS);
+ return -EINVAL;
+ }
+
+ /* Initialize the internals of representor ports */
+ if (cnxk_init_rep_internal(pf_dev))
+ return 0;
+
+ for (i = 0; i < num_rep; i++) {
+ struct cnxk_rep_dev representor = {.vf_id = eth_da->representor_ports[i],
+ .switch_domain_id = pf_dev->switch_domain_id,
+ .parent_dev = pf_ethdev};
+
+ if (representor.vf_id >= pci_dev->max_vfs) {
+ plt_err("VF-Rep id %d >= %d pci dev max vfs\n", representor.vf_id,
+ pci_dev->max_vfs);
+ continue;
+ }
+
+ /* Representor port net_bdf_port */
+ snprintf(name, sizeof(name), "net_%s_representor_%d", pci_dev->device.name,
+ eth_da->representor_ports[i]);
+
+ rc = rte_eth_dev_create(&pci_dev->device, name, sizeof(struct cnxk_rep_dev), NULL,
+ NULL, cnxk_rep_dev_init, &representor);
+ if (rc) {
+ plt_err("failed to create cnxk vf representor %s", name);
+ rc = -EINVAL;
+ goto err;
+ }
+
+ rep_eth_dev = rte_eth_dev_allocated(name);
+ if (!rep_eth_dev) {
+ plt_err("Failed to find the eth_dev for VF-Rep: %s.", name);
+ rc = -ENODEV;
+ goto err;
+ }
+
+ plt_rep_dbg("PF portid %d switch domain %d representor portid %d (%s) probe done",
+ pf_ethdev->data->port_id, pf_dev->switch_domain_id,
+ rep_eth_dev->data->port_id, name);
+ pf_dev->rep_info[representor.vf_id].rep_eth_dev = rep_eth_dev;
+ pf_dev->num_reps++;
+ }
+
+ return 0;
+err:
+ return rc;
+}
diff --git a/drivers/net/cnxk/cnxk_rep.h b/drivers/net/cnxk/cnxk_rep.h
new file mode 100644
index 0000000000..24adb9649b
--- /dev/null
+++ b/drivers/net/cnxk/cnxk_rep.h
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2023 Marvell.
+ */
+#include <cnxk_ethdev.h>
+
+#ifndef __CNXK_REP_H__
+#define __CNXK_REP_H__
+
+#define CNXK_REP_XPORT_VDEV_DEVARGS "role=server"
+#define CNXK_REP_XPORT_VDEV_NAME "net_memif"
+#define CNXK_MAX_REP_PORTS 128
+
+/* Common ethdev ops */
+extern struct eth_dev_ops cnxk_rep_dev_ops;
+
+struct cnxk_rep_dev {
+ uint16_t vf_id;
+ uint16_t switch_domain_id;
+ struct rte_eth_dev *parent_dev;
+ uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
+};
+
+static inline struct cnxk_rep_dev *
+cnxk_rep_pmd_priv(const struct rte_eth_dev *eth_dev)
+{
+ return eth_dev->data->dev_private;
+}
+
+int cnxk_rep_dev_probe(struct rte_pci_device *pci_dev, struct rte_eth_dev *pf_ethdev,
+ struct rte_eth_devargs *eth_da);
+int cnxk_rep_dev_remove(struct rte_eth_dev *pf_ethdev);
+int cnxk_rep_dev_uninit(struct rte_eth_dev *ethdev);
+int cnxk_rep_dev_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *dev_info);
+int cnxk_rep_dev_configure(struct rte_eth_dev *eth_dev);
+
+int cnxk_rep_link_update(struct rte_eth_dev *eth_dev, int wait_to_compl);
+int cnxk_rep_dev_start(struct rte_eth_dev *eth_dev);
+int cnxk_rep_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t queue_idx, uint16_t nb_desc,
+ unsigned int socket_id, const struct rte_eth_rxconf *rx_conf,
+ struct rte_mempool *mp);
+int cnxk_rep_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t queue_idx, uint16_t nb_desc,
+ unsigned int socket_id, const struct rte_eth_txconf *tx_conf);
+void cnxk_rep_rx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx);
+void cnxk_rep_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx);
+int cnxk_rep_dev_stop(struct rte_eth_dev *eth_dev);
+int cnxk_rep_dev_close(struct rte_eth_dev *eth_dev);
+int cnxk_rep_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *stats);
+int cnxk_rep_stats_reset(struct rte_eth_dev *eth_dev);
+int cnxk_rep_flow_ops_get(struct rte_eth_dev *ethdev, const struct rte_flow_ops **ops);
+
+#endif /* __CNXK_REP_H__ */
diff --git a/drivers/net/cnxk/cnxk_rep_ops.c b/drivers/net/cnxk/cnxk_rep_ops.c
new file mode 100644
index 0000000000..3f1aab077b
--- /dev/null
+++ b/drivers/net/cnxk/cnxk_rep_ops.c
@@ -0,0 +1,112 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2023 Marvell.
+ */
+
+#include <cnxk_rep.h>
+
+int
+cnxk_rep_link_update(struct rte_eth_dev *ethdev, int wait_to_complete)
+{
+ PLT_SET_USED(ethdev);
+ PLT_SET_USED(wait_to_complete);
+ return 0;
+}
+
+int
+cnxk_rep_dev_info_get(struct rte_eth_dev *ethdev, struct rte_eth_dev_info *devinfo)
+{
+ PLT_SET_USED(ethdev);
+ PLT_SET_USED(devinfo);
+ return 0;
+}
+
+int
+cnxk_rep_dev_configure(struct rte_eth_dev *ethdev)
+{
+ PLT_SET_USED(ethdev);
+ return 0;
+}
+
+int
+cnxk_rep_dev_start(struct rte_eth_dev *ethdev)
+{
+ PLT_SET_USED(ethdev);
+ return 0;
+}
+
+int
+cnxk_rep_dev_close(struct rte_eth_dev *ethdev)
+{
+ PLT_SET_USED(ethdev);
+ return 0;
+}
+
+int
+cnxk_rep_dev_stop(struct rte_eth_dev *ethdev)
+{
+ PLT_SET_USED(ethdev);
+ return 0;
+}
+
+int
+cnxk_rep_rx_queue_setup(struct rte_eth_dev *ethdev, uint16_t rx_queue_id, uint16_t nb_rx_desc,
+ unsigned int socket_id, const struct rte_eth_rxconf *rx_conf,
+ struct rte_mempool *mb_pool)
+{
+ PLT_SET_USED(ethdev);
+ PLT_SET_USED(rx_queue_id);
+ PLT_SET_USED(nb_rx_desc);
+ PLT_SET_USED(socket_id);
+ PLT_SET_USED(rx_conf);
+ PLT_SET_USED(mb_pool);
+ return 0;
+}
+
+void
+cnxk_rep_rx_queue_release(struct rte_eth_dev *ethdev, uint16_t queue_id)
+{
+ PLT_SET_USED(ethdev);
+ PLT_SET_USED(queue_id);
+}
+
+int
+cnxk_rep_tx_queue_setup(struct rte_eth_dev *ethdev, uint16_t tx_queue_id, uint16_t nb_tx_desc,
+ unsigned int socket_id, const struct rte_eth_txconf *tx_conf)
+{
+ PLT_SET_USED(ethdev);
+ PLT_SET_USED(tx_queue_id);
+ PLT_SET_USED(nb_tx_desc);
+ PLT_SET_USED(socket_id);
+ PLT_SET_USED(tx_conf);
+ return 0;
+}
+
+void
+cnxk_rep_tx_queue_release(struct rte_eth_dev *ethdev, uint16_t queue_id)
+{
+ PLT_SET_USED(ethdev);
+ PLT_SET_USED(queue_id);
+}
+
+int
+cnxk_rep_stats_get(struct rte_eth_dev *ethdev, struct rte_eth_stats *stats)
+{
+ PLT_SET_USED(ethdev);
+ PLT_SET_USED(stats);
+ return 0;
+}
+
+int
+cnxk_rep_stats_reset(struct rte_eth_dev *ethdev)
+{
+ PLT_SET_USED(ethdev);
+ return 0;
+}
+
+int
+cnxk_rep_flow_ops_get(struct rte_eth_dev *ethdev, const struct rte_flow_ops **ops)
+{
+ PLT_SET_USED(ethdev);
+ PLT_SET_USED(ops);
+ return 0;
+}
diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build
index e83f3c9050..38dde54ce9 100644
--- a/drivers/net/cnxk/meson.build
+++ b/drivers/net/cnxk/meson.build
@@ -32,6 +32,8 @@ sources = files(
'cnxk_lookup.c',
'cnxk_ptp.c',
'cnxk_flow.c',
+ 'cnxk_rep.c',
+ 'cnxk_rep_ops.c',
'cnxk_stats.c',
'cnxk_tm.c',
)
--
2.18.0
next prev parent reply other threads:[~2023-08-11 16:35 UTC|newest]
Thread overview: 142+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 16:34 [PATCH 0/9] net/cnxk: support for port representors Harman Kalra
2023-08-11 16:34 ` [PATCH 1/9] common/cnxk: debug log type for representors Harman Kalra
2023-08-11 16:34 ` Harman Kalra [this message]
2023-08-11 16:34 ` [PATCH 3/9] common/cnxk: maintaining representor state Harman Kalra
2023-08-11 16:34 ` [PATCH 4/9] net/cnxk: callbacks for " Harman Kalra
2023-08-11 16:34 ` [PATCH 5/9] net/cnxk: add representor control plane Harman Kalra
2023-08-11 16:34 ` [PATCH 6/9] net/cnxk: representor ethdev ops Harman Kalra
2023-08-11 16:34 ` [PATCH 7/9] net/cnxk: representor flow ops Harman Kalra
2023-08-11 16:34 ` [PATCH 8/9] common/cnxk: support represented port for cnxk Harman Kalra
2023-08-11 16:34 ` [PATCH 9/9] net/cnxk: add " Harman Kalra
2023-12-19 17:39 ` [PATCH v2 00/24] net/cnxk: support for port representors Harman Kalra
2023-12-19 17:39 ` [PATCH v2 01/24] common/cnxk: add support for representors Harman Kalra
2023-12-19 17:39 ` [PATCH v2 02/24] net/cnxk: implementing eswitch device Harman Kalra
2024-01-04 12:30 ` Jerin Jacob
2023-12-19 17:39 ` [PATCH v2 03/24] net/cnxk: eswitch HW resource configuration Harman Kalra
2024-01-04 12:34 ` Jerin Jacob
2023-12-19 17:39 ` [PATCH v2 04/24] net/cnxk: eswitch devargs parsing Harman Kalra
2023-12-19 17:39 ` [PATCH v2 05/24] net/cnxk: probing representor ports Harman Kalra
2023-12-19 17:39 ` [PATCH v2 06/24] common/cnxk: common NPC changes for eswitch Harman Kalra
2023-12-19 17:39 ` [PATCH v2 07/24] common/cnxk: interface to update VLAN TPID Harman Kalra
2024-01-04 12:47 ` Jerin Jacob
2023-12-19 17:39 ` [PATCH v2 08/24] net/cnxk: eswitch flow configurations Harman Kalra
2023-12-19 17:39 ` [PATCH v2 09/24] net/cnxk: eswitch fastpath routines Harman Kalra
2023-12-19 17:39 ` [PATCH v2 10/24] net/cnxk: add representor control plane Harman Kalra
2023-12-19 17:39 ` [PATCH v2 11/24] common/cnxk: representee notification callback Harman Kalra
2023-12-19 17:39 ` [PATCH v2 12/24] net/cnxk: handling representee notification Harman Kalra
2023-12-19 17:39 ` [PATCH v2 13/24] net/cnxk: representor ethdev ops Harman Kalra
2023-12-19 17:39 ` [PATCH v2 14/24] common/cnxk: get representees ethernet stats Harman Kalra
2023-12-19 17:39 ` [PATCH v2 15/24] net/cnxk: ethernet statistic for representor Harman Kalra
2023-12-19 17:39 ` [PATCH v2 16/24] common/cnxk: base support for eswitch VF Harman Kalra
2023-12-19 17:39 ` [PATCH v2 17/24] net/cnxk: eswitch VF as ethernet device Harman Kalra
2023-12-19 17:39 ` [PATCH v2 18/24] common/cnxk: support port representor and represented port Harman Kalra
2023-12-19 17:39 ` [PATCH v2 19/24] net/cnxk: add represented port pattern and action Harman Kalra
2023-12-19 17:39 ` [PATCH v2 20/24] net/cnxk: add port representor " Harman Kalra
2023-12-19 17:40 ` [PATCH v2 21/24] net/cnxk: generalize flow operation APIs Harman Kalra
2023-12-19 17:40 ` [PATCH v2 22/24] net/cnxk: flow create on representor ports Harman Kalra
2023-12-19 17:40 ` [PATCH v2 23/24] net/cnxk: other flow operations Harman Kalra
2023-12-19 17:40 ` [PATCH v2 24/24] doc: port representors in cnxk Harman Kalra
2023-12-20 9:37 ` Thomas Monjalon
2023-12-21 13:28 ` [EXT] " Harman Kalra
2023-12-21 18:33 ` Thomas Monjalon
2024-01-11 6:48 ` Harman Kalra
2024-02-01 13:07 ` [PATCH v3 00/23] net/cnxk: support for port representors Harman Kalra
2024-02-01 13:07 ` [PATCH v3 01/23] common/cnxk: add support for representors Harman Kalra
2024-02-01 13:07 ` [PATCH v3 02/23] net/cnxk: implementing eswitch device Harman Kalra
2024-02-01 13:07 ` [PATCH v3 03/23] net/cnxk: eswitch HW resource configuration Harman Kalra
2024-02-01 13:07 ` [PATCH v3 04/23] net/cnxk: eswitch devargs parsing Harman Kalra
2024-02-01 13:07 ` [PATCH v3 05/23] net/cnxk: probing representor ports Harman Kalra
2024-02-01 13:07 ` [PATCH v3 06/23] common/cnxk: common NPC changes for eswitch Harman Kalra
2024-02-01 13:07 ` [PATCH v3 07/23] common/cnxk: interface to update VLAN TPID Harman Kalra
2024-02-01 13:07 ` [PATCH v3 08/23] net/cnxk: eswitch flow configurations Harman Kalra
2024-02-01 13:07 ` [PATCH v3 09/23] net/cnxk: eswitch fastpath routines Harman Kalra
2024-02-01 13:07 ` [PATCH v3 10/23] net/cnxk: add representor control plane Harman Kalra
2024-02-01 13:07 ` [PATCH v3 11/23] common/cnxk: representee notification callback Harman Kalra
2024-02-01 13:07 ` [PATCH v3 12/23] net/cnxk: handling representee notification Harman Kalra
2024-02-01 13:07 ` [PATCH v3 13/23] net/cnxk: representor ethdev ops Harman Kalra
2024-02-01 13:07 ` [PATCH v3 14/23] common/cnxk: get representees ethernet stats Harman Kalra
2024-02-01 13:07 ` [PATCH v3 15/23] net/cnxk: ethernet statistic for representor Harman Kalra
2024-02-01 13:07 ` [PATCH v3 16/23] common/cnxk: base support for eswitch VF Harman Kalra
2024-02-01 13:07 ` [PATCH v3 17/23] net/cnxk: eswitch VF as ethernet device Harman Kalra
2024-02-01 13:07 ` [PATCH v3 18/23] common/cnxk: support port representor and represented port Harman Kalra
2024-02-01 13:07 ` [PATCH v3 19/23] net/cnxk: add represented port pattern and action Harman Kalra
2024-02-01 13:07 ` [PATCH v3 20/23] net/cnxk: add representor " Harman Kalra
2024-02-01 13:07 ` [PATCH v3 21/23] net/cnxk: generalise flow operation APIs Harman Kalra
2024-02-01 13:07 ` [PATCH v3 22/23] net/cnxk: flow create on representor ports Harman Kalra
2024-02-01 13:07 ` [PATCH v3 23/23] net/cnxk: other flow operations Harman Kalra
2024-02-27 19:15 ` [PATCH v4 00/23] net/cnxk: support for port representors Harman Kalra
2024-02-27 19:15 ` [PATCH v4 01/23] common/cnxk: add support for representors Harman Kalra
2024-02-27 19:15 ` [PATCH v4 02/23] net/cnxk: implementing eswitch device Harman Kalra
2024-03-01 9:31 ` Jerin Jacob
2024-02-27 19:15 ` [PATCH v4 03/23] net/cnxk: eswitch HW resource configuration Harman Kalra
2024-02-27 19:15 ` [PATCH v4 04/23] net/cnxk: eswitch devargs parsing Harman Kalra
2024-02-27 19:15 ` [PATCH v4 05/23] net/cnxk: probing representor ports Harman Kalra
2024-02-27 19:15 ` [PATCH v4 06/23] common/cnxk: common NPC changes for eswitch Harman Kalra
2024-02-27 19:15 ` [PATCH v4 07/23] common/cnxk: interface to update VLAN TPID Harman Kalra
2024-02-27 19:15 ` [PATCH v4 08/23] net/cnxk: eswitch flow configurations Harman Kalra
2024-02-27 19:15 ` [PATCH v4 09/23] net/cnxk: eswitch fastpath routines Harman Kalra
2024-02-27 19:15 ` [PATCH v4 10/23] net/cnxk: add representor control plane Harman Kalra
2024-02-27 19:15 ` [PATCH v4 11/23] common/cnxk: representee notification callback Harman Kalra
2024-02-27 19:15 ` [PATCH v4 12/23] net/cnxk: handling representee notification Harman Kalra
2024-02-27 19:15 ` [PATCH v4 13/23] net/cnxk: representor ethdev ops Harman Kalra
2024-02-27 19:15 ` [PATCH v4 14/23] common/cnxk: get representees ethernet stats Harman Kalra
2024-02-27 19:15 ` [PATCH v4 15/23] net/cnxk: ethernet statistics for representor Harman Kalra
2024-02-27 19:15 ` [PATCH v4 16/23] common/cnxk: base support for eswitch VF Harman Kalra
2024-02-27 19:15 ` [PATCH v4 17/23] net/cnxk: eswitch VF as ethernet device Harman Kalra
2024-02-27 19:15 ` [PATCH v4 18/23] common/cnxk: support port representor and represented port Harman Kalra
2024-02-27 19:15 ` [PATCH v4 19/23] net/cnxk: add represented port pattern and action Harman Kalra
2024-02-27 19:15 ` [PATCH v4 20/23] net/cnxk: add representor " Harman Kalra
2024-02-27 19:15 ` [PATCH v4 21/23] net/cnxk: generalise flow operation APIs Harman Kalra
2024-02-27 19:15 ` [PATCH v4 22/23] net/cnxk: flow create on representor ports Harman Kalra
2024-02-27 19:15 ` [PATCH v4 23/23] net/cnxk: other flow operations Harman Kalra
2024-03-01 9:35 ` Jerin Jacob
2024-03-01 19:14 ` [PATCH v5 00/23] net/cnxk: support for port representors Harman Kalra
2024-03-01 19:14 ` [PATCH v5 01/23] common/cnxk: add support for representors Harman Kalra
2024-03-01 19:14 ` [PATCH v5 02/23] net/cnxk: implementing eswitch device Harman Kalra
2024-03-01 19:14 ` [PATCH v5 03/23] net/cnxk: eswitch HW resource configuration Harman Kalra
2024-03-01 19:14 ` [PATCH v5 04/23] net/cnxk: eswitch devargs parsing Harman Kalra
2024-03-01 19:14 ` [PATCH v5 05/23] net/cnxk: probing representor ports Harman Kalra
2024-03-01 19:14 ` [PATCH v5 06/23] common/cnxk: common NPC changes for eswitch Harman Kalra
2024-03-01 19:14 ` [PATCH v5 07/23] common/cnxk: interface to update VLAN TPID Harman Kalra
2024-03-01 19:14 ` [PATCH v5 08/23] net/cnxk: eswitch flow configurations Harman Kalra
2024-03-01 19:14 ` [PATCH v5 09/23] net/cnxk: eswitch fastpath routines Harman Kalra
2024-03-01 19:14 ` [PATCH v5 10/23] net/cnxk: add representor control plane Harman Kalra
2024-03-01 19:14 ` [PATCH v5 11/23] common/cnxk: representee notification callback Harman Kalra
2024-03-01 19:14 ` [PATCH v5 12/23] net/cnxk: handling representee notification Harman Kalra
2024-03-01 19:14 ` [PATCH v5 13/23] net/cnxk: representor ethdev ops Harman Kalra
2024-03-01 19:14 ` [PATCH v5 14/23] common/cnxk: get representees ethernet stats Harman Kalra
2024-03-01 19:14 ` [PATCH v5 15/23] net/cnxk: ethernet statistics for representor Harman Kalra
2024-03-01 19:14 ` [PATCH v5 16/23] common/cnxk: base support for eswitch VF Harman Kalra
2024-03-01 19:14 ` [PATCH v5 17/23] net/cnxk: eswitch VF as ethernet device Harman Kalra
2024-03-01 19:14 ` [PATCH v5 18/23] common/cnxk: support port representor and represented port Harman Kalra
2024-03-01 19:14 ` [PATCH v5 19/23] net/cnxk: add represented port pattern and action Harman Kalra
2024-03-01 19:14 ` [PATCH v5 20/23] net/cnxk: add representor " Harman Kalra
2024-03-01 19:14 ` [PATCH v5 21/23] net/cnxk: generalise flow operation APIs Harman Kalra
2024-03-03 14:50 ` Jerin Jacob
2024-03-01 19:14 ` [PATCH v5 22/23] net/cnxk: flow create on representor ports Harman Kalra
2024-03-01 19:14 ` [PATCH v5 23/23] net/cnxk: other flow operations Harman Kalra
2024-03-03 17:38 ` [PATCH v6 00/23] net/cnxk: support for port representors Harman Kalra
2024-03-03 17:38 ` [PATCH v6 01/23] common/cnxk: add support for representors Harman Kalra
2024-03-03 17:38 ` [PATCH v6 02/23] net/cnxk: implementing eswitch device Harman Kalra
2024-03-03 17:38 ` [PATCH v6 03/23] net/cnxk: eswitch HW resource configuration Harman Kalra
2024-03-03 17:38 ` [PATCH v6 04/23] net/cnxk: eswitch devargs parsing Harman Kalra
2024-03-03 17:38 ` [PATCH v6 05/23] net/cnxk: probing representor ports Harman Kalra
2024-03-03 17:38 ` [PATCH v6 06/23] common/cnxk: common NPC changes for eswitch Harman Kalra
2024-03-03 17:38 ` [PATCH v6 07/23] common/cnxk: interface to update VLAN TPID Harman Kalra
2024-03-03 17:38 ` [PATCH v6 08/23] net/cnxk: eswitch flow configurations Harman Kalra
2024-03-03 17:38 ` [PATCH v6 09/23] net/cnxk: eswitch fastpath routines Harman Kalra
2024-03-03 17:38 ` [PATCH v6 10/23] net/cnxk: add representor control plane Harman Kalra
2024-03-03 17:38 ` [PATCH v6 11/23] common/cnxk: representee notification callback Harman Kalra
2024-03-03 17:38 ` [PATCH v6 12/23] net/cnxk: handling representee notification Harman Kalra
2024-03-03 17:38 ` [PATCH v6 13/23] net/cnxk: representor ethdev ops Harman Kalra
2024-03-03 17:38 ` [PATCH v6 14/23] common/cnxk: get representees ethernet stats Harman Kalra
2024-03-03 17:38 ` [PATCH v6 15/23] net/cnxk: ethernet statistics for representor Harman Kalra
2024-03-03 17:38 ` [PATCH v6 16/23] common/cnxk: base support for eswitch VF Harman Kalra
2024-03-03 17:38 ` [PATCH v6 17/23] net/cnxk: eswitch VF as ethernet device Harman Kalra
2024-03-03 17:38 ` [PATCH v6 18/23] common/cnxk: support port representor and represented port Harman Kalra
2024-03-03 17:38 ` [PATCH v6 19/23] net/cnxk: add represented port pattern and action Harman Kalra
2024-03-03 17:38 ` [PATCH v6 20/23] net/cnxk: add representor " Harman Kalra
2024-03-03 17:38 ` [PATCH v6 21/23] net/cnxk: generalise flow operation APIs Harman Kalra
2024-03-03 17:38 ` [PATCH v6 22/23] net/cnxk: flow create on representor ports Harman Kalra
2024-03-03 17:38 ` [PATCH v6 23/23] net/cnxk: other flow operations Harman Kalra
2024-03-04 7:57 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230811163419.165790-3-hkalra@marvell.com \
--to=hkalra@marvell.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).