get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 25005,
    "url": "http://patches.dpdk.org/api/patches/25005/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20170601170723.48709-21-ajit.khaparde@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": "<20170601170723.48709-21-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170601170723.48709-21-ajit.khaparde@broadcom.com",
    "date": "2017-06-01T17:07:17",
    "name": "[dpdk-dev,v4,20/26] net/bnxt: add support for set VF QOS and MAC anti spoof",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "494a10cec254698ecad68548d072ebfcfdd7bac0",
    "submitter": {
        "id": 501,
        "url": "http://patches.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20170601170723.48709-21-ajit.khaparde@broadcom.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/25005/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/25005/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 172A57D87;\n\tThu,  1 Jun 2017 19:08:34 +0200 (CEST)",
            "from rnd-relay.smtp.broadcom.com (lpdvrndsmtp01.broadcom.com\n\t[192.19.229.170]) by dpdk.org (Postfix) with ESMTP id D81F47CE1\n\tfor <dev@dpdk.org>; Thu,  1 Jun 2017 19:07:49 +0200 (CEST)",
            "from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net\n\t[10.75.224.233])\n\tby rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id B5EAA30C028;\n\tThu,  1 Jun 2017 10:07:48 -0700 (PDT)",
            "from C02PT1RBG8WP.wifi.broadcom.net (c02pt1rbg8wp.wifi.broadcom.net\n\t[10.45.51.51])\n\tby mail-irv-17.broadcom.com (Postfix) with ESMTP id 5832A81EB5;\n\tThu,  1 Jun 2017 10:07:48 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com B5EAA30C028",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n\ts=dkimrelay; t=1496336868;\n\tbh=Ruo7ontRZagpWC4lgCwd/0F3m5iHDSm7kiQ77siECPc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=QF0vPArw2r90Kn0mvvzURtAItPo7lIImv6dvV8qQ/cUxLiJ+hO1WOS+m5tK3+WoYr\n\tELX51Fvkn6zUQ0PSDKk2uxwtdfZwY9/fFSS7lZoUkqcGaJlBxixHVAgfVVgx3JcEXr\n\tuJcH5/qPZBVxBABU2sFRldCEgQspdS03LCEz6CUo=",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com",
        "Date": "Thu,  1 Jun 2017 12:07:17 -0500",
        "Message-Id": "<20170601170723.48709-21-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.10.1 (Apple Git-78)",
        "In-Reply-To": "<20170601170723.48709-1-ajit.khaparde@broadcom.com>",
        "References": "<20170601030232.38677-1-ajit.khaparde@broadcom.com>\n\t<20170601170723.48709-1-ajit.khaparde@broadcom.com>",
        "Subject": "[dpdk-dev] [PATCH v4 20/26] net/bnxt: add support for set VF QOS\n\tand MAC anti spoof",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch adds support to\n1) enable VF MAC anti spoof.\n2) QOS configuration for specified VF.\n\nSigned-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n--\nv1->v2: regroup related patches and incorporate other review comments\n\nv2->v3:\n  - Rebasing to next-net tree\n  - Use net/bnxt instead of just bnxt in patch subject\n  - Add a protection against application calling the API for different\n  vendor's port_id\n  - update testpmd to use these vendor specific APIs\n---\n app/test-pmd/cmdline.c                    |  24 ++-\n app/test-pmd/config.c                     |  20 ++-\n drivers/net/bnxt/bnxt.h                   |   4 +\n drivers/net/bnxt/bnxt_ethdev.c            |  12 +-\n drivers/net/bnxt/bnxt_filter.h            |   2 +\n drivers/net/bnxt/bnxt_hwrm.c              | 117 +++++++++++-\n drivers/net/bnxt/bnxt_hwrm.h              |  10 +-\n drivers/net/bnxt/rte_pmd_bnxt.c           | 289 ++++++++++++++++++++++++++++++\n drivers/net/bnxt/rte_pmd_bnxt.h           |  97 ++++++++++\n drivers/net/bnxt/rte_pmd_bnxt_version.map |   5 +\n 10 files changed, 564 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 26b0da1..90e4a27 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -6964,6 +6964,11 @@ cmd_vf_rx_vlan_filter_parsed(void *parsed_result,\n \t\tret = rte_pmd_i40e_set_vf_vlan_filter(res->port_id,\n \t\t\t\tres->vlan_id, res->vf_mask, is_add);\n #endif\n+#ifdef RTE_LIBRTE_BNXT_PMD\n+\tif (ret == -ENOTSUP)\n+\t\tret = rte_pmd_bnxt_set_vf_vlan_filter(res->port_id,\n+\t\t\t\tres->vlan_id, res->vf_mask, is_add);\n+#endif\n \n \tswitch (ret) {\n \tcase 0:\n@@ -7089,7 +7094,6 @@ cmdline_parse_inst_t cmd_queue_rate_limit = {\n \t},\n };\n \n-#ifdef RTE_LIBRTE_IXGBE_PMD\n /* *** SET RATE LIMIT FOR A VF OF A PORT *** */\n struct cmd_vf_rate_limit_result {\n \tcmdline_fixed_string_t set;\n@@ -7168,7 +7172,6 @@ cmdline_parse_inst_t cmd_vf_rate_limit = {\n \t\tNULL,\n \t},\n };\n-#endif\n \n /* *** ADD TUNNEL FILTER OF A PORT *** */\n struct cmd_tunnel_filter_result {\n@@ -11015,6 +11018,11 @@ cmd_set_vf_vlan_anti_spoof_parsed(\n \t\tret = rte_pmd_i40e_set_vf_vlan_anti_spoof(res->port_id,\n \t\t\t\tres->vf_id, is_on);\n #endif\n+#ifdef RTE_LIBRTE_BNXT_PMD\n+\tif (ret == -ENOTSUP)\n+\t\tret = rte_pmd_bnxt_set_vf_vlan_anti_spoof(res->port_id,\n+\t\t\t\tres->vf_id, is_on);\n+#endif\n \n \tswitch (ret) {\n \tcase 0:\n@@ -11116,6 +11124,11 @@ cmd_set_vf_mac_anti_spoof_parsed(\n \t\tret = rte_pmd_i40e_set_vf_mac_anti_spoof(res->port_id,\n \t\t\tres->vf_id, is_on);\n #endif\n+#ifdef RTE_LIBRTE_BNXT_PMD\n+\tif (ret == -ENOTSUP)\n+\t\tret = rte_pmd_bnxt_set_vf_mac_anti_spoof(res->port_id,\n+\t\t\tres->vf_id, is_on);\n+#endif\n \n \tswitch (ret) {\n \tcase 0:\n@@ -11217,6 +11230,11 @@ cmd_set_vf_vlan_stripq_parsed(\n \t\tret = rte_pmd_i40e_set_vf_vlan_stripq(res->port_id,\n \t\t\tres->vf_id, is_on);\n #endif\n+#ifdef RTE_LIBRTE_BNXT_PMD\n+\tif (ret == -ENOTSUP)\n+\t\tret = rte_pmd_bnxt_set_vf_vlan_stripq(res->port_id,\n+\t\t\tres->vf_id, is_on);\n+#endif\n \n \tswitch (ret) {\n \tcase 0:\n@@ -13752,8 +13770,8 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_set_macsec_sa,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_rxmode,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_traffic,\n-\t(cmdline_parse_inst_t *)&cmd_vf_rate_limit,\n #endif\n+\t(cmdline_parse_inst_t *)&cmd_vf_rate_limit,\n \t(cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_mac_addr,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_promisc,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 4d873cd..35eddc9 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -97,6 +97,9 @@\n #ifdef RTE_LIBRTE_IXGBE_PMD\n #include <rte_pmd_ixgbe.h>\n #endif\n+#ifdef RTE_LIBRTE_BNXT_PMD\n+#include <rte_pmd_bnxt.h>\n+#endif\n \n #include \"testpmd.h\"\n \n@@ -3053,20 +3056,27 @@ set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint16_t rate)\n \treturn diag;\n }\n \n-#ifdef RTE_LIBRTE_IXGBE_PMD\n int\n set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk)\n {\n-\tint diag;\n+\tint diag = -ENOTSUP;\n \n-\tdiag = rte_pmd_ixgbe_set_vf_rate_limit(port_id, vf, rate, q_msk);\n+#ifdef RTE_LIBRTE_IXGBE_PMD\n+\tif (diag == -ENOTSUP)\n+\t\tdiag = rte_pmd_ixgbe_set_vf_rate_limit(port_id, vf, rate,\n+\t\t\t\t\t\t       q_msk);\n+#endif\n+#ifdef RTE_LIBRTE_BNXT_PMD\n+\tif (diag == -ENOTSUP)\n+\t\tdiag = rte_pmd_bnxt_set_vf_rate_limit(port_id, vf, rate, q_msk);\n+#endif\n \tif (diag == 0)\n \t\treturn diag;\n-\tprintf(\"rte_pmd_ixgbe_set_vf_rate_limit for port_id=%d failed diag=%d\\n\",\n+\n+\tprintf(\"set_vf_rate_limit for port_id=%d failed diag=%d\\n\",\n \t\tport_id, diag);\n \treturn diag;\n }\n-#endif\n \n /*\n  * Functions to manage the set of filtered Multicast MAC addresses.\ndiff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h\nindex e918517..c1f9095 100644\n--- a/drivers/net/bnxt/bnxt.h\n+++ b/drivers/net/bnxt/bnxt.h\n@@ -104,6 +104,10 @@ struct bnxt_child_vf_info {\n \tuint32_t\t\tl2_rx_mask;\n \tuint16_t\t\tfid;\n \tuint16_t\t\tdflt_vlan;\n+\tuint16_t\t\tmax_tx_rate;\n+\tuint16_t\t\tvlan_count;\n+\tuint8_t\t\t\tmac_spoof_en;\n+\tuint8_t\t\t\tvlan_spoof_en;\n \tbool\t\t\trandom_mac;\n };\n \ndiff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c\nindex 57f9064..a710c41 100644\n--- a/drivers/net/bnxt/bnxt_ethdev.c\n+++ b/drivers/net/bnxt/bnxt_ethdev.c\n@@ -295,7 +295,7 @@ static int bnxt_init_chip(struct bnxt *bp)\n \t\telse\n \t\t\tbnxt_hwrm_vnic_tpa_cfg(bp, vnic, 0);\n \t}\n-\trc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0]);\n+\trc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL);\n \tif (rc) {\n \t\tRTE_LOG(ERR, PMD,\n \t\t\t\"HWRM cfa l2 rx mask failure rc: %x\\n\", rc);\n@@ -703,7 +703,7 @@ static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)\n \tvnic = &bp->vnic_info[0];\n \n \tvnic->flags |= BNXT_VNIC_INFO_PROMISC;\n-\tbnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic);\n+\tbnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL);\n }\n \n static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev)\n@@ -717,7 +717,7 @@ static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev)\n \tvnic = &bp->vnic_info[0];\n \n \tvnic->flags &= ~BNXT_VNIC_INFO_PROMISC;\n-\tbnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic);\n+\tbnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL);\n }\n \n static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev)\n@@ -731,7 +731,7 @@ static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev)\n \tvnic = &bp->vnic_info[0];\n \n \tvnic->flags |= BNXT_VNIC_INFO_ALLMULTI;\n-\tbnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic);\n+\tbnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL);\n }\n \n static void bnxt_allmulticast_disable_op(struct rte_eth_dev *eth_dev)\n@@ -745,7 +745,7 @@ static void bnxt_allmulticast_disable_op(struct rte_eth_dev *eth_dev)\n \tvnic = &bp->vnic_info[0];\n \n \tvnic->flags &= ~BNXT_VNIC_INFO_ALLMULTI;\n-\tbnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic);\n+\tbnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL);\n }\n \n static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev,\n@@ -1369,7 +1369,7 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,\n \tvnic->mc_addr_cnt = i;\n \n allmulti:\n-\treturn bnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic);\n+\treturn bnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL);\n }\n \n static int\ndiff --git a/drivers/net/bnxt/bnxt_filter.h b/drivers/net/bnxt/bnxt_filter.h\nindex 06fe134..353b7f7 100644\n--- a/drivers/net/bnxt/bnxt_filter.h\n+++ b/drivers/net/bnxt/bnxt_filter.h\n@@ -63,6 +63,8 @@ struct bnxt_filter_info {\n \tuint32_t\t\tvni;\n \tuint8_t\t\t\tpri_hint;\n \tuint64_t\t\tl2_filter_id_hint;\n+\tuint32_t\t\tsrc_id;\n+\tuint8_t\t\t\tsrc_type;\n };\n \n struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp);\ndiff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c\nindex 79c5ca8..f143541 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.c\n+++ b/drivers/net/bnxt/bnxt_hwrm.c\n@@ -213,7 +213,10 @@ int bnxt_hwrm_cfa_l2_clear_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic)\n \treturn rc;\n }\n \n-int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic)\n+int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,\n+\t\t\t\t struct bnxt_vnic_info *vnic,\n+\t\t\t\t uint16_t vlan_count,\n+\t\t\t\t struct bnxt_vlan_table_entry *vlan_table)\n {\n \tint rc = 0;\n \tstruct hwrm_cfa_l2_set_rx_mask_input req = {.req_type = 0 };\n@@ -237,6 +240,12 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic)\n \t}\n \treq.mask = rte_cpu_to_le_32(HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST |\n \t\t\t\t    mask);\n+\tif (vlan_count && vlan_table) {\n+\t\tmask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY;\n+\t\treq.vlan_tag_tbl_addr = rte_cpu_to_le_16(\n+\t\t\t rte_mem_virt2phy(vlan_table));\n+\t\treq.num_vlan_tags = rte_cpu_to_le_32((uint32_t)vlan_count);\n+\t}\n \n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req));\n \n@@ -296,6 +305,10 @@ int bnxt_hwrm_set_filter(struct bnxt *bp,\n \tif (enables &\n \t    HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK)\n \t\treq.l2_ovlan_mask = filter->l2_ovlan_mask;\n+\tif (enables & HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID)\n+\t\treq.src_id = rte_cpu_to_le_32(filter->src_id);\n+\tif (enables & HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE)\n+\t\treq.src_type = filter->src_type;\n \n \treq.enables = rte_cpu_to_le_32(enables);\n \n@@ -2230,6 +2243,21 @@ int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, uint16_t port,\n \treturn rc;\n }\n \n+int bnxt_hwrm_func_cfg_vf_set_flags(struct bnxt *bp, uint16_t vf)\n+{\n+\tstruct hwrm_func_cfg_output *resp = bp->hwrm_cmd_resp_addr;\n+\tstruct hwrm_func_cfg_input req = {0};\n+\tint rc;\n+\n+\tHWRM_PREP(req, FUNC_CFG, -1, resp);\n+\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.flags = rte_cpu_to_le_32(bp->pf.vf_info[vf].func_cfg_flags);\n+\trc = bnxt_hwrm_send_message(bp, &req, sizeof(req));\n+\tHWRM_CHECK_RESULT;\n+\n+\treturn rc;\n+}\n+\n int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp)\n {\n \tint rc = 0;\n@@ -2339,6 +2367,24 @@ int bnxt_hwrm_set_default_vlan(struct bnxt *bp, int vf, uint8_t is_vf)\n \treturn rc;\n }\n \n+int bnxt_hwrm_func_bw_cfg(struct bnxt *bp, uint16_t vf,\n+\t\t\tuint16_t max_bw, uint16_t enables)\n+{\n+\tstruct hwrm_func_cfg_output *resp = bp->hwrm_cmd_resp_addr;\n+\tstruct hwrm_func_cfg_input req = {0};\n+\tint rc;\n+\n+\tHWRM_PREP(req, FUNC_CFG, -1, resp);\n+\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.enables |= rte_cpu_to_le_32(enables);\n+\treq.flags = rte_cpu_to_le_32(bp->pf.vf_info[vf].func_cfg_flags);\n+\treq.max_bw = rte_cpu_to_le_32(max_bw);\n+\trc = bnxt_hwrm_send_message(bp, &req, sizeof(req));\n+\tHWRM_CHECK_RESULT;\n+\n+\treturn rc;\n+}\n+\n int bnxt_hwrm_reject_fwd_resp(struct bnxt *bp, uint16_t target_id,\n \t\t\t      void *encaped, size_t ec_size)\n {\n@@ -2629,3 +2675,72 @@ int bnxt_hwrm_func_vf_vnic_query_and_config(struct bnxt *bp, uint16_t vf,\n \n \treturn rc;\n }\n+\n+int bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(struct bnxt *bp, uint16_t vf,\n+\t\t\t\t\t      bool on)\n+{\n+\tstruct hwrm_func_cfg_output *resp = bp->hwrm_cmd_resp_addr;\n+\tstruct hwrm_func_cfg_input req = {0};\n+\tint rc;\n+\n+\tHWRM_PREP(req, FUNC_CFG, -1, resp);\n+\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.enables |= rte_cpu_to_le_32(\n+\t\t\tHWRM_FUNC_CFG_INPUT_ENABLES_VLAN_ANTISPOOF_MODE);\n+\treq.vlan_antispoof_mode = on ?\n+\t\tHWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_VALIDATE_VLAN :\n+\t\tHWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_NOCHECK;\n+\trc = bnxt_hwrm_send_message(bp, &req, sizeof(req));\n+\tHWRM_CHECK_RESULT;\n+\n+\treturn rc;\n+}\n+\n+int bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(struct bnxt *bp, int vf)\n+{\n+\tstruct bnxt_vnic_info vnic;\n+\tuint16_t *vnic_ids;\n+\tsize_t vnic_id_sz;\n+\tint num_vnic_ids, i;\n+\tsize_t sz;\n+\tint rc;\n+\n+\tvnic_id_sz = bp->pf.total_vnics * sizeof(*vnic_ids);\n+\tvnic_ids = rte_malloc(\"bnxt_hwrm_vf_vnic_ids_query\", vnic_id_sz,\n+\t\t\tRTE_CACHE_LINE_SIZE);\n+\tif (vnic_ids == NULL) {\n+\t\trc = -ENOMEM;\n+\t\treturn rc;\n+\t}\n+\n+\tfor (sz = 0; sz < vnic_id_sz; sz += getpagesize())\n+\t\trte_mem_lock_page(((char *)vnic_ids) + sz);\n+\n+\trc = bnxt_hwrm_func_vf_vnic_query(bp, vf, vnic_ids);\n+\tif (rc <= 0)\n+\t\tgoto exit;\n+\tnum_vnic_ids = rc;\n+\n+\t/*\n+\t * Loop through to find the default VNIC ID.\n+\t * TODO: The easier way would be to obtain the resp->dflt_vnic_id\n+\t * by sending the hwrm_func_qcfg command to the firmware.\n+\t */\n+\tfor (i = 0; i < num_vnic_ids; i++) {\n+\t\tmemset(&vnic, 0, sizeof(struct bnxt_vnic_info));\n+\t\tvnic.fw_vnic_id = rte_le_to_cpu_16(vnic_ids[i]);\n+\t\trc = bnxt_hwrm_vnic_qcfg(bp, &vnic,\n+\t\t\t\t\tbp->pf.first_vf_id + vf);\n+\t\tif (rc)\n+\t\t\tgoto exit;\n+\t\tif (vnic.func_default) {\n+\t\t\trte_free(vnic_ids);\n+\t\t\treturn vnic.fw_vnic_id;\n+\t\t}\n+\t}\n+\t/* Could not find a default VNIC. */\n+\tRTE_LOG(ERR, PMD, \"No default VNIC\\n\");\n+exit:\n+\trte_free(vnic_ids);\n+\treturn -1;\n+}\ndiff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h\nindex b79df9d..f51ebcf 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.h\n+++ b/drivers/net/bnxt/bnxt_hwrm.h\n@@ -45,7 +45,9 @@ struct bnxt_cp_ring_info;\n \n int bnxt_hwrm_cfa_l2_clear_rx_mask(struct bnxt *bp,\n \t\t\t\t   struct bnxt_vnic_info *vnic);\n-int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic);\n+int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic,\n+\t\t\t\t uint16_t vlan_count,\n+\t\t\t\t struct bnxt_vlan_table_entry *vlan_table);\n int bnxt_hwrm_clear_filter(struct bnxt *bp,\n \t\t\t   struct bnxt_filter_info *filter);\n int bnxt_hwrm_set_filter(struct bnxt *bp,\n@@ -121,6 +123,8 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs);\n int bnxt_hwrm_func_vf_mac(struct bnxt *bp, uint16_t vf,\n \t\t\t  const uint8_t *mac_addr);\n int bnxt_hwrm_pf_evb_mode(struct bnxt *bp);\n+int bnxt_hwrm_func_bw_cfg(struct bnxt *bp, uint16_t vf,\n+\t\t\tuint16_t max_bw, uint16_t enables);\n int bnxt_hwrm_func_qcfg_vf_default_mac(struct bnxt *bp, uint16_t vf,\n \t\t\t\t       struct ether_addr *mac);\n int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,\n@@ -133,7 +137,11 @@ int bnxt_hwrm_port_qstats(struct bnxt *bp);\n int bnxt_hwrm_port_clr_stats(struct bnxt *bp);\n int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on);\n int bnxt_hwrm_port_led_qcaps(struct bnxt *bp);\n+int bnxt_hwrm_func_cfg_vf_set_flags(struct bnxt *bp, uint16_t vf);\n int bnxt_hwrm_func_vf_vnic_query_and_config(struct bnxt *bp, uint16_t vf,\n \tvoid (*vnic_cb)(struct bnxt_vnic_info *, void *), void *cbdata,\n \tint (*hwrm_cb)(struct bnxt *bp, struct bnxt_vnic_info *vnic));\n+int bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(struct bnxt *bp, uint16_t vf,\n+\t\t\t\t\t      bool on);\n+int bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(struct bnxt *bp, int vf);\n #endif\ndiff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c\nindex 57a11a4..644a890 100644\n--- a/drivers/net/bnxt/rte_pmd_bnxt.c\n+++ b/drivers/net/bnxt/rte_pmd_bnxt.c\n@@ -33,6 +33,7 @@\n \n #include <inttypes.h>\n #include <stdbool.h>\n+#include <unistd.h>\n \n #include <rte_dev.h>\n #include <rte_ethdev.h>\n@@ -170,3 +171,291 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,\n \n \treturn rc;\n }\n+\n+int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,\n+\t\t\t\tuint16_t tx_rate, uint64_t q_msk)\n+{\n+\tstruct rte_eth_dev *eth_dev;\n+\tstruct rte_eth_dev_info dev_info;\n+\tstruct bnxt *bp;\n+\tuint16_t tot_rate = 0;\n+\tuint64_t idx;\n+\tint rc;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\teth_dev = &rte_eth_devices[port];\n+\tif (!is_bnxt_supported(eth_dev))\n+\t\treturn -ENOTSUP;\n+\n+\trte_eth_dev_info_get(port, &dev_info);\n+\tbp = (struct bnxt *)eth_dev->data->dev_private;\n+\n+\tif (!bp->pf.active_vfs)\n+\t\treturn -EINVAL;\n+\n+\tif (vf >= bp->pf.max_vfs)\n+\t\treturn -EINVAL;\n+\n+\t/* Add up the per queue BW and configure MAX BW of the VF */\n+\tfor (idx = 0; idx < 64; idx++) {\n+\t\tif ((1ULL << idx) & q_msk)\n+\t\t\ttot_rate += tx_rate;\n+\t}\n+\n+\t/* Requested BW can't be greater than link speed */\n+\tif (tot_rate > eth_dev->data->dev_link.link_speed) {\n+\t\tRTE_LOG(ERR, PMD, \"Rate > Link speed. Set to %d\\n\", tot_rate);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* Requested BW already configured */\n+\tif (tot_rate == bp->pf.vf_info[vf].max_tx_rate)\n+\t\treturn 0;\n+\n+\trc = bnxt_hwrm_func_bw_cfg(bp, vf, tot_rate,\n+\t\t\t\tHWRM_FUNC_CFG_INPUT_ENABLES_MAX_BW);\n+\n+\tif (!rc)\n+\t\tbp->pf.vf_info[vf].max_tx_rate = tot_rate;\n+\n+\treturn rc;\n+}\n+\n+int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)\n+{\n+\tstruct rte_eth_dev_info dev_info;\n+\tstruct rte_eth_dev *dev;\n+\tuint32_t func_flags;\n+\tstruct bnxt *bp;\n+\tint rc;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\tif (on > 1)\n+\t\treturn -EINVAL;\n+\n+\tdev = &rte_eth_devices[port];\n+\tif (!is_bnxt_supported(dev))\n+\t\treturn -ENOTSUP;\n+\n+\trte_eth_dev_info_get(port, &dev_info);\n+\tbp = (struct bnxt *)dev->data->dev_private;\n+\n+\tif (!BNXT_PF(bp)) {\n+\t\tRTE_LOG(ERR, PMD,\n+\t\t\t\"Attempt to set mac spoof on non-PF port %d!\\n\", port);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (vf >= dev_info.max_vfs)\n+\t\treturn -EINVAL;\n+\n+\t/* Prev setting same as new setting. */\n+\tif (on == bp->pf.vf_info[vf].mac_spoof_en)\n+\t\treturn 0;\n+\n+\tfunc_flags = bp->pf.vf_info[vf].func_cfg_flags;\n+\n+\tif (on)\n+\t\tfunc_flags |=\n+\t\t\tHWRM_FUNC_CFG_INPUT_FLAGS_SRC_MAC_ADDR_CHECK_ENABLE;\n+\telse\n+\t\tfunc_flags |=\n+\t\t\tHWRM_FUNC_CFG_INPUT_FLAGS_SRC_MAC_ADDR_CHECK_DISABLE;\n+\n+\tbp->pf.vf_info[vf].func_cfg_flags = func_flags;\n+\n+\trc = bnxt_hwrm_func_cfg_vf_set_flags(bp, vf);\n+\tif (!rc)\n+\t\tbp->pf.vf_info[vf].mac_spoof_en = on;\n+\n+\treturn rc;\n+}\n+\n+int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)\n+{\n+\tstruct rte_eth_dev_info dev_info;\n+\tstruct rte_eth_dev *dev;\n+\tstruct bnxt *bp;\n+\tint rc;\n+\tint dflt_vnic;\n+\tstruct bnxt_vnic_info vnic;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\tif (on > 1)\n+\t\treturn -EINVAL;\n+\n+\tdev = &rte_eth_devices[port];\n+\tif (!is_bnxt_supported(dev))\n+\t\treturn -ENOTSUP;\n+\n+\trte_eth_dev_info_get(port, &dev_info);\n+\tbp = (struct bnxt *)dev->data->dev_private;\n+\n+\tif (!BNXT_PF(bp)) {\n+\t\tRTE_LOG(ERR, PMD,\n+\t\t\t\"Attempt to set mac spoof on non-PF port %d!\\n\", port);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (vf >= dev_info.max_vfs)\n+\t\treturn -EINVAL;\n+\n+\trc = bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(bp, vf, on);\n+\tif (!rc) {\n+\t\tbp->pf.vf_info[vf].vlan_spoof_en = on;\n+\t\tif (on) {\n+\t\t\tdflt_vnic = bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(bp, vf);\n+\t\t\tif (dflt_vnic < 0) {\n+\t\t\t\t/*\n+\t\t\t\t * This simply indicates there's no driver\n+\t\t\t\t * loaded.  This is not an error.\n+\t\t\t\t */\n+\t\t\t\tRTE_LOG(ERR, PMD,\n+\t\t\t\t      \"Unable to get default VNIC for VF %d\\n\",\n+\t\t\t\t\tvf);\n+\t\t\t} else {\n+\t\t\t\tvnic.fw_vnic_id = dflt_vnic;\n+\t\t\t\tif (bnxt_hwrm_vnic_qcfg(bp,\n+\t\t\t\t\t&vnic, bp->pf.first_vf_id + vf) == 0) {\n+\t\t\t\t\tif (bnxt_hwrm_cfa_l2_set_rx_mask(bp,\n+\t\t\t\t\t   &vnic, bp->pf.vf_info[vf].vlan_count,\n+\t\t\t\t\t   bp->pf.vf_info[vf].vlan_table))\n+\t\t\t\t\t\trc = -1;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t} else {\n+\t\tRTE_LOG(ERR, PMD, \"Failed to update VF VNIC %d.\\n\", vf);\n+\t}\n+\n+\treturn rc;\n+}\n+\n+static void\n+rte_pmd_bnxt_set_vf_vlan_stripq_cb(struct bnxt_vnic_info *vnic, void *onptr)\n+{\n+\tuint8_t *on = onptr;\n+\tvnic->vlan_strip = *on;\n+}\n+\n+int\n+rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tstruct rte_eth_dev_info dev_info;\n+\tstruct bnxt *bp;\n+\tint rc;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port];\n+\tif (!is_bnxt_supported(dev))\n+\t\treturn -ENOTSUP;\n+\n+\trte_eth_dev_info_get(port, &dev_info);\n+\tbp = (struct bnxt *)dev->data->dev_private;\n+\n+\tif (vf >= dev_info.max_vfs)\n+\t\treturn -EINVAL;\n+\n+\tif (!BNXT_PF(bp)) {\n+\t\tRTE_LOG(ERR, PMD,\n+\t\t\t\"Attempt to set VF %d stripq on non-PF port %d!\\n\",\n+\t\t\tvf, port);\n+\t\treturn -ENOTSUP;\n+\t}\n+\n+\trc = bnxt_hwrm_func_vf_vnic_query_and_config(bp, vf,\n+\t\t\t\trte_pmd_bnxt_set_vf_vlan_stripq_cb, &on,\n+\t\t\t\tbnxt_hwrm_vnic_cfg);\n+\tif (rc)\n+\t\tRTE_LOG(ERR, PMD, \"Failed to update VF VNIC %d.\\n\", vf);\n+\n+\treturn rc;\n+}\n+\n+int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,\n+\t\t\t\t    uint64_t vf_mask, uint8_t vlan_on)\n+{\n+\tstruct bnxt_vlan_table_entry *ve;\n+\tstruct rte_eth_dev *dev;\n+\tstruct bnxt *bp;\n+\tuint16_t cnt;\n+\tint rc = 0;\n+\tint i, j;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port];\n+\tif (!is_bnxt_supported(dev))\n+\t\treturn -ENOTSUP;\n+\n+\tbp = (struct bnxt *)dev->data->dev_private;\n+\tif (!bp->pf.vf_info)\n+\t\treturn -EINVAL;\n+\n+\tfor (i = 0; vf_mask; i++, vf_mask >>= 1) {\n+\t\tcnt = bp->pf.vf_info[i].vlan_count;\n+\t\tif (vf_mask & 1) {\n+\t\t\tif (bp->pf.vf_info[i].vlan_table == NULL) {\n+\t\t\t\trc = -1;\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\t\t\tif (vlan_on) {\n+\t\t\t\t/* First, search for a duplicate... */\n+\t\t\t\tfor (j = 0; j < cnt; j++) {\n+\t\t\t\t\tif (rte_be_to_cpu_16(\n+\t\t\t\t\t bp->pf.vf_info[i].vlan_table[j].vid) ==\n+\t\t\t\t\t    vlan)\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t\tif (j == cnt) {\n+\t\t\t\t\t/* Now check that there's space */\n+\t\t\t\t\tif (cnt == getpagesize() /\n+\t\t\t\t\t sizeof(struct bnxt_vlan_table_entry)) {\n+\t\t\t\t\t\tRTE_LOG(ERR, PMD,\n+\t\t\t\t\t\t  \"VF %d VLAN table is full\\n\",\n+\t\t\t\t\t\t  i);\n+\t\t\t\t\t\tRTE_LOG(ERR, PMD,\n+\t\t\t\t\t\t\t\"cannot add VLAN %u\\n\",\n+\t\t\t\t\t\t\tvlan);\n+\t\t\t\t\t\trc = -1;\n+\t\t\t\t\t\tcontinue;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\tcnt = bp->pf.vf_info[i].vlan_count++;\n+\t\t\t\t\t/*\n+\t\t\t\t\t * And finally, add to the\n+\t\t\t\t\t * end of the table\n+\t\t\t\t\t */\n+\t\t\t\t\tve = &bp->pf.vf_info[i].vlan_table[cnt];\n+\t\t\t\t\t// TODO: Hardcoded TPID\n+\t\t\t\t\tve->tpid = rte_cpu_to_be_16(0x8100);\n+\t\t\t\t\tve->vid = rte_cpu_to_be_16(vlan);\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tfor (j = 0; cnt; j++) {\n+\t\t\t\t\tif (rte_be_to_cpu_16(\n+\t\t\t\t\tbp->pf.vf_info[i].vlan_table[j].vid) !=\n+\t\t\t\t\t    vlan)\n+\t\t\t\t\t\tcontinue;\n+\t\t\t\t\tmemmove(\n+\t\t\t\t\t &bp->pf.vf_info[i].vlan_table[j],\n+\t\t\t\t\t &bp->pf.vf_info[i].vlan_table[j + 1],\n+\t\t\t\t\t getpagesize() -\n+\t\t\t\t\t ((j + 1) *\n+\t\t\t\t\t sizeof(struct bnxt_vlan_table_entry)));\n+\t\t\t\t\tj--;\n+\t\t\t\t\tcnt = bp->pf.vf_info[i].vlan_count--;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\trte_pmd_bnxt_set_vf_vlan_anti_spoof(dev->data->port_id,\n+\t\t\t\t\t i, bp->pf.vf_info[i].vlan_spoof_en);\n+\t\t}\n+\t}\n+\n+\treturn rc;\n+}\ndiff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h\nindex 292976d..024620f 100644\n--- a/drivers/net/bnxt/rte_pmd_bnxt.h\n+++ b/drivers/net/bnxt/rte_pmd_bnxt.h\n@@ -37,6 +37,24 @@\n #include <rte_ethdev.h>\n \n /**\n+ * Enable/Disable VF MAC anti spoof\n+ *\n+ * @param port\n+ *    The port identifier of the Ethernet device.\n+ * @param vf\n+ *   VF id.\n+ * @param on\n+ *    1 - Enable VF MAC anti spoof.\n+ *    0 - Disable VF MAC anti spoof.\n+ *\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENODEV) if *port* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);\n+\n+/**\n  * Set the VF MAC address.\n  *\n  * @param port\n@@ -54,6 +72,48 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,\n \t\tstruct ether_addr *mac_addr);\n \n /**\n+ * Enable/Disable vf vlan strip for all queues in a pool\n+ *\n+ * @param port\n+ *    The port identifier of the Ethernet device.\n+ * @param vf\n+ *    ID specifying VF.\n+ * @param on\n+ *    1 - Enable VF's vlan strip on RX queues.\n+ *    0 - Disable VF's vlan strip on RX queues.\n+ *\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support this feature.\n+ *   - (-ENODEV) if *port* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int\n+rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);\n+\n+/**\n+ * Enable/Disable hardware VF VLAN filtering by an Ethernet device of\n+ * received VLAN packets tagged with a given VLAN Tag Identifier.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param vlan\n+ *   The VLAN Tag Identifier whose filtering must be enabled or disabled.\n+ * @param vf_mask\n+ *    Bitmap listing which VFs participate in the VLAN filtering.\n+ * @param vlan_on\n+ *    1 - Enable VFs VLAN filtering.\n+ *    0 - Disable VFs VLAN filtering.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,\n+\t\t\t\t    uint64_t vf_mask, uint8_t vlan_on);\n+\n+/**\n  * Enable/Disable tx loopback\n  *\n  * @param port\n@@ -84,4 +144,41 @@ int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on);\n  *   - (-EINVAL) if bad parameter.\n  */\n int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on);\n+\n+/**\n+ * Set the VF rate limit.\n+ *\n+ * @param port\n+ *   The port identifier of the Ethernet device.\n+ * @param vf\n+ *   VF id.\n+ * @param tx_rate\n+ *   Tx rate for the VF\n+ * @param q_msk\n+ *   Mask of the Tx queue\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENODEV) if *port* invalid.\n+ *   - (-EINVAL) if *vf* or *mac_addr* is invalid.\n+ */\n+int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,\n+\t\t\t\tuint16_t tx_rate, uint64_t q_msk);\n+\n+/**\n+ * Enable/Disable VF VLAN anti spoof\n+ *\n+ * @param port\n+ *    The port identifier of the Ethernet device.\n+ * @param vf\n+ *   VF id.\n+ * @param on\n+ *    1 - Enable VF VLAN anti spoof.\n+ *    0 - Disable VF VLAN anti spoof.\n+ *\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENODEV) if *port* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);\n #endif /* _PMD_BNXT_H_ */\ndiff --git a/drivers/net/bnxt/rte_pmd_bnxt_version.map b/drivers/net/bnxt/rte_pmd_bnxt_version.map\nindex fa291cb..770b076 100644\n--- a/drivers/net/bnxt/rte_pmd_bnxt_version.map\n+++ b/drivers/net/bnxt/rte_pmd_bnxt_version.map\n@@ -4,6 +4,11 @@ DPDK_17.08 {\n \trte_pmd_bnxt_set_tx_loopback;\n \trte_pmd_bnxt_set_all_queues_drop_en;\n \trte_pmd_bnxt_set_vf_mac_addr;\n+\trte_pmd_bnxt_set_vf_mac_anti_spoof;\n+\trte_pmd_bnxt_set_vf_rate_limit;\n+\trte_pmd_bnxt_set_vf_vlan_stripq;\n+\trte_pmd_bnxt_set_vf_vlan_filter;\n+\trte_pmd_bnxt_set_vf_vlan_anti_spoof;\n \n \tlocal: *;\n };\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "20/26"
    ]
}