From patchwork Fri Jan 15 09:47:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 12022063 X-Patchwork-Delegate: kuba@kernel.org 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 C613CC433DB for ; Fri, 15 Jan 2021 09:49:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77346235F7 for ; Fri, 15 Jan 2021 09:49:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730476AbhAOJsh (ORCPT ); Fri, 15 Jan 2021 04:48:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbhAOJsg (ORCPT ); Fri, 15 Jan 2021 04:48:36 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73996C061794; Fri, 15 Jan 2021 01:48:05 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id j13so4889337pjz.3; Fri, 15 Jan 2021 01:48:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=H00cl0DwIpRYCoMPIXu8DVIsewbITBDDpGhtqr9YNek=; b=XO/zfGZEJr9k+VTdbdqArp6UW0x4XwRZOzNdUzmnzYut+JOqdUTRQd/P1PUzSC0MjQ 87Anc8RXHLixRPIF4kBT+6IRQwmN4gZ3Rnn/jTlDrVACTzviUx2f/idKp77QQyS4/krq uE87jsmdW862tpBiZLnv19AucYqaANgOAYnfwFklBSDJSCPZXHDhjuDU6evw9PgGh9su mKehb5aIqzSViTYoZnt/WfwKYFSldabQk29QqU+JQZ7J6wSli29HVeuQfjpyqaGdZbpV ex6UdrLz2o5BgxrYquwq19DrY8JDq9/aLv+qt74tZVZ+cUz+Cu5dEbQq64Hxdxrw4/7e knxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=H00cl0DwIpRYCoMPIXu8DVIsewbITBDDpGhtqr9YNek=; b=dlcgeSkZPDYE0WoClHA1owfVCnyhjpHKRPD+MTEuxhLNpSJhvKxR3fdy3zuy/gny7C 2FYQXvawRPQvONqXdVtnz1pjFTvu4PMNpR8KzMT7bF+xpuiG3zDk9qvmP2btQeIX7nY0 d9LLiR858Zwj5pqkeKpqBdExhRC599kDlI32Bc1tp+v+6hWXJQV9I+W9QIOCinuZSiWS OjxUmnfX7WjqfmZm6V2b9Un58eo0u9TlACSOmeJX756t+cE+1HRg46qVcmarv9Jiyxt8 Gj54+jmpdLRH5eTu4tGDgFH565lWyCyUn0wOB2jE3FgklPlKjn+8ifD83/7TrehQI+Cd DbIg== X-Gm-Message-State: AOAM531DVjIKHehTENlNiQdpr2y5Ftosub7JqECaUo5PGQrspEsb4W5R pan1bSsxpELFF9G3+dQOgWzgVD8UjvrVeQ== X-Google-Smtp-Source: ABdhPJxyVKj6xHUESk8pS1eQwZ2HvhWM5+ABENP4P3ahved2z+7fqmu6E5sgVlGNum9KAEfhL8sq8A== X-Received: by 2002:a17:90a:4096:: with SMTP id l22mr9516324pjg.114.1610704084854; Fri, 15 Jan 2021 01:48:04 -0800 (PST) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id w90sm7561241pjw.10.2021.01.15.01.48.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jan 2021 01:48:04 -0800 (PST) From: Xin Long To: network dev , linux-sctp@vger.kernel.org Cc: Marcelo Ricardo Leitner , Neil Horman , davem@davemloft.net, Jakub Kicinski , Martin Varghese , Alexander Duyck Subject: [PATCH net-next 1/3] vxlan: add NETIF_F_FRAGLIST flag for dev features Date: Fri, 15 Jan 2021 17:47:45 +0800 Message-Id: <25be5f99a282231f29ba984596dbb462e8196171.1610704037.git.lucien.xin@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Some protocol HW GSO requires fraglist supported by the device, like SCTP. Without NETIF_F_FRAGLIST set in the dev features of vxlan, it would have to do SW GSO before the packets enter the driver, even when the vxlan dev and lower dev (like veth) both have the feature of NETIF_F_GSO_SCTP. So this patch is to add it for vxlan. Signed-off-by: Xin Long --- 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 b936443..3929e43 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -3283,12 +3283,13 @@ static void vxlan_setup(struct net_device *dev) SET_NETDEV_DEVTYPE(dev, &vxlan_type); dev->features |= NETIF_F_LLTX; - dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; + dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST; dev->features |= NETIF_F_RXCSUM; dev->features |= NETIF_F_GSO_SOFTWARE; dev->vlan_features = dev->features; - dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM; + dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST; + dev->hw_features |= NETIF_F_RXCSUM; dev->hw_features |= NETIF_F_GSO_SOFTWARE; netif_keep_dst(dev); dev->priv_flags |= IFF_NO_QUEUE; From patchwork Fri Jan 15 09:47:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 12022065 X-Patchwork-Delegate: kuba@kernel.org 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 2643EC433E6 for ; Fri, 15 Jan 2021 09:49:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC32A235F9 for ; Fri, 15 Jan 2021 09:49:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729326AbhAOJss (ORCPT ); Fri, 15 Jan 2021 04:48:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbhAOJsq (ORCPT ); Fri, 15 Jan 2021 04:48:46 -0500 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1D86C061796; Fri, 15 Jan 2021 01:48:13 -0800 (PST) Received: by mail-pg1-x536.google.com with SMTP id p18so5651122pgm.11; Fri, 15 Jan 2021 01:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=A+I0MIghGu/sRDrDxSDK4hlZ4vTYndFrjssnvjJD4zk=; b=t1Gc//qmrlw/xOOKPmZZVXvXS05pY8Ij3hnAkn6OvZ/8g6gUdyRHPi3PPogFfxihLo 01MtYgmU1pCDdTrShpnV2JDVoOKeEwarellXK1fwe8WYxhQ735BlNfbzKQE1HxcEPtQZ xFYC/i1gll63FjAi9e3Slt5rg+EzUi6UAFEhlJBI9zy9oY4qYW3N0lUdp+qQaj8GvQWu PZrEB8CmX9datWadColHUtRuyEEX2pgmq/RcS0tpAUM7++uQ31NqU1FBvEGdsJVgcS2d hbdGYEkSmnGR0LI16PnUD1wsNF0ZjS+YWZcsW9P8NGt2Ni2eLalRri5IInlM/zRiRUb0 3LNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=A+I0MIghGu/sRDrDxSDK4hlZ4vTYndFrjssnvjJD4zk=; b=OHZoOUSklGChoeHNR1NRbxFup2IrvkwgeewB3nTQOmpgvxuPkZ6D29lN7wU3W7UQM9 5ywBa65Jb8I3EkniKkgBoVecgHefTbIU+nTYuqYDmUdsNFFR+btixa/Wtpwaz9Ykwlq7 RTPeezE5kOtVecCsEHuzwrkeSlOjTfBS4kordj//AdiUz3cxuDRrDxFrW9ZhGxKa6XhL dqPxthELxZW1loKHMTcdt1k4DQ+VFYSuHpGLItsj0V/PO3PjX83XCS9Gh+BOAZHJlmkv WXyFGynhOJhBIuoSHo91q/sjoqhkMlLiLCm5dJG9vEEYHpeNC6zmrAY8xW31OVGFLLoH fDkA== X-Gm-Message-State: AOAM530SnrCQxTy9upj2tQKWQA89UpmNk0aeQE26rq5b8Xc3szSWC8jD VMe5d1wjLd3341M05DePfZrFd9bmohGOPQ== X-Google-Smtp-Source: ABdhPJyI/DyVnuIQ66TffmL5M+MjZapXmYsfeJ0PPHQ9wDcb+b4ePwt+kI2Tfo7ufYGEkE2w5hcaVw== X-Received: by 2002:a05:6a00:851:b029:1b3:fbb3:faed with SMTP id q17-20020a056a000851b02901b3fbb3faedmr970154pfk.18.1610704093322; Fri, 15 Jan 2021 01:48:13 -0800 (PST) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id w131sm7656113pfc.46.2021.01.15.01.48.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jan 2021 01:48:12 -0800 (PST) From: Xin Long To: network dev , linux-sctp@vger.kernel.org Cc: Marcelo Ricardo Leitner , Neil Horman , davem@davemloft.net, Jakub Kicinski , Martin Varghese , Alexander Duyck Subject: [PATCH net-next 2/3] geneve: add NETIF_F_FRAGLIST flag for dev features Date: Fri, 15 Jan 2021 17:47:46 +0800 Message-Id: X-Mailer: git-send-email 2.1.0 In-Reply-To: <25be5f99a282231f29ba984596dbb462e8196171.1610704037.git.lucien.xin@gmail.com> References: <25be5f99a282231f29ba984596dbb462e8196171.1610704037.git.lucien.xin@gmail.com> In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Some protocol HW GSO requires fraglist supported by the device, like SCTP. Without NETIF_F_FRAGLIST set in the dev features of geneve, it would have to do SW GSO before the packets enter the driver, even when the geneve dev and lower dev (like veth) both have the feature of NETIF_F_GSO_SCTP. So this patch is to add it for geneve. Signed-off-by: Xin Long --- drivers/net/geneve.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 6aa775d..4ac0373 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -1197,11 +1197,12 @@ static void geneve_setup(struct net_device *dev) SET_NETDEV_DEVTYPE(dev, &geneve_type); dev->features |= NETIF_F_LLTX; - dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; + dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST; dev->features |= NETIF_F_RXCSUM; dev->features |= NETIF_F_GSO_SOFTWARE; - dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM; + dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST; + dev->hw_features |= NETIF_F_RXCSUM; dev->hw_features |= NETIF_F_GSO_SOFTWARE; /* MTU range: 68 - (something less than 65535) */ From patchwork Fri Jan 15 09:47:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 12022067 X-Patchwork-Delegate: kuba@kernel.org 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 7C399C4332B for ; Fri, 15 Jan 2021 09:49:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 40395235F9 for ; Fri, 15 Jan 2021 09:49:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727170AbhAOJsy (ORCPT ); Fri, 15 Jan 2021 04:48:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbhAOJsx (ORCPT ); Fri, 15 Jan 2021 04:48:53 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CCDEC0613C1; Fri, 15 Jan 2021 01:48:22 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id be12so4431294plb.4; Fri, 15 Jan 2021 01:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=GICVRuFBghK6qmJknMZuPuQSC/9OuxyKLnC7+sZz14o=; b=MuIzvxouYS9yUMuqdrFlNlsrQlxv4YFveyqbp1/MvnnxikA09Vcyk6phkunkOr1KOT WcrvLUtgFBtiLBdKvkqHKvJNEcLvGkU3eE3E/mmfb8gfPQOUxm6CCKI0+ife4WD6HVoM 5QfRjWZJQyeSgtwcceXNOKn9U5imOxpN+/U15ofpu8pH/TYngbYgC6FMr3eNjTFukqfZ DW9GNdPWMft6FGCnZTs4dUE9j8TFcgF/Hoe5NKFaLcglolCfclb8YD7Tq9OkPW5ObUQ8 2ym7DFH680pFjqPbGJkk/9Qlvj/9wlv+vrGUNslUmRCukKMkr8drGxbroy25U2yuA8rF A1fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=GICVRuFBghK6qmJknMZuPuQSC/9OuxyKLnC7+sZz14o=; b=oZkZlZYp/EYcuVLVXzu9AIbs/+7OMV5gy79lzAlPu4ddzdPfVwWusbSxqhAp8W2r0X j84IzhmocaCvjV4rO66sruAXN7RvizP2jSD+aG8PjoD7AmPX3PDcGj1csp2vxKeOD/Zn pdVoiVwtzV5HVFe5uTQLmfxeLcKSsjmCImFluPmNVhtm4LhttRT0o3mn9AOk4lO4Peh9 xtSp/O0HJ17LN5bTky8N1Ho0qeTBsjavImb08PGpN8/8IDwhViMICDSReOpK+VOhxpHi bQFlELQ4U5qiqHY1rcPRq7jrBvpniE+WANU6iXmLBa+idrV103NCx8QAev74A/TXH5EU iTkg== X-Gm-Message-State: AOAM531dToaTIfdvVMy7JSBXg+75smVKD7t7WpG5zUzYh79KpQUqKlUh XvN/NlrKo7GqX1i1Pdl48Vic2dDISygmmA== X-Google-Smtp-Source: ABdhPJwJy/qKN53Csatyj/wBTM/EVcze9J7BbtMHVYh5zKqr3m2x6fT5kZJI5tpuJuJXKlLInY7E4w== X-Received: by 2002:a17:90a:8b8a:: with SMTP id z10mr9771771pjn.67.1610704101782; Fri, 15 Jan 2021 01:48:21 -0800 (PST) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id t22sm8459987pgm.18.2021.01.15.01.48.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jan 2021 01:48:21 -0800 (PST) From: Xin Long To: network dev , linux-sctp@vger.kernel.org Cc: Marcelo Ricardo Leitner , Neil Horman , davem@davemloft.net, Jakub Kicinski , Martin Varghese , Alexander Duyck Subject: [PATCH net-next 3/3] bareudp: add NETIF_F_FRAGLIST flag for dev features Date: Fri, 15 Jan 2021 17:47:47 +0800 Message-Id: <35feddbddb835f24a4b518294e5f0b4c3478591f.1610704037.git.lucien.xin@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: References: <25be5f99a282231f29ba984596dbb462e8196171.1610704037.git.lucien.xin@gmail.com> In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Like vxlan and geneve, bareudp also needs this dev feature to support some protocol's HW GSO. Signed-off-by: Xin Long --- drivers/net/bareudp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c index 57dfaf4..7511bca 100644 --- a/drivers/net/bareudp.c +++ b/drivers/net/bareudp.c @@ -526,11 +526,12 @@ static void bareudp_setup(struct net_device *dev) dev->netdev_ops = &bareudp_netdev_ops; dev->needs_free_netdev = true; SET_NETDEV_DEVTYPE(dev, &bareudp_type); - dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; + dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST; dev->features |= NETIF_F_RXCSUM; dev->features |= NETIF_F_LLTX; dev->features |= NETIF_F_GSO_SOFTWARE; - dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM; + dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST; + dev->hw_features |= NETIF_F_RXCSUM; dev->hw_features |= NETIF_F_GSO_SOFTWARE; dev->hard_header_len = 0; dev->addr_len = 0;