From patchwork Fri Sep 25 13:16:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 260215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29987C4727C for ; Fri, 25 Sep 2020 13:16:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1024235FD for ; Fri, 25 Sep 2020 13:16:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728836AbgIYNQZ (ORCPT ); Fri, 25 Sep 2020 09:16:25 -0400 Received: from mailrelay112.isp.belgacom.be ([195.238.20.139]:52973 "EHLO mailrelay112.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728814AbgIYNQZ (ORCPT ); Fri, 25 Sep 2020 09:16:25 -0400 IronPort-SDR: lAsdkI1iOSoCmuM1HFCdnPuFg7TJRwX3a9KTEHcvv3zdaRl2DgzapcT6xq2oVoAWc948leSeRQ ina3g2yhvB7TE7TQgwcvkTQJPgYlzjS3LYhzHX8uvKz4cHZvy1dJfzOJHO1t7RjFvrRq4Qeo2q BOWL3c8iwlPpXm0++t9yeFP5LbzM38RfyO04rKxAOaXSI+ZrEfyMXaOLdO0rzco/cSeJJVkofz Zfk3iLDLPWdETU5arxysClA0+JRSHFjSiYg1e2Sb5/rvh+8wX8C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5QPtzvmKPgq+eTujXknll8ZZ6Wp2oEXaH+gFPR8P0qZeWbsgssGEWoSuwo+T/Hqh0acXjFPeXmyXLkx5iomCIK9E4jPXJyigb2Z1iehApJWfnxGCkyLEXrwcYWLResMZz+MLc9/iTEES7ehRJE71R20tw/11aBnLuzK9S0cr57j08J15+LLnxEo6TN0F9id032KT2xsmmMIRjk23L1woEBkyVeMz7J4g/pGGtxX/P5JTAg6OoDGz+BgCND9RBjBftGXR1aiWNmmBisxTt0pyd8Uf0l9A8mijgzE3yeyDb8ajaeEBJIv/6LH3HjwJ8B9xGja1KU7lFYpXJgHCWrziqdh+g37C4fXnkCdkKi2M6IRwGqF93qJxEKNsVteXQo2Vr/KDl4FYU6Dg93z50rEB5G0BLgqKApKyobWJKJAZPXyjkRASeulMtmIMDH5oHu5GRvdnuDEV4HtYWhIhCg= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2ASEgDD7G1f/xCltltfHAEBATwBAQQEAQECAQEHAQEcgUqBHCACAQGCLV+NPpJikgQLAQEBAQEBAQEBNQECBAEBhEuCMSU4EwIDAQEBAwIFAQEGAQEBAQEBBQQBhg9Fgjcig0cLASMjgT8SgyaCWCm4PzOEEIURgUKBNgIBAQEBiCuFGoFBP4RfijQEtz2CcYMThGmSTA8ioRCTCKIYgXpNIBiDJFAZDY5WjhJCMDcCBgoBAQMJVwE9AY4fAQE X-IPAS-Result: A2ASEgDD7G1f/xCltltfHAEBATwBAQQEAQECAQEHAQEcgUqBHCACAQGCLV+NPpJikgQLAQEBAQEBAQEBNQECBAEBhEuCMSU4EwIDAQEBAwIFAQEGAQEBAQEBBQQBhg9Fgjcig0cLASMjgT8SgyaCWCm4PzOEEIURgUKBNgIBAQEBiCuFGoFBP4RfijQEtz2CcYMThGmSTA8ioRCTCKIYgXpNIBiDJFAZDY5WjhJCMDcCBgoBAQMJVwE9AY4fAQE Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([91.182.165.16]) by relay.skynet.be with ESMTP; 25 Sep 2020 15:16:23 +0200 From: Fabian Frederick To: davem@davemloft.net, kuba@kernel.org Cc: mkubecek@suse.cz, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Fabian Frederick Subject: [PATCH V2 1/5 net-next] vxlan: don't collect metadata if remote checksum is wrong Date: Fri, 25 Sep 2020 15:16:02 +0200 Message-Id: <20200925131602.56461-1-fabf@skynet.be> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org call vxlan_remcsum() before md filling in vxlan_rcv() Signed-off-by: Fabian Frederick --- drivers/net/vxlan.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index b9fefe27e3e89..47c762f7f5b11 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1875,6 +1875,10 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb) !net_eq(vxlan->net, dev_net(vxlan->dev)))) goto drop; + if (vs->flags & VXLAN_F_REMCSUM_RX) + if (!vxlan_remcsum(&unparsed, skb, vs->flags)) + goto drop; + if (vxlan_collect_metadata(vs)) { struct metadata_dst *tun_dst; @@ -1891,9 +1895,6 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb) memset(md, 0, sizeof(*md)); } - if (vs->flags & VXLAN_F_REMCSUM_RX) - if (!vxlan_remcsum(&unparsed, skb, vs->flags)) - goto drop; if (vs->flags & VXLAN_F_GBP) vxlan_parse_gbp_hdr(&unparsed, skb, vs->flags, md); /* Note that GBP and GPE can never be active together. This is From patchwork Fri Sep 25 13:16:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 260214 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26817C4363D for ; Fri, 25 Sep 2020 13:17:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E484823888 for ; Fri, 25 Sep 2020 13:17:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728905AbgIYNRD (ORCPT ); Fri, 25 Sep 2020 09:17:03 -0400 Received: from mailrelay112.isp.belgacom.be ([195.238.20.139]:53047 "EHLO mailrelay112.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728121AbgIYNRC (ORCPT ); Fri, 25 Sep 2020 09:17:02 -0400 IronPort-SDR: j4hNMfuq5CSYQYaEIQJGu8KqlMc6/hszWlwqCeEnxZpNZabx7BYo8QbWscV3RqovnGRNBvv4cg I1DZfH82ClABXFIK4zVS+PYMZ0NMjgVUY64y+vKsC6dHC/jafwqpM/nSWmNsZ/eor68neDOIQO GEejyvcAjWoxhOl6aKDCKwJ+/CvBXJAKNbgkl3pHyM+WkParmsPRlWgAm2BqySkd7MPT3ZL/RM 8Biw5RjZPktdFjLjamGZxVpJlCO6sP6UJB6wv9do0kKHa/RrGXvILbVGU9SHAzSNjbxEdZ4mwc VyM= X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:mP3S2R2FlTHArHCusmDT+DRfVm0co7zxezQtwd8ZsesWLf/xwZ3uMQTl6Ol3ixeRBMOHsq0C0bKd7vGocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk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099SRoD8SB1GGAV2V0nmIORz8r06FzuE99xUmZ0ah+nfNYEcde5+1GUggkL57Q1e96BM7oWgLHYNiJTEyqQtK8ATE+Vtgx2cMBY15hG9W+iRDOxySqDKUOmLyFH5E06aHc3nj3J8lj13bKzrIugEd1CvdIYGGvmKN63wTaGYPMl0KXi+CseLhYlC3Q/m6rzmeUukxcFglqXvbrR3caM2Xfp9Xw4AvsVbKiBK4mOQgJncCLIKVicd74i1haAv3uboeNK1mtknu9UE7bjoiHa5DnLj0Q X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2ASEgDD7G1f/xCltltfHAEBATwBAQQEAQECAQEHAQEcgUqBHCACAQGCLV+NPpJikgQLAQEBAQEBAQEBNQECBAEBhEuCMSU4EwIDAQEBAwIFAQEGAQEBAQEBBQQBhg9Fgjcig0cLASMjgT8SgyaCWCm4PzOEEIURgUKBNgIBAQEBiCuFGoFBP4ERg06KNASaW5xignGDE4RpkkwPIqEQkwiiGIF6TSAYgyRQGQ2OKxeOJkIwNwIGCgEBAwlXAT0Bjh8BAQ X-IPAS-Result: A2ASEgDD7G1f/xCltltfHAEBATwBAQQEAQECAQEHAQEcgUqBHCACAQGCLV+NPpJikgQLAQEBAQEBAQEBNQECBAEBhEuCMSU4EwIDAQEBAwIFAQEGAQEBAQEBBQQBhg9Fgjcig0cLASMjgT8SgyaCWCm4PzOEEIURgUKBNgIBAQEBiCuFGoFBP4ERg06KNASaW5xignGDE4RpkkwPIqEQkwiiGIF6TSAYgyRQGQ2OKxeOJkIwNwIGCgEBAwlXAT0Bjh8BAQ Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([91.182.165.16]) by relay.skynet.be with ESMTP; 25 Sep 2020 15:16:59 +0200 From: Fabian Frederick To: davem@davemloft.net, kuba@kernel.org Cc: mkubecek@suse.cz, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Fabian Frederick Subject: [PATCH V2 3/5 net-next] vxlan: move encapsulation warning Date: Fri, 25 Sep 2020 15:16:39 +0200 Message-Id: <20200925131639.56564-1-fabf@skynet.be> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org vxlan_xmit_one() was only called from vxlan_xmit() without rdst and info was already tested. Emit warning in that function instead Signed-off-by: Fabian Frederick --- drivers/net/vxlan.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index cc904f003f158..14f903d09c010 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2650,11 +2650,6 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, udp_sum = !(flags & VXLAN_F_UDP_ZERO_CSUM6_TX); label = vxlan->cfg.label; } else { - if (!info) { - WARN_ONCE(1, "%s: Missing encapsulation instructions\n", - dev->name); - goto drop; - } remote_ip.sa.sa_family = ip_tunnel_info_af(info); if (remote_ip.sa.sa_family == AF_INET) { remote_ip.sin.sin_addr.s_addr = info->key.u.ipv4.dst; @@ -2889,6 +2884,10 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev) info->mode & IP_TUNNEL_INFO_TX) { vni = tunnel_id_to_key32(info->key.tun_id); } else { + if (!info) + WARN_ONCE(1, "%s: Missing encapsulation instructions\n", + dev->name); + if (info && info->mode & IP_TUNNEL_INFO_TX) vxlan_xmit_one(skb, dev, vni, NULL, false); else From patchwork Fri Sep 25 13:17:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 260213 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94514C4727D for ; Fri, 25 Sep 2020 13:17:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67E3623888 for ; Fri, 25 Sep 2020 13:17:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728939AbgIYNRk (ORCPT ); Fri, 25 Sep 2020 09:17:40 -0400 Received: from mailrelay112.isp.belgacom.be ([195.238.20.139]:53128 "EHLO mailrelay112.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728148AbgIYNRk (ORCPT ); Fri, 25 Sep 2020 09:17:40 -0400 IronPort-SDR: iSyu2GFpLieY1mj/lx1m2Sc+lTimUv4gFxSXnKLXQydqZA2k7O1NjPL26a9DF/h9gnYhuw0lEj BIf09xKVANJUrxD6DcOWqaI50DwTE/iwusuKSe2RhBExQlQO8zMOJ7NOrpS0U4yRrg3Vepzhv+ BYltoYR7ToUvMnqFXjB3x93RyV2hGSkDzHU8e0qRewzxfa+kdfPRVYpCPGjHnki4UwmBCP3gJx NhbxdWPHubO9o23c7Lrlx3QEtgCUVZTN2uaqmI475TCd5mnV2S5zCfiSyYpJ+96W5AVxQk9pKH Lso= X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:tYWiKh+zboh1E/9uRHKM819IXTAuvvDOBiVQ1KB+0+0VIJqq85mqBkHD//Il1AaPAdyEragcwLeH+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxhKiTanf79+MBq6oAXVu8ILnYZsN6E9xwfTrHBVYepW32RoJV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3yWwGLAVmaeGBIc38qPc2Xj+Odp9x2zd26Y/3BEaRZ5DPHOrg4Zz/hbeAorOnVnfkau2MewfwSTE3GSO12yDuAdfSgEjf7/CWCUxb0HXpNKxyFnPQ7K0CL8kel9PwMSMArBJe9vkkRNMSaGwa5zlf2utljLoVl6zzbSWYd+ydg== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2ASEgDD7G1f/xCltltfHAEBATwBAQQEAQECAQEHAQEcgUqBHCACAQGCLV+NPpJikgQLAQEBAQEBAQEBNQECBAEBhEuCMSU4EwIDAQEBAwIFAQEGAQEBAQEBBQQBhg9Fgjcig0cLASMjgT8SgyaCWCm4PzOEEIURgUKBNgIBAQEBiCuFGoFBP4RfihIiBLc9gnGDE4RpkkwPIqEQLZJbm1SGRIF6TSAYO4JpUBkNnGhCMDcCBgoBAQMJVwE9AY4fAQE X-IPAS-Result: A2ASEgDD7G1f/xCltltfHAEBATwBAQQEAQECAQEHAQEcgUqBHCACAQGCLV+NPpJikgQLAQEBAQEBAQEBNQECBAEBhEuCMSU4EwIDAQEBAwIFAQEGAQEBAQEBBQQBhg9Fgjcig0cLASMjgT8SgyaCWCm4PzOEEIURgUKBNgIBAQEBiCuFGoFBP4RfihIiBLc9gnGDE4RpkkwPIqEQLZJbm1SGRIF6TSAYO4JpUBkNnGhCMDcCBgoBAQMJVwE9AY4fAQE Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([91.182.165.16]) by relay.skynet.be with ESMTP; 25 Sep 2020 15:17:37 +0200 From: Fabian Frederick To: davem@davemloft.net, kuba@kernel.org Cc: mkubecek@suse.cz, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Fabian Frederick Subject: [PATCH V2 5/5 net-next] vxlan: fix vxlan_find_sock() documentation for l3mdev Date: Fri, 25 Sep 2020 15:17:17 +0200 Message-Id: <20200925131717.56666-1-fabf@skynet.be> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Since commit aab8cc3630e32 ("vxlan: add support for underlay in non-default VRF") vxlan_find_sock() also checks if socket is assigned to the right level 3 master device when lower device is not in the default VRF. Signed-off-by: Fabian Frederick --- drivers/net/vxlan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 1e9ab1002281c..fa21d62aa79c9 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -190,8 +190,9 @@ static inline struct vxlan_rdst *first_remote_rtnl(struct vxlan_fdb *fdb) return list_first_entry(&fdb->remotes, struct vxlan_rdst, list); } -/* Find VXLAN socket based on network namespace, address family and UDP port - * and enabled unshareable flags. +/* Find VXLAN socket based on network namespace, address family, UDP port, + * enabled unshareable flags and socket device binding (see l3mdev with + * non-default VRF). */ static struct vxlan_sock *vxlan_find_sock(struct net *net, sa_family_t family, __be16 port, u32 flags, int ifindex)