get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/71393/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 71393,
    "url": "http://patches.dpdk.org/api/patches/71393/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200612132934.16488-2-somnath.kotur@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200612132934.16488-2-somnath.kotur@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200612132934.16488-2-somnath.kotur@broadcom.com",
    "date": "2020-06-12T13:28:45",
    "name": "[01/50] net/bnxt: Basic infrastructure support for VF representors",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "db2f8ee85e958cfbbbcc4efcce6ad7d53c1bfb90",
    "submitter": {
        "id": 908,
        "url": "http://patches.dpdk.org/api/people/908/?format=api",
        "name": "Somnath Kotur",
        "email": "somnath.kotur@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200612132934.16488-2-somnath.kotur@broadcom.com/mbox/",
    "series": [
        {
            "id": 10436,
            "url": "http://patches.dpdk.org/api/series/10436/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10436",
            "date": "2020-06-12T13:28:44",
            "name": "add features for host-based flow management",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/10436/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/71393/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/71393/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6A8ACA00BE;\n\tFri, 12 Jun 2020 15:34:19 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B0DE01BEC0;\n\tFri, 12 Jun 2020 15:34:06 +0200 (CEST)",
            "from relay.smtp.broadcom.com (unknown [192.19.232.149])\n by dpdk.org (Postfix) with ESMTP id 28C811BE9E\n for <dev@dpdk.org>; Fri, 12 Jun 2020 15:34:05 +0200 (CEST)",
            "from dhcp-10-123-153-55.dhcp.broadcom.net\n (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55])\n by relay.smtp.broadcom.com (Postfix) with ESMTP id AD1A51BD7DD;\n Fri, 12 Jun 2020 06:34:03 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com AD1A51BD7DD",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1591968844;\n bh=4m8T5CkTQoGyFjS9e8KyLqbRF30fAQBWm3bf/O54Jek=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=Dfl3PXB3/BJ39431+9ZsMjLbF6DCjVKCZs3bMem3e8RW6hZ78StMNdKKHTDBXfgkc\n Q51c0Mnk+cWqKulKBMp622QF2Hb521xhqHcLwmjCGlzZhbwAWr3QdSyUWaE0vwvyzR\n 0Ur0aq0kaBeHWzwjLdE7pksKjxahubO7YxEeT3Cs=",
        "From": "Somnath Kotur <somnath.kotur@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com",
        "Date": "Fri, 12 Jun 2020 18:58:45 +0530",
        "Message-Id": "<20200612132934.16488-2-somnath.kotur@broadcom.com>",
        "X-Mailer": "git-send-email 2.10.1.613.g2cc2e70",
        "In-Reply-To": "<20200612132934.16488-1-somnath.kotur@broadcom.com>",
        "References": "<20200612132934.16488-1-somnath.kotur@broadcom.com>",
        "Subject": "[dpdk-dev] [PATCH 01/50] net/bnxt: Basic infrastructure support for\n\tVF representors",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Defines data structures and code to init/uninit\nVF representors during pci_probe and pci_remove\nrespectively.\nMost of the dev_ops for the VF representor are just\nstubs for now and will be will be filled out in next patch.\n\nTo create a representor using testpmd:\ntestpmd -c 0xff -wB:D.F,representor=1 -- -i\ntestpmd -c 0xff -w05:02.0,representor=[1] -- -i\n\nTo create a representor using ovs-dpdk:\n1. Firt add the trusted VF port to a bridge\novs-vsctl add-port ovsbr0 vf_rep1 -- set Interface vf_rep1 type=dpdk\noptions:dpdk-devargs=0000:06:02.0\n2. Add the representor port to the bridge\novs-vsctl add-port ovsbr0 vf_rep1 -- set Interface vf_rep1 type=dpdk\noptions:dpdk-devargs=0000:06:02.0,representor=1\n\nReviewed-by: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>\nSigned-off-by: Somnath Kotur <somnath.kotur@broadcom.com>\nSigned-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>\n---\n drivers/net/bnxt/Makefile      |   2 +\n drivers/net/bnxt/bnxt.h        |  64 ++++++++-\n drivers/net/bnxt/bnxt_ethdev.c | 225 +++++++++++++++++++++++++-------\n drivers/net/bnxt/bnxt_reps.c   | 287 +++++++++++++++++++++++++++++++++++++++++\n drivers/net/bnxt/bnxt_reps.h   |  35 +++++\n drivers/net/bnxt/meson.build   |   1 +\n 6 files changed, 566 insertions(+), 48 deletions(-)\n create mode 100644 drivers/net/bnxt/bnxt_reps.c\n create mode 100644 drivers/net/bnxt/bnxt_reps.h",
    "diff": "diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile\nindex a375299..3656274 100644\n--- a/drivers/net/bnxt/Makefile\n+++ b/drivers/net/bnxt/Makefile\n@@ -14,6 +14,7 @@ LIB = librte_pmd_bnxt.a\n EXPORT_MAP := rte_pmd_bnxt_version.map\n \n CFLAGS += -O3\n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += $(WERROR_FLAGS)\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\n LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs\n@@ -38,6 +39,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_txr.c\n SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_vnic.c\n SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_irq.c\n SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_util.c\n+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_reps.c\n SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c\n ifeq ($(CONFIG_RTE_ARCH_X86), y)\n SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c\ndiff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h\nindex d455f8d..9b7b87c 100644\n--- a/drivers/net/bnxt/bnxt.h\n+++ b/drivers/net/bnxt/bnxt.h\n@@ -220,6 +220,7 @@ struct bnxt_child_vf_info {\n struct bnxt_pf_info {\n #define BNXT_FIRST_PF_FID\t1\n #define BNXT_MAX_VFS(bp)\t((bp)->pf->max_vfs)\n+#define BNXT_MAX_VF_REPS\t64\n #define BNXT_TOTAL_VFS(bp)\t((bp)->pf->total_vfs)\n #define BNXT_FIRST_VF_FID\t128\n #define BNXT_PF_RINGS_USED(bp)\tbnxt_get_num_queues(bp)\n@@ -492,6 +493,10 @@ struct bnxt_mark_info {\n \tbool\t\tvalid;\n };\n \n+struct bnxt_rep_info {\n+\tstruct rte_eth_dev\t*vfr_eth_dev;\n+};\n+\n /* address space location of register */\n #define BNXT_FW_STATUS_REG_TYPE_MASK\t3\n /* register is located in PCIe config space */\n@@ -515,6 +520,40 @@ struct bnxt_mark_info {\n #define BNXT_FW_STATUS_HEALTHY\t\t0x8000\n #define BNXT_FW_STATUS_SHUTDOWN\t\t0x100000\n \n+#define BNXT_ETH_RSS_SUPPORT (\t\\\n+\tETH_RSS_IPV4 |\t\t\\\n+\tETH_RSS_NONFRAG_IPV4_TCP |\t\\\n+\tETH_RSS_NONFRAG_IPV4_UDP |\t\\\n+\tETH_RSS_IPV6 |\t\t\\\n+\tETH_RSS_NONFRAG_IPV6_TCP |\t\\\n+\tETH_RSS_NONFRAG_IPV6_UDP)\n+\n+#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_VLAN_INSERT | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_IPV4_CKSUM | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_TCP_CKSUM | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_UDP_CKSUM | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_TCP_TSO | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_GRE_TNL_TSO | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_IPIP_TNL_TSO | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_GENEVE_TNL_TSO | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_QINQ_INSERT | \\\n+\t\t\t\t     DEV_TX_OFFLOAD_MULTI_SEGS)\n+\n+#define BNXT_DEV_RX_OFFLOAD_SUPPORT (DEV_RX_OFFLOAD_VLAN_FILTER | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_VLAN_STRIP | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_IPV4_CKSUM | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_UDP_CKSUM | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_TCP_CKSUM | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_JUMBO_FRAME | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_KEEP_CRC | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_VLAN_EXTEND | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_TCP_LRO | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_SCATTER | \\\n+\t\t\t\t     DEV_RX_OFFLOAD_RSS_HASH)\n+\n #define BNXT_HWRM_SHORT_REQ_LEN\t\tsizeof(struct hwrm_short_input)\n \n struct bnxt_flow_stat_info {\n@@ -682,6 +721,9 @@ struct bnxt {\n #define BNXT_MAX_RINGS(bp) \\\n \t(RTE_MIN((((bp)->max_cp_rings - BNXT_NUM_ASYNC_CPR(bp)) / 2U), \\\n \t\t BNXT_MAX_TX_RINGS(bp)))\n+\n+#define BNXT_MAX_VF_REP_RINGS\t8\n+\n \tuint16_t\t\tmax_nq_rings;\n \tuint16_t\t\tmax_l2_ctx;\n \tuint16_t\t\tmax_rx_em_flows;\n@@ -711,7 +753,9 @@ struct bnxt {\n \n \tuint16_t\t\tfw_reset_min_msecs;\n \tuint16_t\t\tfw_reset_max_msecs;\n-\n+\tuint16_t\t\tswitch_domain_id;\n+\tuint16_t\t\tnum_reps;\n+\tstruct bnxt_rep_info\trep_info[BNXT_MAX_VF_REPS];\n \t/* Struct to hold adapter error recovery related info */\n \tstruct bnxt_error_recovery_info *recovery_info;\n #define BNXT_MARK_TABLE_SZ\t(sizeof(struct bnxt_mark_info)  * 64 * 1024)\n@@ -732,6 +776,18 @@ struct bnxt {\n \n #define BNXT_FC_TIMER\t1 /* Timer freq in Sec Flow Counters */\n \n+/**\n+ * Structure to store private data for each VF representor instance\n+ */\n+struct bnxt_vf_representor {\n+\tuint16_t switch_domain_id;\n+\tuint16_t vf_id;\n+\t/* Private data store of associated PF/Trusted VF */\n+\tstruct bnxt\t*parent_priv;\n+\tuint8_t\t\tmac_addr[RTE_ETHER_ADDR_LEN];\n+\tuint8_t\t\tdflt_mac_addr[RTE_ETHER_ADDR_LEN];\n+};\n+\n int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu);\n int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,\n \t\t     bool exp_link_status);\n@@ -744,7 +800,13 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp);\n \n bool is_bnxt_supported(struct rte_eth_dev *dev);\n bool bnxt_stratus_device(struct bnxt *bp);\n+void bnxt_print_link_info(struct rte_eth_dev *eth_dev);\n+uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp);\n+int bnxt_link_update_op(struct rte_eth_dev *eth_dev,\n+\t\t\tint wait_to_complete);\n+\n extern const struct rte_flow_ops bnxt_flow_ops;\n+\n #define bnxt_acquire_flow_lock(bp) \\\n \tpthread_mutex_lock(&(bp)->flow_lock)\n \ndiff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c\nindex 7022f6d..4911745 100644\n--- a/drivers/net/bnxt/bnxt_ethdev.c\n+++ b/drivers/net/bnxt/bnxt_ethdev.c\n@@ -18,6 +18,7 @@\n #include \"bnxt_filter.h\"\n #include \"bnxt_hwrm.h\"\n #include \"bnxt_irq.h\"\n+#include \"bnxt_reps.h\"\n #include \"bnxt_ring.h\"\n #include \"bnxt_rxq.h\"\n #include \"bnxt_rxr.h\"\n@@ -93,40 +94,6 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {\n \t{ .vendor_id = 0, /* sentinel */ },\n };\n \n-#define BNXT_ETH_RSS_SUPPORT (\t\\\n-\tETH_RSS_IPV4 |\t\t\\\n-\tETH_RSS_NONFRAG_IPV4_TCP |\t\\\n-\tETH_RSS_NONFRAG_IPV4_UDP |\t\\\n-\tETH_RSS_IPV6 |\t\t\\\n-\tETH_RSS_NONFRAG_IPV6_TCP |\t\\\n-\tETH_RSS_NONFRAG_IPV6_UDP)\n-\n-#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_VLAN_INSERT | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_IPV4_CKSUM | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_TCP_CKSUM | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_UDP_CKSUM | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_TCP_TSO | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_GRE_TNL_TSO | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_IPIP_TNL_TSO | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_GENEVE_TNL_TSO | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_QINQ_INSERT | \\\n-\t\t\t\t     DEV_TX_OFFLOAD_MULTI_SEGS)\n-\n-#define BNXT_DEV_RX_OFFLOAD_SUPPORT (DEV_RX_OFFLOAD_VLAN_FILTER | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_VLAN_STRIP | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_IPV4_CKSUM | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_UDP_CKSUM | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_TCP_CKSUM | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_JUMBO_FRAME | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_KEEP_CRC | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_VLAN_EXTEND | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_TCP_LRO | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_SCATTER | \\\n-\t\t\t\t     DEV_RX_OFFLOAD_RSS_HASH)\n-\n #define BNXT_DEVARG_TRUFLOW\t\"host-based-truflow\"\n #define BNXT_DEVARG_FLOW_XSTAT\t\"flow-xstat\"\n #define BNXT_DEVARG_MAX_NUM_KFLOWS  \"max-num-kflows\"\n@@ -163,7 +130,6 @@ static int bnxt_devarg_max_num_kflow_invalid(uint16_t max_num_kflows)\n }\n \n static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);\n-static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);\n static int bnxt_dev_uninit(struct rte_eth_dev *eth_dev);\n static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev);\n static int bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev);\n@@ -198,7 +164,7 @@ static uint16_t bnxt_rss_ctxts(const struct bnxt *bp)\n \t\t\t\t    BNXT_RSS_ENTRIES_PER_CTX_THOR;\n }\n \n-static uint16_t  bnxt_rss_hash_tbl_size(const struct bnxt *bp)\n+uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp)\n {\n \tif (!BNXT_CHIP_THOR(bp))\n \t\treturn HW_HASH_INDEX_SIZE;\n@@ -1047,7 +1013,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)\n \treturn -ENOSPC;\n }\n \n-static void bnxt_print_link_info(struct rte_eth_dev *eth_dev)\n+void bnxt_print_link_info(struct rte_eth_dev *eth_dev)\n {\n \tstruct rte_eth_link *link = &eth_dev->data->dev_link;\n \n@@ -1273,6 +1239,12 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev)\n \treturn 0;\n }\n \n+static void bnxt_free_switch_domain(struct bnxt *bp)\n+{\n+\tif (bp->switch_domain_id)\n+\t\trte_eth_switch_domain_free(bp->switch_domain_id);\n+}\n+\n /* Unload the driver, release resources */\n static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)\n {\n@@ -1341,6 +1313,8 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)\n \tif (eth_dev->data->dev_started)\n \t\tbnxt_dev_stop_op(eth_dev);\n \n+\tbnxt_free_switch_domain(bp);\n+\n \tbnxt_uninit_resources(bp, false);\n \n \tbnxt_free_leds_info(bp);\n@@ -1522,8 +1496,8 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,\n \treturn rc;\n }\n \n-static int bnxt_link_update_op(struct rte_eth_dev *eth_dev,\n-\t\t\t       int wait_to_complete)\n+int bnxt_link_update_op(struct rte_eth_dev *eth_dev,\n+\t\t\tint wait_to_complete)\n {\n \treturn bnxt_link_update(eth_dev, wait_to_complete, ETH_LINK_UP);\n }\n@@ -5477,8 +5451,26 @@ bnxt_parse_dev_args(struct bnxt *bp, struct rte_devargs *devargs)\n \trte_kvargs_free(kvlist);\n }\n \n+static int bnxt_alloc_switch_domain(struct bnxt *bp)\n+{\n+\tint rc = 0;\n+\n+\tif (BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp)) {\n+\t\trc = rte_eth_switch_domain_alloc(&bp->switch_domain_id);\n+\t\tif (rc)\n+\t\t\tPMD_DRV_LOG(ERR,\n+\t\t\t\t    \"Failed to alloc switch domain: %d\\n\", rc);\n+\t\telse\n+\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t    \"Switch domain allocated %d\\n\",\n+\t\t\t\t    bp->switch_domain_id);\n+\t}\n+\n+\treturn rc;\n+}\n+\n static int\n-bnxt_dev_init(struct rte_eth_dev *eth_dev)\n+bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)\n {\n \tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);\n \tstatic int version_printed;\n@@ -5557,6 +5549,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)\n \tif (rc)\n \t\tgoto error_free;\n \n+\tbnxt_alloc_switch_domain(bp);\n+\n \t/* Pass the information to the rte_eth_dev_close() that it should also\n \t * release the private port resources.\n \t */\n@@ -5689,25 +5683,162 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev)\n \treturn 0;\n }\n \n+static int bnxt_pci_remove_dev_with_reps(struct rte_eth_dev *eth_dev)\n+{\n+\tstruct bnxt *bp = eth_dev->data->dev_private;\n+\tstruct rte_eth_dev *vf_rep_eth_dev;\n+\tint ret = 0, i;\n+\n+\tif (!bp)\n+\t\treturn -EINVAL;\n+\n+\tfor (i = 0; i < bp->num_reps; i++) {\n+\t\tvf_rep_eth_dev = bp->rep_info[i].vfr_eth_dev;\n+\t\tif (!vf_rep_eth_dev)\n+\t\t\tcontinue;\n+\t\trte_eth_dev_destroy(vf_rep_eth_dev, bnxt_vf_representor_uninit);\n+\t}\n+\tret = rte_eth_dev_destroy(eth_dev, bnxt_dev_uninit);\n+\n+\treturn ret;\n+}\n+\n static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tstruct rte_pci_device *pci_dev)\n {\n-\treturn rte_eth_dev_pci_generic_probe(pci_dev, sizeof(struct bnxt),\n-\t\tbnxt_dev_init);\n+\tchar name[RTE_ETH_NAME_MAX_LEN];\n+\tstruct rte_eth_devargs eth_da = { .nb_representor_ports = 0 };\n+\tstruct rte_eth_dev *backing_eth_dev, *vf_rep_eth_dev;\n+\tuint16_t num_rep;\n+\tint i, ret = 0;\n+\tstruct bnxt *backing_bp;\n+\n+\tif (pci_dev->device.devargs) {\n+\t\tret = rte_eth_devargs_parse(pci_dev->device.devargs->args,\n+\t\t\t\t\t    &eth_da);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\tnum_rep = eth_da.nb_representor_ports;\n+\tPMD_DRV_LOG(DEBUG, \"nb_representor_ports = %d\\n\",\n+\t\t    num_rep);\n+\n+\t/* We could come here after first level of probe is already invoked\n+\t * as part of an application bringup(OVS-DPDK vswitchd), so first check\n+\t * for already allocated eth_dev for the backing device (PF/Trusted VF)\n+\t */\n+\tbacking_eth_dev = rte_eth_dev_allocated(pci_dev->device.name);\n+\tif (backing_eth_dev == NULL) {\n+\t\tret = rte_eth_dev_create(&pci_dev->device, pci_dev->device.name,\n+\t\t\t\t\t sizeof(struct bnxt),\n+\t\t\t\t\t eth_dev_pci_specific_init, pci_dev,\n+\t\t\t\t\t bnxt_dev_init, NULL);\n+\n+\t\tif (ret || !num_rep)\n+\t\t\treturn ret;\n+\t}\n+\n+\tif (num_rep > BNXT_MAX_VF_REPS) {\n+\t\tPMD_DRV_LOG(ERR, \"nb_representor_ports = %d > %d MAX VF REPS\\n\",\n+\t\t\t    eth_da.nb_representor_ports, BNXT_MAX_VF_REPS);\n+\t\tret = -EINVAL;\n+\t\treturn ret;\n+\t}\n+\n+\t/* probe representor ports now */\n+\tif (!backing_eth_dev)\n+\t\tbacking_eth_dev = rte_eth_dev_allocated(pci_dev->device.name);\n+\tif (backing_eth_dev == NULL) {\n+\t\tret = -ENODEV;\n+\t\treturn ret;\n+\t}\n+\tbacking_bp = backing_eth_dev->data->dev_private;\n+\n+\tif (!(BNXT_PF(backing_bp) || BNXT_VF_IS_TRUSTED(backing_bp))) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t    \"Not a PF or trusted VF. No Representor support\\n\");\n+\t\t/* Returning an error is not an option.\n+\t\t * Applications are not handling this correctly\n+\t\t */\n+\t\treturn ret;\n+\t}\n+\n+\tfor (i = 0; i < eth_da.nb_representor_ports; i++) {\n+\t\tstruct bnxt_vf_representor representor = {\n+\t\t\t.vf_id = eth_da.representor_ports[i],\n+\t\t\t.switch_domain_id = backing_bp->switch_domain_id,\n+\t\t\t.parent_priv = backing_bp\n+\t\t};\n+\n+\t\tif (representor.vf_id >= BNXT_MAX_VF_REPS) {\n+\t\t\tPMD_DRV_LOG(ERR, \"VF-Rep id %d >= %d MAX VF ID\\n\",\n+\t\t\t\t    representor.vf_id, BNXT_MAX_VF_REPS);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\t/* representor port net_bdf_port */\n+\t\tsnprintf(name, sizeof(name), \"net_%s_representor_%d\",\n+\t\t\t pci_dev->device.name, eth_da.representor_ports[i]);\n+\n+\t\tret = rte_eth_dev_create(&pci_dev->device, name,\n+\t\t\t\t\t sizeof(struct bnxt_vf_representor),\n+\t\t\t\t\t NULL, NULL,\n+\t\t\t\t\t bnxt_vf_representor_init,\n+\t\t\t\t\t &representor);\n+\n+\t\tif (!ret) {\n+\t\t\tvf_rep_eth_dev = rte_eth_dev_allocated(name);\n+\t\t\tif (!vf_rep_eth_dev) {\n+\t\t\t\tPMD_DRV_LOG(ERR, \"Failed to find the eth_dev\"\n+\t\t\t\t\t    \" for VF-Rep: %s.\", name);\n+\t\t\t\tbnxt_pci_remove_dev_with_reps(backing_eth_dev);\n+\t\t\t\tret = -ENODEV;\n+\t\t\t\treturn ret;\n+\t\t\t}\n+\t\t\tbacking_bp->rep_info[representor.vf_id].vfr_eth_dev =\n+\t\t\t\tvf_rep_eth_dev;\n+\t\t\tbacking_bp->num_reps++;\n+\t\t} else {\n+\t\t\tPMD_DRV_LOG(ERR, \"failed to create bnxt vf \"\n+\t\t\t\t    \"representor %s.\", name);\n+\t\t\tbnxt_pci_remove_dev_with_reps(backing_eth_dev);\n+\t\t}\n+\t}\n+\n+\treturn ret;\n }\n \n static int bnxt_pci_remove(struct rte_pci_device *pci_dev)\n {\n-\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n-\t\treturn rte_eth_dev_pci_generic_remove(pci_dev,\n-\t\t\t\tbnxt_dev_uninit);\n-\telse\n+\tstruct rte_eth_dev *eth_dev;\n+\n+\teth_dev = rte_eth_dev_allocated(pci_dev->device.name);\n+\tif (!eth_dev)\n+\t\treturn ENODEV; /* Invoked typically only by OVS-DPDK, by the\n+\t\t\t\t* time it comes here the eth_dev is already\n+\t\t\t\t* deleted by rte_eth_dev_close(), so returning\n+\t\t\t\t* +ve value will atleast help in proper cleanup\n+\t\t\t\t*/\n+\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n+\t\tif (eth_dev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR)\n+\t\t\treturn rte_eth_dev_destroy(eth_dev,\n+\t\t\t\t\t\t   bnxt_vf_representor_uninit);\n+\t\telse\n+\t\t\treturn rte_eth_dev_destroy(eth_dev,\n+\t\t\t\t\t\t   bnxt_dev_uninit);\n+\t} else {\n \t\treturn rte_eth_dev_pci_generic_remove(pci_dev, NULL);\n+\t}\n }\n \n static struct rte_pci_driver bnxt_rte_pmd = {\n \t.id_table = bnxt_pci_id_map,\n-\t.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,\n+\t.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |\n+\t\t\tRTE_PCI_DRV_PROBE_AGAIN, /* Needed in case of VF-REPs\n+\t\t\t\t\t\t  * and OVS-DPDK\n+\t\t\t\t\t\t  */\n \t.probe = bnxt_pci_probe,\n \t.remove = bnxt_pci_remove,\n };\ndiff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c\nnew file mode 100644\nindex 0000000..7033d62\n--- /dev/null\n+++ b/drivers/net/bnxt/bnxt_reps.c\n@@ -0,0 +1,287 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2014-2018 Broadcom\n+ * All rights reserved.\n+ */\n+\n+#include \"bnxt.h\"\n+#include \"bnxt_ring.h\"\n+#include \"bnxt_reps.h\"\n+#include \"hsi_struct_def_dpdk.h\"\n+\n+static const struct eth_dev_ops bnxt_vf_rep_dev_ops = {\n+\t.dev_infos_get = bnxt_vf_rep_dev_info_get_op,\n+\t.dev_configure = bnxt_vf_rep_dev_configure_op,\n+\t.dev_start = bnxt_vf_rep_dev_start_op,\n+\t.rx_queue_setup = bnxt_vf_rep_rx_queue_setup_op,\n+\t.tx_queue_setup = bnxt_vf_rep_tx_queue_setup_op,\n+\t.link_update = bnxt_vf_rep_link_update_op,\n+\t.dev_close = bnxt_vf_rep_dev_close_op,\n+\t.dev_stop = bnxt_vf_rep_dev_stop_op\n+};\n+\n+static uint16_t\n+bnxt_vf_rep_rx_burst(__rte_unused void *rx_queue,\n+\t\t     __rte_unused struct rte_mbuf **rx_pkts,\n+\t\t     __rte_unused uint16_t nb_pkts)\n+{\n+\treturn 0;\n+}\n+\n+static uint16_t\n+bnxt_vf_rep_tx_burst(__rte_unused void *tx_queue,\n+\t\t     __rte_unused struct rte_mbuf **tx_pkts,\n+\t\t     __rte_unused uint16_t nb_pkts)\n+{\n+\treturn 0;\n+}\n+\n+int bnxt_vf_representor_init(struct rte_eth_dev *eth_dev, void *params)\n+{\n+\tstruct bnxt_vf_representor *vf_rep_bp = eth_dev->data->dev_private;\n+\tstruct bnxt_vf_representor *rep_params =\n+\t\t\t\t (struct bnxt_vf_representor *)params;\n+\tstruct rte_eth_link *link;\n+\tstruct bnxt *parent_bp;\n+\n+\tvf_rep_bp->vf_id = rep_params->vf_id;\n+\tvf_rep_bp->switch_domain_id = rep_params->switch_domain_id;\n+\tvf_rep_bp->parent_priv = rep_params->parent_priv;\n+\n+\teth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;\n+\teth_dev->data->representor_id = rep_params->vf_id;\n+\n+\trte_eth_random_addr(vf_rep_bp->dflt_mac_addr);\n+\tmemcpy(vf_rep_bp->mac_addr, vf_rep_bp->dflt_mac_addr,\n+\t       sizeof(vf_rep_bp->mac_addr));\n+\teth_dev->data->mac_addrs =\n+\t\t(struct rte_ether_addr *)&vf_rep_bp->mac_addr;\n+\teth_dev->dev_ops = &bnxt_vf_rep_dev_ops;\n+\n+\t/* No data-path, but need stub Rx/Tx functions to avoid crash\n+\t * when testing with ovs-dpdk\n+\t */\n+\teth_dev->rx_pkt_burst = bnxt_vf_rep_rx_burst;\n+\teth_dev->tx_pkt_burst = bnxt_vf_rep_tx_burst;\n+\t/* Link state. Inherited from PF or trusted VF */\n+\tparent_bp = vf_rep_bp->parent_priv;\n+\tlink = &parent_bp->eth_dev->data->dev_link;\n+\n+\teth_dev->data->dev_link.link_speed = link->link_speed;\n+\teth_dev->data->dev_link.link_duplex = link->link_duplex;\n+\teth_dev->data->dev_link.link_status = link->link_status;\n+\teth_dev->data->dev_link.link_autoneg = link->link_autoneg;\n+\n+\tPMD_DRV_LOG(INFO, \"calling bnxt_print_link_info\\n\");\n+\tbnxt_print_link_info(eth_dev);\n+\n+\t/* Pass the information to the rte_eth_dev_close() that it should also\n+\t * release the private port resources.\n+\t */\n+\teth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;\n+\tPMD_DRV_LOG(INFO,\n+\t\t    \"Switch domain id %d: Representor Device %d init done\\n\",\n+\t\t    vf_rep_bp->switch_domain_id, vf_rep_bp->vf_id);\n+\n+\treturn 0;\n+}\n+\n+int bnxt_vf_representor_uninit(struct rte_eth_dev *eth_dev)\n+{\n+\tstruct bnxt *parent_bp;\n+\tstruct bnxt_vf_representor *rep =\n+\t\t(struct bnxt_vf_representor *)eth_dev->data->dev_private;\n+\n+\tuint16_t vf_id;\n+\n+\teth_dev->data->mac_addrs = NULL;\n+\n+\tparent_bp = rep->parent_priv;\n+\tif (parent_bp) {\n+\t\tparent_bp->num_reps--;\n+\t\tvf_id = rep->vf_id;\n+\t\tif (parent_bp->rep_info) {\n+\t\t\tmemset(&parent_bp->rep_info[vf_id], 0,\n+\t\t\t       sizeof(parent_bp->rep_info[vf_id]));\n+\t\t\t/* mark that this representor has been freed */\n+\t\t}\n+\t}\n+\teth_dev->dev_ops = NULL;\n+\treturn 0;\n+}\n+\n+int bnxt_vf_rep_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_compl)\n+{\n+\tstruct bnxt *parent_bp;\n+\tstruct bnxt_vf_representor *rep =\n+\t\t(struct bnxt_vf_representor *)eth_dev->data->dev_private;\n+\tstruct rte_eth_link *link;\n+\tint rc;\n+\n+\tparent_bp = rep->parent_priv;\n+\trc = bnxt_link_update_op(parent_bp->eth_dev, wait_to_compl);\n+\n+\t/* Link state. Inherited from PF or trusted VF */\n+\tlink = &parent_bp->eth_dev->data->dev_link;\n+\n+\teth_dev->data->dev_link.link_speed = link->link_speed;\n+\teth_dev->data->dev_link.link_duplex = link->link_duplex;\n+\teth_dev->data->dev_link.link_status = link->link_status;\n+\teth_dev->data->dev_link.link_autoneg = link->link_autoneg;\n+\tbnxt_print_link_info(eth_dev);\n+\n+\treturn rc;\n+}\n+\n+int bnxt_vf_rep_dev_start_op(struct rte_eth_dev *eth_dev)\n+{\n+\tbnxt_vf_rep_link_update_op(eth_dev, 1);\n+\n+\treturn 0;\n+}\n+\n+void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev)\n+{\n+\teth_dev = eth_dev;\n+}\n+\n+void bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev)\n+{\n+\tbnxt_vf_representor_uninit(eth_dev);\n+}\n+\n+int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,\n+\t\t\t\tstruct rte_eth_dev_info *dev_info)\n+{\n+\tstruct bnxt_vf_representor *rep_bp = eth_dev->data->dev_private;\n+\tstruct bnxt *parent_bp;\n+\tuint16_t max_vnics, i, j, vpool, vrxq;\n+\tunsigned int max_rx_rings;\n+\tint rc = 0;\n+\n+\t/* MAC Specifics */\n+\tparent_bp = rep_bp->parent_priv;\n+\tif (!parent_bp) {\n+\t\tPMD_DRV_LOG(ERR, \"Rep parent NULL!\\n\");\n+\t\treturn rc;\n+\t}\n+\tPMD_DRV_LOG(DEBUG, \"Representor dev_info_get_op\\n\");\n+\tdev_info->max_mac_addrs = parent_bp->max_l2_ctx;\n+\tdev_info->max_hash_mac_addrs = 0;\n+\n+\tmax_rx_rings = BNXT_MAX_VF_REP_RINGS;\n+\t/* For the sake of symmetry, max_rx_queues = max_tx_queues */\n+\tdev_info->max_rx_queues = max_rx_rings;\n+\tdev_info->max_tx_queues = max_rx_rings;\n+\tdev_info->reta_size = bnxt_rss_hash_tbl_size(parent_bp);\n+\tdev_info->hash_key_size = 40;\n+\tmax_vnics = parent_bp->max_vnics;\n+\n+\t/* MTU specifics */\n+\tdev_info->min_mtu = RTE_ETHER_MIN_MTU;\n+\tdev_info->max_mtu = BNXT_MAX_MTU;\n+\n+\t/* Fast path specifics */\n+\tdev_info->min_rx_bufsize = 1;\n+\tdev_info->max_rx_pktlen = BNXT_MAX_PKT_LEN;\n+\n+\tdev_info->rx_offload_capa = BNXT_DEV_RX_OFFLOAD_SUPPORT;\n+\tif (parent_bp->flags & BNXT_FLAG_PTP_SUPPORTED)\n+\t\tdev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;\n+\tdev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT;\n+\tdev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;\n+\n+\t/* *INDENT-OFF* */\n+\tdev_info->default_rxconf = (struct rte_eth_rxconf) {\n+\t\t.rx_thresh = {\n+\t\t\t.pthresh = 8,\n+\t\t\t.hthresh = 8,\n+\t\t\t.wthresh = 0,\n+\t\t},\n+\t\t.rx_free_thresh = 32,\n+\t\t/* If no descriptors available, pkts are dropped by default */\n+\t\t.rx_drop_en = 1,\n+\t};\n+\n+\tdev_info->default_txconf = (struct rte_eth_txconf) {\n+\t\t.tx_thresh = {\n+\t\t\t.pthresh = 32,\n+\t\t\t.hthresh = 0,\n+\t\t\t.wthresh = 0,\n+\t\t},\n+\t\t.tx_free_thresh = 32,\n+\t\t.tx_rs_thresh = 32,\n+\t};\n+\teth_dev->data->dev_conf.intr_conf.lsc = 1;\n+\n+\teth_dev->data->dev_conf.intr_conf.rxq = 1;\n+\tdev_info->rx_desc_lim.nb_min = BNXT_MIN_RING_DESC;\n+\tdev_info->rx_desc_lim.nb_max = BNXT_MAX_RX_RING_DESC;\n+\tdev_info->tx_desc_lim.nb_min = BNXT_MIN_RING_DESC;\n+\tdev_info->tx_desc_lim.nb_max = BNXT_MAX_TX_RING_DESC;\n+\n+\t/* *INDENT-ON* */\n+\n+\t/*\n+\t * TODO: default_rxconf, default_txconf, rx_desc_lim, and tx_desc_lim\n+\t *       need further investigation.\n+\t */\n+\n+\t/* VMDq resources */\n+\tvpool = 64; /* ETH_64_POOLS */\n+\tvrxq = 128; /* ETH_VMDQ_DCB_NUM_QUEUES */\n+\tfor (i = 0; i < 4; vpool >>= 1, i++) {\n+\t\tif (max_vnics > vpool) {\n+\t\t\tfor (j = 0; j < 5; vrxq >>= 1, j++) {\n+\t\t\t\tif (dev_info->max_rx_queues > vrxq) {\n+\t\t\t\t\tif (vpool > vrxq)\n+\t\t\t\t\t\tvpool = vrxq;\n+\t\t\t\t\tgoto found;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\t/* Not enough resources to support VMDq */\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\t/* Not enough resources to support VMDq */\n+\tvpool = 0;\n+\tvrxq = 0;\n+found:\n+\tdev_info->max_vmdq_pools = vpool;\n+\tdev_info->vmdq_queue_num = vrxq;\n+\n+\tdev_info->vmdq_pool_base = 0;\n+\tdev_info->vmdq_queue_base = 0;\n+\n+\treturn 0;\n+}\n+\n+int bnxt_vf_rep_dev_configure_op(__rte_unused struct rte_eth_dev *eth_dev)\n+{\n+\tPMD_DRV_LOG(DEBUG, \"Representor dev_configure_op\\n\");\n+\treturn 0;\n+}\n+\n+int bnxt_vf_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,\n+\t\t\t\t  __rte_unused uint16_t queue_idx,\n+\t\t\t\t  __rte_unused uint16_t nb_desc,\n+\t\t\t\t  __rte_unused unsigned int socket_id,\n+\t\t\t\t  __rte_unused const struct rte_eth_rxconf *\n+\t\t\t\t  rx_conf,\n+\t\t\t\t  __rte_unused struct rte_mempool *mp)\n+{\n+\teth_dev = eth_dev;\n+\n+\treturn 0;\n+}\n+\n+int bnxt_vf_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,\n+\t\t\t\t  __rte_unused uint16_t queue_idx,\n+\t\t\t\t  __rte_unused uint16_t nb_desc,\n+\t\t\t\t  __rte_unused unsigned int socket_id,\n+\t\t\t\t  __rte_unused const struct rte_eth_txconf *\n+\t\t\t\t  tx_conf)\n+{\n+\teth_dev = eth_dev;\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/net/bnxt/bnxt_reps.h b/drivers/net/bnxt/bnxt_reps.h\nnew file mode 100644\nindex 0000000..f4c033a\n--- /dev/null\n+++ b/drivers/net/bnxt/bnxt_reps.h\n@@ -0,0 +1,35 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2014-2018 Broadcom\n+ * All rights reserved.\n+ */\n+\n+#ifndef _BNXT_REPS_H_\n+#define _BNXT_REPS_H_\n+\n+#include <rte_malloc.h>\n+#include <rte_ethdev.h>\n+\n+int bnxt_vf_representor_init(struct rte_eth_dev *eth_dev, void *params);\n+int bnxt_vf_representor_uninit(struct rte_eth_dev *eth_dev);\n+int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,\n+\t\t\t\tstruct rte_eth_dev_info *dev_info);\n+int bnxt_vf_rep_dev_configure_op(struct rte_eth_dev *eth_dev);\n+\n+int bnxt_vf_rep_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_compl);\n+int bnxt_vf_rep_dev_start_op(struct rte_eth_dev *eth_dev);\n+int bnxt_vf_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,\n+\t\t\t\t  __rte_unused uint16_t queue_idx,\n+\t\t\t\t  __rte_unused uint16_t nb_desc,\n+\t\t\t\t  __rte_unused unsigned int socket_id,\n+\t\t\t\t  __rte_unused const struct rte_eth_rxconf *\n+\t\t\t\t  rx_conf,\n+\t\t\t\t  __rte_unused struct rte_mempool *mp);\n+int bnxt_vf_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,\n+\t\t\t\t  __rte_unused uint16_t queue_idx,\n+\t\t\t\t  __rte_unused uint16_t nb_desc,\n+\t\t\t\t  __rte_unused unsigned int socket_id,\n+\t\t\t\t  __rte_unused const struct rte_eth_txconf *\n+\t\t\t\t  tx_conf);\n+void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev);\n+void bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev);\n+#endif /* _BNXT_REPS_H_ */\ndiff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build\nindex 4306c60..5c7859c 100644\n--- a/drivers/net/bnxt/meson.build\n+++ b/drivers/net/bnxt/meson.build\n@@ -21,6 +21,7 @@ sources = files('bnxt_cpr.c',\n \t'bnxt_txr.c',\n \t'bnxt_util.c',\n \t'bnxt_vnic.c',\n+\t'bnxt_reps.c',\n \n \t'tf_core/tf_core.c',\n \t'tf_core/bitalloc.c',\n",
    "prefixes": [
        "01/50"
    ]
}