From patchwork Sat Jan 16 00:59:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 364357 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.7 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, URIBL_BLOCKED, 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 F2343C433E0 for ; Sat, 16 Jan 2021 01:02:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADB4422BE8 for ; Sat, 16 Jan 2021 01:02:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727080AbhAPBBt (ORCPT ); Fri, 15 Jan 2021 20:01:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726287AbhAPBBq (ORCPT ); Fri, 15 Jan 2021 20:01:46 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC691C061798 for ; Fri, 15 Jan 2021 17:00:40 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id u19so11544832edx.2 for ; Fri, 15 Jan 2021 17:00:40 -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 :mime-version:content-transfer-encoding; bh=7XIru9YSoOQaS1swKibuoVI0XxqPGJLS/vhoFQlVy90=; b=koqnNFsLm3jQd2ZVwKu886UTvHEKqODcIi84dm3QUTBpvD9ZzmK7CtZ/S/Km/E3quK wAX0Kr9CCMwMD3Aa76KnYevdA5cn3Py9QSLHZ7FOaCXUuB9e0HhSJU2jtVqc3Sd8OfO7 eiAxBt9zIUCJx/J0/qqI2iX1Q0q/4JAnrcJnWdhjoH9ZNS8rfDLGdNrgWkM+5whHvIan 949esH6RbdRSd9dW2aJrVw+Df000DiMCFJ+P9o3ebBXqX9M6KxCQIol76VlVpvA64j5v ERHc1zJMdhstWmZH7VYX1mEnJbLZE9OP4mJ9nfSzTk69b6mJGz6FHHp8E9wf220yxZX3 Ws7A== 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:mime-version:content-transfer-encoding; bh=7XIru9YSoOQaS1swKibuoVI0XxqPGJLS/vhoFQlVy90=; b=od/HQpesNTH+CgEk2yUTaSKXU/mDvNhJR8J5CWrF2eiC8tlPjICNQyCFqM45PtpMJz dnkIpMJu6GKAX+s69T5hYitL3eqKtEMk8bIsHZMDKk67PiDEQGWSkDznE9QJPmqlWSvg 15gdg4Pj7A02xSIwl39mR2NQp2nbL0R9rdpGDt5GMbrXNj5R0+CwDtnNgovPpfltlWoz 39yi/ZdWUdfi+NkzSPE2yK6QGUunrB4dXHeMPFZmcHoQpRCWChYMX9G9bVKYjuZYUfGI pr42gETw7ncd1wErHA65fLrVQ3hW/cFDBq8RVTrX0Fq3PDBciSoiuOhFA6mqoHOAdzLO ikeQ== X-Gm-Message-State: AOAM532DtEtsygDQnQChZX7rFibAHHobbGXmgRWuX9w0v1il0eP36XXP ulToV8AWRsEdZL2QXhcWhDI= X-Google-Smtp-Source: ABdhPJyv28e6JcvffFNPKDe0M9E6DFHCKv1NbxAuzQ6DQfrjPCcCbNk0RpJdqK10He7cjaANEfG3ng== X-Received: by 2002:a05:6402:1ad1:: with SMTP id ba17mr11502112edb.51.1610758839611; Fri, 15 Jan 2021 17:00:39 -0800 (PST) Received: from localhost.localdomain (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id k3sm5666655eds.87.2021.01.15.17.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 17:00:39 -0800 (PST) From: Vladimir Oltean To: "David S . Miller" , Jakub Kicinski Cc: netdev , Microchip Linux Driver Support , Alexandre Belloni , Andrew Lunn , Florian Fainelli , Vivien Didelot , Claudiu Manoil , Tobias Waldekranz , Maxim Kochetkov Subject: [PATCH v2 net-next 05/14] net: mscc: ocelot: use ipv6 in the aggregation code Date: Sat, 16 Jan 2021 02:59:34 +0200 Message-Id: <20210116005943.219479-6-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210116005943.219479-1-olteanv@gmail.com> References: <20210116005943.219479-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean IPv6 header information is not currently part of the entropy source for the 4-bit aggregation code used for LAG offload, even though it could be. The hardware reference manual says about these fields: ANA::AGGR_CFG.AC_IP6_TCPUDP_PORT_ENA Use IPv6 TCP/UDP port when calculating aggregation code. Configure identically for all ports. Recommended value is 1. ANA::AGGR_CFG.AC_IP6_FLOW_LBL_ENA Use IPv6 flow label when calculating AC. Configure identically for all ports. Recommended value is 1. Integration with the xmit_hash_policy of the bonding interface is TBD. Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni --- Changes in v2: None. drivers/net/ethernet/mscc/ocelot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index d3a92c46f610..2b542f286739 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -1548,7 +1548,10 @@ int ocelot_init(struct ocelot *ocelot) ocelot_write(ocelot, ANA_AGGR_CFG_AC_SMAC_ENA | ANA_AGGR_CFG_AC_DMAC_ENA | ANA_AGGR_CFG_AC_IP4_SIPDIP_ENA | - ANA_AGGR_CFG_AC_IP4_TCPUDP_ENA, ANA_AGGR_CFG); + ANA_AGGR_CFG_AC_IP4_TCPUDP_ENA | + ANA_AGGR_CFG_AC_IP6_FLOW_LBL_ENA | + ANA_AGGR_CFG_AC_IP6_TCPUDP_ENA, + ANA_AGGR_CFG); /* Set MAC age time to default value. The entry is aged after * 2*AGE_PERIOD