Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41920/?format=api
http://patches.dpdk.org/api/patches/41920/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180629092944.15576-8-johndale@cisco.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": "<20180629092944.15576-8-johndale@cisco.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180629092944.15576-8-johndale@cisco.com", "date": "2018-06-29T09:29:36", "name": "[v2,07/15] net/enic: add handlers to add/delete vxlan port number", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9cee8ca6e9416dc411f0356c271dfbfd91b4bf7b", "submitter": { "id": 359, "url": "http://patches.dpdk.org/api/people/359/?format=api", "name": "John Daley (johndale)", "email": "johndale@cisco.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/20180629092944.15576-8-johndale@cisco.com/mbox/", "series": [ { "id": 308, "url": "http://patches.dpdk.org/api/series/308/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=308", "date": "2018-06-29T09:29:29", "name": "enic PMD fixes and performance improvements", "version": 2, "mbox": "http://patches.dpdk.org/series/308/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/41920/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/41920/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0887C1B469;\n\tFri, 29 Jun 2018 11:32:23 +0200 (CEST)", "from alln-iport-3.cisco.com (alln-iport-3.cisco.com\n\t[173.37.142.90]) by dpdk.org (Postfix) with ESMTP id EC51F1B43D\n\tfor <dev@dpdk.org>; Fri, 29 Jun 2018 11:32:21 +0200 (CEST)", "from rcdn-core-9.cisco.com ([173.37.93.145])\n\tby alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Jun 2018 09:32:21 +0000", "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby rcdn-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id w5T9WLS9026722;\n\tFri, 29 Jun 2018 09:32:21 GMT", "by cisco.com (Postfix, from userid 392789)\n\tid 12EA620F2001; Fri, 29 Jun 2018 02:32:21 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=4780; q=dns/txt; s=iport;\n\tt=1530264742; x=1531474342;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=HdbHMTyxvoTvy3bo9CoqM48KPQcm509mfGRGv+NRWkU=;\n\tb=RKOY3oMN6MXRFyogSbpGm9WlNAOFPGi5peZnzsDsOHXpi0L6J53oy42E\n\tfbkOVddl51MkURDyex5k5gdv2v5KrD1j/9DWsB9M9CuozD4DARE073EUi\n\tKVmkeLya7yLuYQaadDg4sC2jdg8WVIKEd77wP2P4CFt7hHdMANEAp/qKY U=;", "X-IronPort-AV": "E=Sophos;i=\"5.51,285,1526342400\"; d=\"scan'208\";a=\"136615731\"", "From": "John Daley <johndale@cisco.com>", "To": "ferruh.yigit@intel.com", "Cc": "dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>", "Date": "Fri, 29 Jun 2018 02:29:36 -0700", "Message-Id": "<20180629092944.15576-8-johndale@cisco.com>", "X-Mailer": "git-send-email 2.16.2", "In-Reply-To": "<20180629092944.15576-1-johndale@cisco.com>", "References": "<20180628031940.17397-1-johndale@cisco.com>\n\t<20180629092944.15576-1-johndale@cisco.com>", "Subject": "[dpdk-dev] [PATCH v2 07/15] net/enic: add handlers to add/delete\n\tvxlan port number", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Hyong Youb Kim <hyonkim@cisco.com>\n\nThe NIC has one configurable VXLAN port, which is set to the default\n4789 upon vNIC reset. Adding a non-default port replaces this single\nVXLAN port. Deleting the previously added non-default port restores\nthe VXLAN port to the hardware default.\n\nSigned-off-by: Hyong Youb Kim <hyonkim@cisco.com>\nReviewed-by: John Daley <johndale@cisco.com>\n---\n drivers/net/enic/enic.h | 4 +++\n drivers/net/enic/enic_ethdev.c | 75 ++++++++++++++++++++++++++++++++++++++++++\n drivers/net/enic/enic_main.c | 1 +\n 3 files changed, 80 insertions(+)", "diff": "diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h\nindex f1895fe70..b611f0a24 100644\n--- a/drivers/net/enic/enic.h\n+++ b/drivers/net/enic/enic.h\n@@ -50,6 +50,9 @@\n \n #define ENICPMD_FDIR_MAX 64\n \n+/* HW default VXLAN port */\n+#define ENIC_DEFAULT_VXLAN_PORT\t 4789\n+\n /*\n * Interrupt 0: LSC and errors\n * Interrupt 1: rx queue 0\n@@ -126,6 +129,7 @@ struct enic {\n \tbool nic_cfg_chk; /* NIC_CFG_CHK available */\n \tbool udp_rss_weak; /* Bodega style UDP RSS */\n \tuint8_t ig_vlan_rewrite_mode; /* devargs ig-vlan-rewrite */\n+\tuint16_t vxlan_port; /* current vxlan port pushed to NIC */\n \n \tunsigned int flags;\n \tunsigned int priv_flags;\ndiff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c\nindex 111bdc82c..117b362de 100644\n--- a/drivers/net/enic/enic_ethdev.c\n+++ b/drivers/net/enic/enic_ethdev.c\n@@ -789,6 +789,79 @@ static int enicpmd_dev_rx_queue_intr_disable(struct rte_eth_dev *eth_dev,\n \treturn 0;\n }\n \n+static int udp_tunnel_common_check(struct enic *enic,\n+\t\t\t\t struct rte_eth_udp_tunnel *tnl)\n+{\n+\tif (tnl->prot_type != RTE_TUNNEL_TYPE_VXLAN)\n+\t\treturn -ENOTSUP;\n+\tif (!enic->overlay_offload) {\n+\t\tPMD_INIT_LOG(DEBUG, \" vxlan (overlay offload) is not \"\n+\t\t\t \"supported\\n\");\n+\t\treturn -ENOTSUP;\n+\t}\n+\treturn 0;\n+}\n+\n+static int update_vxlan_port(struct enic *enic, uint16_t port)\n+{\n+\tif (vnic_dev_overlay_offload_cfg(enic->vdev,\n+\t\t\t\t\t OVERLAY_CFG_VXLAN_PORT_UPDATE,\n+\t\t\t\t\t port)) {\n+\t\tPMD_INIT_LOG(DEBUG, \" failed to update vxlan port\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tPMD_INIT_LOG(DEBUG, \" updated vxlan port to %u\\n\", port);\n+\tenic->vxlan_port = port;\n+\treturn 0;\n+}\n+\n+static int enicpmd_dev_udp_tunnel_port_add(struct rte_eth_dev *eth_dev,\n+\t\t\t\t\t struct rte_eth_udp_tunnel *tnl)\n+{\n+\tstruct enic *enic = pmd_priv(eth_dev);\n+\tint ret;\n+\n+\tENICPMD_FUNC_TRACE();\n+\tret = udp_tunnel_common_check(enic, tnl);\n+\tif (ret)\n+\t\treturn ret;\n+\t/*\n+\t * The NIC has 1 configurable VXLAN port number. \"Adding\" a new port\n+\t * number replaces it.\n+\t */\n+\tif (tnl->udp_port == enic->vxlan_port || tnl->udp_port == 0) {\n+\t\tPMD_INIT_LOG(DEBUG, \" %u is already configured or invalid\\n\",\n+\t\t\t tnl->udp_port);\n+\t\treturn -EINVAL;\n+\t}\n+\treturn update_vxlan_port(enic, tnl->udp_port);\n+}\n+\n+static int enicpmd_dev_udp_tunnel_port_del(struct rte_eth_dev *eth_dev,\n+\t\t\t\t\t struct rte_eth_udp_tunnel *tnl)\n+{\n+\tstruct enic *enic = pmd_priv(eth_dev);\n+\tint ret;\n+\n+\tENICPMD_FUNC_TRACE();\n+\tret = udp_tunnel_common_check(enic, tnl);\n+\tif (ret)\n+\t\treturn ret;\n+\t/*\n+\t * Clear the previously set port number and restore the\n+\t * hardware default port number. Some drivers disable VXLAN\n+\t * offloads when there are no configured port numbers. But\n+\t * enic does not do that as VXLAN is part of overlay offload,\n+\t * which is tied to inner RSS and TSO.\n+\t */\n+\tif (tnl->udp_port != enic->vxlan_port) {\n+\t\tPMD_INIT_LOG(DEBUG, \" %u is not a configured vxlan port\\n\",\n+\t\t\t tnl->udp_port);\n+\t\treturn -EINVAL;\n+\t}\n+\treturn update_vxlan_port(enic, ENIC_DEFAULT_VXLAN_PORT);\n+}\n+\n static const struct eth_dev_ops enicpmd_eth_dev_ops = {\n \t.dev_configure = enicpmd_dev_configure,\n \t.dev_start = enicpmd_dev_start,\n@@ -838,6 +911,8 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {\n \t.reta_update = enicpmd_dev_rss_reta_update,\n \t.rss_hash_conf_get = enicpmd_dev_rss_hash_conf_get,\n \t.rss_hash_update = enicpmd_dev_rss_hash_update,\n+\t.udp_tunnel_port_add = enicpmd_dev_udp_tunnel_port_add,\n+\t.udp_tunnel_port_del = enicpmd_dev_udp_tunnel_port_del,\n };\n \n static int enic_parse_disable_overlay(__rte_unused const char *key,\ndiff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c\nindex 24de38d5e..e20256986 100644\n--- a/drivers/net/enic/enic_main.c\n+++ b/drivers/net/enic/enic_main.c\n@@ -1585,6 +1585,7 @@ static int enic_dev_init(struct enic *enic)\n \t\t\tPKT_TX_OUTER_IP_CKSUM |\n \t\t\tPKT_TX_TUNNEL_MASK;\n \t\tenic->overlay_offload = true;\n+\t\tenic->vxlan_port = ENIC_DEFAULT_VXLAN_PORT;\n \t\tdev_info(enic, \"Overlay offload is enabled\\n\");\n \t}\n \n", "prefixes": [ "v2", "07/15" ] }{ "id": 41920, "url": "