Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44503/?format=api
http://patches.dpdk.org/api/patches/44503/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1536572016-18134-38-git-send-email-arybchenko@solarflare.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": "<1536572016-18134-38-git-send-email-arybchenko@solarflare.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1536572016-18134-38-git-send-email-arybchenko@solarflare.com", "date": "2018-09-10T09:33:36", "name": "[37/37] net/sfc/base: add helper API to make Geneve filter spec", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "58ce4cb822f9d08558c5ce24e6ad51d212e5073e", "submitter": { "id": 607, "url": "http://patches.dpdk.org/api/people/607/?format=api", "name": "Andrew Rybchenko", "email": "arybchenko@solarflare.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/1536572016-18134-38-git-send-email-arybchenko@solarflare.com/mbox/", "series": [ { "id": 1244, "url": "http://patches.dpdk.org/api/series/1244/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1244", "date": "2018-09-10T09:33:01", "name": "net/sfc: update base driver", "version": 1, "mbox": "http://patches.dpdk.org/series/1244/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/44503/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/44503/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 0B5A01B05B;\n\tMon, 10 Sep 2018 11:34:48 +0200 (CEST)", "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n\t[67.231.154.164]) by dpdk.org (Postfix) with ESMTP id D4B5D4C94\n\tfor <dev@dpdk.org>; Mon, 10 Sep 2018 11:33:55 +0200 (CEST)", "from webmail.solarflare.com (webmail.solarflare.com\n\t[12.187.104.26])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with\n\tESMTPS id\n\tF2EB0780061 for <dev@dpdk.org>; Mon, 10 Sep 2018 09:33:54 +0000 (UTC)", "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1395.4; Mon, 10 Sep 2018 02:33:49 -0700", "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1395.4 via Frontend Transport; Mon, 10 Sep 2018 02:33:49 -0700", "from ukv-loginhost.uk.solarflarecom.com\n\t(ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tw8A9XlUm023900; Mon, 10 Sep 2018 10:33:47 +0100", "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n\tby ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id\n\t63D4C1626D2; Mon, 10 Sep 2018 10:33:47 +0100 (BST)" ], "X-Virus-Scanned": "Proofpoint Essentials engine", "From": "Andrew Rybchenko <arybchenko@solarflare.com>", "To": "<dev@dpdk.org>", "CC": "Vijay Srivastava <vijays@solarflare.com>", "Date": "Mon, 10 Sep 2018 10:33:36 +0100", "Message-ID": "<1536572016-18134-38-git-send-email-arybchenko@solarflare.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1536572016-18134-1-git-send-email-arybchenko@solarflare.com>", "References": "<1536572016-18134-1-git-send-email-arybchenko@solarflare.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.5.1010-24084.005", "X-TM-AS-Result": "No-3.938100-4.000000-10", "X-TMASE-MatchedRID": "kls4gYRVHLZveCKWtaLcaKKa0xB73sAAOIBtb6gQTfg+g2HSynO/AozR\n\tExx/TfU2BVW01wUvH52N/3dDbj3CNUJH8WyQMk5uogGd8wIUGIJ5ybkwtj/jvgKaBrJXbfy08Sr\n\tPK0b+HrHi8zVgXoAltsIJ+4gwXrEtWBd6ltyXuvva7gP8162DMUnvGqVNxIWEYnfoiNvYG4g/Ve\n\tE5nGWywdGkEU+oPNEO34tZ9vh88F7Jh2MpGrktgLYfY3I2I4y4NMX+S/RdlFq9Tbikt9AWZ0CBS\n\tGS7bIBtA1B/p1SzcogrKiD/U8b7SYci0ewgZmW0ftwZ3X11IV0=", "X-TM-AS-User-Approved-Sender": "No", "X-TM-AS-User-Blocked-Sender": "No", "X-TMASE-Result": "10--3.938100-4.000000", "X-TMASE-Version": "SMEX-12.5.0.1300-8.5.1010-24084.005", "X-MDID": "1536572035-cyWzahDRLyWf", "Subject": "[dpdk-dev] [PATCH 37/37] net/sfc/base: add helper API to make\n\tGeneve filter spec", "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: Vijay Srivastava <vijays@solarflare.com>\n\nSigned-off-by: Vijay Srivastava <vijays@solarflare.com>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n drivers/net/sfc/base/efx.h | 18 ++++++-\n drivers/net/sfc/base/efx_filter.c | 90 +++++++++++++++++++++++++++----\n 2 files changed, 95 insertions(+), 13 deletions(-)", "diff": "diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h\nindex 62c56e6e1..fd68d69c7 100644\n--- a/drivers/net/sfc/base/efx.h\n+++ b/drivers/net/sfc/base/efx.h\n@@ -2959,9 +2959,23 @@ efx_filter_spec_set_encap_type(\n \t__in\t\tefx_filter_inner_frame_match_t inner_frame_match);\n \n extern\t__checkReturn\tefx_rc_t\n-efx_filter_spec_set_vxlan_full(\n+efx_filter_spec_set_vxlan(\n \t__inout\t\tefx_filter_spec_t *spec,\n-\t__in\t\tconst uint8_t *vxlan_id,\n+\t__in\t\tconst uint8_t *vni,\n+\t__in\t\tconst uint8_t *inner_addr,\n+\t__in\t\tconst uint8_t *outer_addr);\n+\n+extern\t__checkReturn\tefx_rc_t\n+efx_filter_spec_set_geneve(\n+\t__inout\t\tefx_filter_spec_t *spec,\n+\t__in\t\tconst uint8_t *vni,\n+\t__in\t\tconst uint8_t *inner_addr,\n+\t__in\t\tconst uint8_t *outer_addr);\n+\n+extern\t__checkReturn\tefx_rc_t\n+efx_filter_spec_set_nvgre(\n+\t__inout\t\tefx_filter_spec_t *spec,\n+\t__in\t\tconst uint8_t *vsid,\n \t__in\t\tconst uint8_t *inner_addr,\n \t__in\t\tconst uint8_t *outer_addr);\n \ndiff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c\nindex 412298acf..a7523b38b 100644\n--- a/drivers/net/sfc/base/efx_filter.c\n+++ b/drivers/net/sfc/base/efx_filter.c\n@@ -490,27 +490,42 @@ efx_filter_spec_set_encap_type(\n }\n \n /*\n- * Specify inner and outer Ethernet address and VXLAN ID in filter\n+ * Specify inner and outer Ethernet address and VNI or VSID in tunnel filter\n * specification.\n */\n-\t__checkReturn\tefx_rc_t\n-efx_filter_spec_set_vxlan_full(\n-\t__inout\t\tefx_filter_spec_t *spec,\n-\t__in\t\tconst uint8_t *vxlan_id,\n+static\t__checkReturn\tefx_rc_t\n+efx_filter_spec_set_tunnel(\n+\t__inout\tefx_filter_spec_t *spec,\n+\t__in\t\tefx_tunnel_protocol_t encap_type,\n+\t__in\t\tconst uint8_t *vni_or_vsid,\n \t__in\t\tconst uint8_t *inner_addr,\n \t__in\t\tconst uint8_t *outer_addr)\n {\n+\tefx_rc_t rc;\n+\n \tEFSYS_ASSERT3P(spec, !=, NULL);\n-\tEFSYS_ASSERT3P(vxlan_id, !=, NULL);\n+\tEFSYS_ASSERT3P(vni_or_vsid, !=, NULL);\n \tEFSYS_ASSERT3P(inner_addr, !=, NULL);\n \tEFSYS_ASSERT3P(outer_addr, !=, NULL);\n \n-\tif ((inner_addr == NULL) && (outer_addr == NULL))\n-\t\treturn (EINVAL);\n+\tswitch (encap_type) {\n+\tcase EFX_TUNNEL_PROTOCOL_VXLAN:\n+\tcase EFX_TUNNEL_PROTOCOL_GENEVE:\n+\tcase EFX_TUNNEL_PROTOCOL_NVGRE:\n+\t\tbreak;\n+\tdefault:\n+\t\trc = EINVAL;\n+\t\tgoto fail1;\n+\t}\n+\n+\tif ((inner_addr == NULL) && (outer_addr == NULL)) {\n+\t\trc = EINVAL;\n+\t\tgoto fail2;\n+\t}\n \n-\tif (vxlan_id != NULL) {\n+\tif (vni_or_vsid != NULL) {\n \t\tspec->efs_match_flags |= EFX_FILTER_MATCH_VNI_OR_VSID;\n-\t\tmemcpy(spec->efs_vni_or_vsid, vxlan_id, EFX_VNI_OR_VSID_LEN);\n+\t\tmemcpy(spec->efs_vni_or_vsid, vni_or_vsid, EFX_VNI_OR_VSID_LEN);\n \t}\n \tif (outer_addr != NULL) {\n \t\tspec->efs_match_flags |= EFX_FILTER_MATCH_LOC_MAC;\n@@ -520,10 +535,63 @@ efx_filter_spec_set_vxlan_full(\n \t\tspec->efs_match_flags |= EFX_FILTER_MATCH_IFRM_LOC_MAC;\n \t\tmemcpy(spec->efs_ifrm_loc_mac, inner_addr, EFX_MAC_ADDR_LEN);\n \t}\n+\n \tspec->efs_match_flags |= EFX_FILTER_MATCH_ENCAP_TYPE;\n-\tspec->efs_encap_type = EFX_TUNNEL_PROTOCOL_VXLAN;\n+\tspec->efs_encap_type = encap_type;\n \n \treturn (0);\n+\n+fail2:\n+\tEFSYS_PROBE(fail2);\n+fail1:\n+\tEFSYS_PROBE1(fail1, efx_rc_t, rc);\n+\n+\treturn (rc);\n+}\n+\n+/*\n+ * Specify inner and outer Ethernet address and VNI in VXLAN filter\n+ * specification.\n+ */\n+__checkReturn\t\tefx_rc_t\n+efx_filter_spec_set_vxlan(\n+\t__inout\t\tefx_filter_spec_t *spec,\n+\t__in\t\tconst uint8_t *vni,\n+\t__in\t\tconst uint8_t *inner_addr,\n+\t__in\t\tconst uint8_t *outer_addr)\n+{\n+\treturn efx_filter_spec_set_tunnel(spec, EFX_TUNNEL_PROTOCOL_VXLAN,\n+\t vni, inner_addr, outer_addr);\n+}\n+\n+/*\n+ * Specify inner and outer Ethernet address and VNI in Geneve filter\n+ * specification.\n+ */\n+__checkReturn\t\tefx_rc_t\n+efx_filter_spec_set_geneve(\n+\t__inout\t\tefx_filter_spec_t *spec,\n+\t__in\t\tconst uint8_t *vni,\n+\t__in\t\tconst uint8_t *inner_addr,\n+\t__in\t\tconst uint8_t *outer_addr)\n+{\n+\treturn efx_filter_spec_set_tunnel(spec, EFX_TUNNEL_PROTOCOL_GENEVE,\n+\t vni, inner_addr, outer_addr);\n+}\n+\n+/*\n+ * Specify inner and outer Ethernet address and vsid in NVGRE filter\n+ * specification.\n+ */\n+__checkReturn\t\tefx_rc_t\n+efx_filter_spec_set_nvgre(\n+\t__inout\t\tefx_filter_spec_t *spec,\n+\t__in\t\tconst uint8_t *vsid,\n+\t__in\t\tconst uint8_t *inner_addr,\n+\t__in\t\tconst uint8_t *outer_addr)\n+{\n+\treturn efx_filter_spec_set_tunnel(spec, EFX_TUNNEL_PROTOCOL_NVGRE,\n+\t vsid, inner_addr, outer_addr);\n }\n \n #if EFSYS_OPT_RX_SCALE\n", "prefixes": [ "37/37" ] }{ "id": 44503, "url": "