Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/509141/?format=api
{ "id": 509141, "url": "http://patchwork.ozlabs.org/api/patches/509141/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1440096383-8915-2-git-send-email-anjali.singhai@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1440096383-8915-2-git-send-email-anjali.singhai@intel.com>", "list_archive_url": null, "date": "2015-08-20T18:46:21", "name": "[2/4] geneve: Add geneve udp port offload for ethernet devices", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "0e65f3af8b519874468cde512716e35bfe1b80e1", "submitter": { "id": 65487, "url": "http://patchwork.ozlabs.org/api/people/65487/?format=api", "name": "Singhai, Anjali", "email": "anjali.singhai@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1440096383-8915-2-git-send-email-anjali.singhai@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/509141/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/509141/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id 97708140291\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 21 Aug 2015 04:31:08 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E442C8A7B0;\n\tThu, 20 Aug 2015 18:31:07 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id TRF1r4r2oNkG; Thu, 20 Aug 2015 18:31:07 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5A56994719;\n\tThu, 20 Aug 2015 18:31:07 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id DF3861C1652\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Aug 2015 18:31:05 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id DB9C888DA9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Aug 2015 18:31:05 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Yochg_va4cmy for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Aug 2015 18:31:05 +0000 (UTC)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 5D16488DD5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Aug 2015 18:31:05 +0000 (UTC)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga102.jf.intel.com with ESMTP; 20 Aug 2015 11:31:06 -0700", "from asinghai-cp.jf.intel.com ([134.134.3.57])\n\tby fmsmga001.fm.intel.com with ESMTP; 20 Aug 2015 11:31:05 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.15,715,1432623600\"; d=\"scan'208\";a=\"772608365\"", "From": "Anjali Singhai Jain <anjali.singhai@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 20 Aug 2015 11:46:21 -0700", "Message-Id": "<1440096383-8915-2-git-send-email-anjali.singhai@intel.com>", "X-Mailer": "git-send-email 1.8.1.4", "In-Reply-To": "<1440096383-8915-1-git-send-email-anjali.singhai@intel.com>", "References": "<1440096383-8915-1-git-send-email-anjali.singhai@intel.com>", "Subject": "[Intel-wired-lan] [PATCH 2/4] geneve: Add geneve udp port offload\n\tfor ethernet devices", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "Add ndo_ops to add/del UDP ports to a device that supports geneve\noffload.\n\nv2:Added comments for new ndo_ops and minor format fix.\n\nSigned-off-by: Kiran Patil <kiran.patil@intel.com>\nSigned-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>\n---\n include/linux/netdevice.h | 20 +++++++++++++++++++-\n net/ipv4/geneve_core.c | 22 ++++++++++++++++++++++\n 2 files changed, 41 insertions(+), 1 deletion(-)", "diff": "diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h\nindex f3bb290..d6f00c7 100644\n--- a/include/linux/netdevice.h\n+++ b/include/linux/netdevice.h\n@@ -1016,6 +1016,19 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,\n *\taddress family that vxlan is not listening to anymore. The operation\n *\tis protected by the vxlan_net->sock_lock.\n *\n+ * void (*ndo_add_geneve_port)(struct net_device *dev,\n+ *\t\t\t sa_family_t sa_family, __be16 port);\n+ *\tCalled by geneve to notiy a driver about the UDP port and socket\n+ *\taddress family that geneve is listnening to. It is called only when\n+ *\ta new port starts listening. The operation is protected by the\n+ *\tgeneve_net->sock_lock.\n+ *\n+ * void (*ndo_del_geneve_port)(struct net_device *dev,\n+ *\t\t\t sa_family_t sa_family, __be16 port);\n+ *\tCalled by geneve to notify the driver about a UDP port and socket\n+ *\taddress family that geneve is not listening to anymore. The operation\n+ *\tis protected by the geneve_net->sock_lock.\n+ *\n * void* (*ndo_dfwd_add_station)(struct net_device *pdev,\n *\t\t\t\t struct net_device *dev)\n *\tCalled by upper layer devices to accelerate switching or other\n@@ -1210,7 +1223,12 @@ struct net_device_ops {\n \tvoid\t\t\t(*ndo_del_vxlan_port)(struct net_device *dev,\n \t\t\t\t\t\t sa_family_t sa_family,\n \t\t\t\t\t\t __be16 port);\n-\n+\tvoid\t\t\t(*ndo_add_geneve_port)(struct net_device *dev,\n+\t\t\t\t\t\t sa_family_t sa_family,\n+\t\t\t\t\t\t __be16 port);\n+\tvoid\t\t\t(*ndo_del_geneve_port)(struct net_device *dev,\n+\t\t\t\t\t\t sa_family_t sa_family,\n+\t\t\t\t\t\t __be16 port);\n \tvoid*\t\t\t(*ndo_dfwd_add_station)(struct net_device *pdev,\n \t\t\t\t\t\t\tstruct net_device *dev);\n \tvoid\t\t\t(*ndo_dfwd_del_station)(struct net_device *pdev,\ndiff --git a/net/ipv4/geneve_core.c b/net/ipv4/geneve_core.c\nindex 311a4ba..9ea9082 100644\n--- a/net/ipv4/geneve_core.c\n+++ b/net/ipv4/geneve_core.c\n@@ -234,8 +234,11 @@ static int geneve_gro_complete(struct sk_buff *skb, int nhoff,\n \n static void geneve_notify_add_rx_port(struct geneve_sock *gs)\n {\n+\tstruct net_device *dev;\n \tstruct sock *sk = gs->sock->sk;\n+\tstruct net *net = sock_net(sk);\n \tsa_family_t sa_family = sk->sk_family;\n+\t__be16 port = inet_sk(sk)->inet_sport;\n \tint err;\n \n \tif (sa_family == AF_INET) {\n@@ -244,12 +247,31 @@ static void geneve_notify_add_rx_port(struct geneve_sock *gs)\n \t\t\tpr_warn(\"geneve: udp_add_offload failed with status %d\\n\",\n \t\t\t\terr);\n \t}\n+\n+\trcu_read_lock();\n+\tfor_each_netdev_rcu(net, dev) {\n+\t\tif (dev->netdev_ops->ndo_add_geneve_port)\n+\t\t\tdev->netdev_ops->ndo_add_geneve_port(dev, sa_family,\n+\t\t\t\t\t\t\t port);\n+\t}\n+\trcu_read_unlock();\n }\n \n static void geneve_notify_del_rx_port(struct geneve_sock *gs)\n {\n+\tstruct net_device *dev;\n \tstruct sock *sk = gs->sock->sk;\n+\tstruct net *net = sock_net(sk);\n \tsa_family_t sa_family = sk->sk_family;\n+\t__be16 port = inet_sk(sk)->inet_sport;\n+\n+\trcu_read_lock();\n+\tfor_each_netdev_rcu(net, dev) {\n+\t\tif (dev->netdev_ops->ndo_del_geneve_port)\n+\t\t\tdev->netdev_ops->ndo_del_geneve_port(dev, sa_family,\n+\t\t\t\t\t\t\t port);\n+\t}\n+\trcu_read_unlock();\n \n \tif (sa_family == AF_INET)\n \t\tudp_del_offload(&gs->udp_offloads);\n", "prefixes": [ "2/4" ] }