Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp640277pxj; Thu, 10 Jun 2021 09:10:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7be7sHX8b6N+nUdGQb30ny5HTm5jz7pHBFLsGEtwQ0Cd1f4GqmJYoLMH8okMGPJlA+xE9 X-Received: by 2002:aa7:c753:: with SMTP id c19mr199417eds.33.1623341412810; Thu, 10 Jun 2021 09:10:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1623341412; cv=pass; d=google.com; s=arc-20160816; b=TVkNRj6JlB3Zi+qL8bvyoIbmoZp8hzTDwKSQSWRhd2Ogx+Ot4aV5FRU8mMN5a/2CxI 3SohXWYOBoxhqa6MJog07wKGc6KMTYTe2PDf+enrSUnzyK/XZrW2/vmij/ypeGoh9GP0 HtfMbkHvyaiylZ6pMjuH16/8C7nJfz5ovI2SOwC7T5AlJuwqhEmUE07nvzTfSbEY18MD njbc1BQhDZrLaBYEsGFUz/FXsZ/srketDKyrpJXdx1tFq91r1fEwed5Ku7dK3CC7g+on kzp/9cnTDPbIm7EJtXVU0qEmjSLQeFiXDGyhS5Cv7rAfSqVEG1BLY4PWPDT8Z+PBk48I AlAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature; bh=NnS5ednMH6uQ+ILIKkfff6BrBZscg0rbdVfmhDJ6K2s=; b=MO3IYltQKAWxiiCJw+dC6DBPlIZhrSHhShqYwEIbRJqeoVO5AHFOKpq9hPS+WRtMBk ZSNlVVNL+YzqWVAqUB7Djph9phpQ8OxhzVDgu07iEMQUDyKoCT4CjWE2pmRkla/lfiwQ wqOdGF+c72kqbqGlzAwMtJg60Rse0NZ5jIRlwUcwqlRv7w4okZOw44X2/WX/mHtb8WXm nf6BUW0/c6qgjp3Z3SpGOEK1WdXMJN0vgt+wB6jCqaxMqIv8id1jDTo3nWbntaeT62OR WK1trZF30zFIueNfg2Q8aJBHYNLs5A4wLNitnvgJ3NAhN9Bph+PKSfzc/I+M38QqOdN6 GW3w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@plvision.eu header.s=selector2 header.b=fDt3RqCr; arc=pass (i=1 spf=pass spfdomain=plvision.eu dkim=pass dkdomain=plvision.eu dmarc=pass fromdomain=plvision.eu); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=plvision.eu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si2550283ejo.589.2021.06.10.09.09.49; Thu, 10 Jun 2021 09:10:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@plvision.eu header.s=selector2 header.b=fDt3RqCr; arc=pass (i=1 spf=pass spfdomain=plvision.eu dkim=pass dkdomain=plvision.eu dmarc=pass fromdomain=plvision.eu); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=plvision.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230289AbhFJQKf (ORCPT + 99 others); Thu, 10 Jun 2021 12:10:35 -0400 Received: from mail-eopbgr80113.outbound.protection.outlook.com ([40.107.8.113]:42247 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230166AbhFJQK3 (ORCPT ); Thu, 10 Jun 2021 12:10:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dV5o9n79T0v4OUO8/+EGtqv5k40wlD7fuf8IkfRKCjO2SHeGAyaPy+imQV7efFfKiBuZxiTkn5Iae4Vxr1bbhr0ztJAQA7Z5dAsWe24NsuzDFn+r5W7bRoaz6UEK/xh2RPQhQo8lSqteExhpMmbYPgXfJ9uvO7f9EEWOo/KH2mDrbYJcUtkbB5Im0GHLXcGnHJBoi7km4/jhnVc4f6pDmOBsB7ovfaZG0CdFHcYFP8t+cCv5/CASJSWHpXYeYPFh/kVvGd5mUNJwPT9EsOQ3NYXE4zO1YgE5mpRwjOm04ye4PS4UM0S7O0/d1B1cIOUoMOFGFJKKPW8Ov9fmOZiRAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NnS5ednMH6uQ+ILIKkfff6BrBZscg0rbdVfmhDJ6K2s=; b=gFRWZJtd05j9YzBf4bpnuzx8JXo5V1x7REIS/qeF8HIQZCpfilyJn3PVNqQ8Ic6Ixkbn1RXrXdWqi6x5x4SPqnIzO9aZD4B03hoNuFP+cZp8Fc2MsfCE5eABpmjYalWAwndO4wyBnQMuPPPVW+sKiVqbra6/8DcO7DOCMHxyMX1qX9ZSvi8foturQbxb01p4iOLNmSLiXCjhW0654Br0CXIMwyt39dTRnmAaKP2Pwxy4UEecY5d+62WGo/9HxdCqkHlDLrENuIZqum6zmlDyTn6S2wTNoXbzrqqWuVfzIgapsojyj1TIIV/Zk+S+X8fLknqADw10GF0y7qcX3zE7hg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=plvision.eu; dmarc=pass action=none header.from=plvision.eu; dkim=pass header.d=plvision.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plvision.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NnS5ednMH6uQ+ILIKkfff6BrBZscg0rbdVfmhDJ6K2s=; b=fDt3RqCrFFsdZ7zcEAxCZaPCy8RaiD/5xqZ9GVmqKSTYuLRQIS28gshtCbwWCOjfmG39XoD3x/L5qj8tIaYQYOoMmCQtpC+9wGysJcICz0ieTqrGxfCzrA+92KbRUDxddVs+9pIXZS/81hfEOEfXAo8kkVAh1xJBWL6NMpD2UJQ= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=plvision.eu; Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:56::28) by HE1P190MB0428.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:5c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.27; Thu, 10 Jun 2021 16:08:31 +0000 Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::e58c:4b87:f666:e53a]) by HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::e58c:4b87:f666:e53a%6]) with mapi id 15.20.4219.023; Thu, 10 Jun 2021 16:08:31 +0000 Date: Thu, 10 Jun 2021 19:08:28 +0300 From: Vadym Kochan To: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Andrew Lunn , Vladimir Oltean Cc: Taras Chornyi , linux-kernel@vger.kernel.org, Mickey Rachamim , Vadym Kochan Subject: Re: [PATCH v2 0/3] net: marvell: prestera: add LAG support Message-ID: <20210610160828.GB29315@plvision.eu> References: <20210610154311.23818-1-vadym.kochan@plvision.eu> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210610154311.23818-1-vadym.kochan@plvision.eu> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.20.186.93] X-ClientProxiedBy: AM0PR01CA0120.eurprd01.prod.exchangelabs.com (2603:10a6:208:168::25) To HE1P190MB0539.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:56::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from plvision.eu (217.20.186.93) by AM0PR01CA0120.eurprd01.prod.exchangelabs.com (2603:10a6:208:168::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20 via Frontend Transport; Thu, 10 Jun 2021 16:08:30 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 19206592-d135-4852-bacc-08d92c29fd96 X-MS-TrafficTypeDiagnostic: HE1P190MB0428: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y7E08zoH1fbRCtEp69SkcpWSG954YBzesbxOUuJEDKKXNHKCSreN9EhHApbA0p8xQW5NnzOZUASFObnG81mX9BXm/2Pg6/eR+4GrEahG5LxB6/EQj7ZxZaCVKlUdGqI0daQiLMZk48gIa9OdnYOd1IFXoPHUKPgQa1X28r/Sxj5LUfzP6ZD54FNdi1P8rtsEHoCJiUyRIUX47Agx73GKwM1UX+2E/idGskn7uHvtD3Jsd6/z4y5iuw+P6Ef4NYMbQd/Yrwvj5MmXjgY0g7TPLXRdBggs0lgrUrs4nt+alRjh0UeQJLeRX3995rCqp3tScM4nIdLeeQxcnU+GZWCW+ozcslaD2W/ev7rvz66ytuByUSm/5PfDl6mxM/qEN7VvRcwrwhKc8zjBs71X3fSEM6m+E5zLBQ21Sp++QqK3kRU7N7RvTfryIposNLRKhdecSyFWWxkTzsLRP7ZEM6kwykzHEMLFwW2zH3j+HftZRu4t4PNA4dc5R46pha2PNjukUVk1mftX4a76B4zCQgVHd22aSl+UmgG1w8UrNH9afTv0amCHUqXXJHkTis/7Q/A2e0N4zSCX826XjLxxo8004KUFR68MIx/xRZQyy258UMFZv8vdcB36u61ZN6Ip6DiDumwYk+XRfWmEC3df8dsSS6t2UMOcezAgaALFmPRmeSu5ZQnsICKqePBmVIqruDm6oF3a6lrYB3Pv65ytenNIzPeaGHjdclqNlGuTM9GCZio6ZyndR8p6tW5REk/8oZWw3e2eCKraVgu+VBaVWgvoiw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1P190MB0539.EURP190.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(396003)(346002)(136003)(366004)(39830400003)(376002)(110136005)(8936002)(26005)(36756003)(54906003)(8676002)(16526019)(956004)(186003)(8886007)(4326008)(44832011)(316002)(38350700002)(38100700002)(52116002)(966005)(478600001)(5660300002)(1076003)(86362001)(66946007)(66556008)(66476007)(55016002)(2616005)(33656002)(83380400001)(2906002)(7696005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?6mPBVCQ4TOIyoe/CuuRiPpYyqI1MqVITqX0I/z6zYXzUszNDHBRPFCGNlUMa?= =?us-ascii?Q?g9LtM3MGWx5Dg6zAIEZwz61RxfiTrBG/ipenTnldEq7lYhi0hRdWy9W1u/P6?= =?us-ascii?Q?pdl/G0JF/H40oizW41dn93F12fTmcvmqdOhYZupFYkOsboQSz3+Zg350I+eu?= =?us-ascii?Q?j+WcBhak6aRPn/O9wBlg3wVWw608Rbs3L3O5CyKyNd42YNV/KcQbBpeuTLtb?= =?us-ascii?Q?AB3g/N4AJgU8EXQGE235QuS1VLjYvyqQ1BSiIrCK0bEYVBhGjaEa4qSO3YQG?= =?us-ascii?Q?3/9ltM5EKWkVVnMSRrdxS7JdenmW2GrgRWDPZqgDBADfSOgsXT/aFZMpGrqL?= =?us-ascii?Q?8Wgzp1Rr24FgHseGMl841ZR2VFHjcoNGRcr9Wh9QS8gD8Fogw5anh8W9koG3?= =?us-ascii?Q?CvJRfKyN2RFZD0X6iybVGSOFjU9Hz3f/nMCeRooCqFZSVxt3AliSzTSKoGQc?= =?us-ascii?Q?xH5sER8z3U1v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change-CrossTenant-Network-Message-Id: 19206592-d135-4852-bacc-08d92c29fd96 X-MS-Exchange-CrossTenant-AuthSource: HE1P190MB0539.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2021 16:08:31.0600 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 03707b74-30f3-46b6-a0e0-ff0a7438c9c4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qJ52z+BXBMpaZNMnHHQiYREj1veBhWLgVbqOCQf/FeMgXnuoa2wMG41YHT9uKQQLaj6zuEVRtuOUcqDMgA+R30OvGJIYZfyLQ0r6SQAUl3o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1P190MB0428 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry, I did not mark it with a "net-next", will resend. On Thu, Jun 10, 2021 at 06:43:08PM +0300, Vadym Kochan wrote: > From: Vadym Kochan > > The following features are supported: > > - LAG basic operations > - create/delete LAG > - add/remove a member to LAG > - enable/disable member in LAG > - LAG Bridge support > - LAG VLAN support > - LAG FDB support > > Limitations: > > - Only HASH lag tx type is supported > - The Hash parameters are not configurable. They are applied > during the LAG creation stage. > - Enslaving a port to the LAG device that already has an > upper device is not supported. > > Changes extracted from: > > https://lkml.org/lkml/2021/2/3/877 > > and marked with "v2". > > v2: > > There are 2 additional preparation patches which simplifies the > netdev topology handling. > > 1) Initialize 'lag' with NULL in prestera_lag_create() [suggested by Vladimir Oltean] > > 2) Use -ENOSPC in prestera_lag_port_add() if max lag [suggested by Vladimir Oltean] > numbers were reached. > > 3) Do not propagate netdev events to prestera_switchdev [suggested by Vladimir Oltean] > but call bridge specific funcs. It simplifies the code. > > 4) Check on info->link_up in prestera_netdev_port_lower_event() [suggested by Vladimir Oltean] > > 5) Return -EOPNOTSUPP in prestera_netdev_port_event() in case [suggested by Vladimir Oltean] > LAG hashing mode is not supported. > > 6) Do not pass "lower" netdev to bridge join/leave functions. [suggested by Vladimir Oltean] > It is not need as offloading settings applied on particular > physical port. It requires to do extra upper dev lookup > in case port is in the LAG which is in the bridge on vlans add/del. > > Serhiy Boiko (1): > net: marvell: prestera: add LAG support > > Vadym Kochan (2): > net: marvell: prestera: move netdev topology validation to > prestera_main > net: marvell: prestera: do not propagate netdev events to > prestera_switchdev.c > > .../net/ethernet/marvell/prestera/prestera.h | 30 +- > .../ethernet/marvell/prestera/prestera_hw.c | 180 +++++++++++- > .../ethernet/marvell/prestera/prestera_hw.h | 14 + > .../ethernet/marvell/prestera/prestera_main.c | 267 +++++++++++++++++- > .../marvell/prestera/prestera_switchdev.c | 163 ++++++----- > .../marvell/prestera/prestera_switchdev.h | 7 +- > 6 files changed, 573 insertions(+), 88 deletions(-) > > -- > 2.17.1 >