Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3938755pxb; Mon, 8 Feb 2021 04:07:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxg6bFEWq5HZh+O5KDZjD/0iey/X5MOW0V12/SEtbEGGuuSfaNmFV8PU+MwZCLWB35t88x/ X-Received: by 2002:a50:acc1:: with SMTP id x59mr16697800edc.43.1612786066320; Mon, 08 Feb 2021 04:07:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612786066; cv=none; d=google.com; s=arc-20160816; b=HNeF6qKEqtVJVzgWSFjnrEVa2Pxq0xCb62YK3PfFwv7aYta2mBvVpUP93QXZx4HUhd 9LLAPNs5D7irTho195u8bFv+k8dOzavE7lcy+0NjPIa8vGXCoXFpzgRLqwU+Tbvwo9Xh vJQ6Zu7gGAOsV3XJgHz5HSulT66DBEB+UERe/7VyPRYNGJ+nX/d0/6/40OW8FNmtfOFE l8fMSPjS7rAaVJbjudW3FbDgrz1wdIn6golnKT33xLNUv21LzNtbDxulusM7azk/uBrT br7YtpRki6jwsisPPjXtLpnIJeQC1oMKKB81tRF9DujN0bqzF1Bmex1seHOQ4t3lJzqe xiXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9pa9egMr6HuhpySJFZ922xtVve+4BTGS+NR78QDKpmA=; b=spzkRYZEOl+0Wp661IFuMmiBb0O9u3ilBDv5e2CUiOkc4CChvLxECT9DsOr4Q6gVO1 msDCp4yv9CHNaV+2mX8y8uunO30HazSTexZRYcd+AxLiqQ+bFl3s6kNZKPvSOi4RRs9W +hbQN8mV+jF1cWZ5j893BvZhaWUaz9QBAvpNjX6mb/9DaJ78UT0xoI8ELhhMc4jvBq+c V2QF4lLLSU33BM7VNUAeBsHeZNAdBdsomHCPOmhM6gx8JBfVaagHxLUspFpNIP+GiVgu TxyuGOsQdsr0V0rwcfJ3r1HtrjR/CGC37GMzZ83BLGI5lWqwf7cFhQsZh2BWg5IAUhKb ii/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=seQRViNZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c10si11440617ejf.281.2021.02.08.04.07.20; Mon, 08 Feb 2021 04:07:46 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=seQRViNZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232839AbhBHMGq (ORCPT + 99 others); Mon, 8 Feb 2021 07:06:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233397AbhBHLp4 (ORCPT ); Mon, 8 Feb 2021 06:45:56 -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 7475CC06174A; Mon, 8 Feb 2021 03:45:15 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id df22so17720222edb.1; Mon, 08 Feb 2021 03:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9pa9egMr6HuhpySJFZ922xtVve+4BTGS+NR78QDKpmA=; b=seQRViNZMkrvWnMY2i5wu0KjU3Wfsa+YhEAmbH7bVQjptTdGrXj0iOCqBY5XKau/lF Fs6TSVcEXddjrKILQYYbay7a9toHDoY9DBU+TLWLtsuVkuCdg6JViiburY0hin1OAEmU 1MiOtEiCM2VWB7DT+mIUqRAoLLJXtDyBXAZr3ZXgzYTn3iIX4yDV/W1YfaNuawtMsEbT vpTQmnP6PafDQm+rcOeJ9sR870pMYmcrCx/NjxVJcXADl1+xXNjxX753OYJfdC1vXYrd C8u4HzVz7JmTKuyDdNNPjy1XV8pOqXmXrfRz/Tq/CIpYvkwIDGo1ASNYEtjLBc32+u5K Kw+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9pa9egMr6HuhpySJFZ922xtVve+4BTGS+NR78QDKpmA=; b=NayejDsT3xqhn2bfcYzYIutaye25IsCVA4+L6UvRW+SXzduGilTqqMsFH87I1BXwgJ 3BqZ4Sxt4puQWvlPP+xISoAy/70lYM2VV/XzG38XVQTlGqZWPlCkEq9oSz5+XV1AjxhK baZ7DyZH1OZ7Q+gBiafeVMkAxoyWutHCSJrugBwaOt5SP74M0NIhw50xr6qTw/IOcUcu EuzrY5rjAs/UYz+G75jAzDM5TCN1QWaKu3nw6CV81zAJ44PJSd64UuyzvnWzEGSm7Iut l9BsoDB3yjghzqoRfslRuIzBAiK02zrqeA1BYj9aFkU1Rj/fmYOn2HncZjvXclDu5psJ OzbA== X-Gm-Message-State: AOAM532kb6rj4LqSWTDpXu/pcOgTqSHbqmmrxCKK32xw3Uk6ztxA4CEl edK76yfXdJsL52qXbGMIEzc= X-Received: by 2002:a05:6402:149a:: with SMTP id e26mr17017083edv.254.1612784714113; Mon, 08 Feb 2021 03:45:14 -0800 (PST) Received: from skbuf (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id b3sm9426102edw.14.2021.02.08.03.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 03:45:13 -0800 (PST) Date: Mon, 8 Feb 2021 13:45:11 +0200 From: Vladimir Oltean To: Nikolay Aleksandrov Cc: Jakub Kicinski , "David S. Miller" , Andrew Lunn , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, Roopa Prabhu , Jiri Pirko , Ido Schimmel , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Vadym Kochan , Taras Chornyi , Grygorii Strashko , Ioana Ciornei , Ivan Vecera , linux-omap@vger.kernel.org Subject: Re: [PATCH net-next 2/9] net: bridge: offload initial and final port flags through switchdev Message-ID: <20210208114511.xtzma5byrdnr5s7r@skbuf> References: <20210207232141.2142678-1-olteanv@gmail.com> <20210207232141.2142678-3-olteanv@gmail.com> <95dede91-56aa-1852-8fbf-71d446fa7ede@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95dede91-56aa-1852-8fbf-71d446fa7ede@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 08, 2021 at 01:37:03PM +0200, Nikolay Aleksandrov wrote: > Hi Vladimir, > I think this patch potentially breaks some use cases. There are a few problems, I'll > start with the more serious one: before the ports would have a set of flags that were > always set when joining, now due to how nbp_flags_change() handles flag setting some might > not be set which would immediately change behaviour w.r.t software fwding. I'll use your > example of BR_BCAST_FLOOD: a lot of drivers will return an error for it and any broadcast > towards these ports will be dropped, we have mixed environments with software ports that > sometimes have traffic (e.g. decapped ARP requests) software forwarded which will stop working. Yes, you're right. The only solution I can think of is to add a "bool ignore_errors" to nbp_flags_change, set to true from new_nbp and del_nbp, and to false from the netlink code. > The other lesser issue is with the style below, I mean these three calls for each flag are > just ugly and look weird as you've also noted, since these APIs are internal can we do better? Doing better would mean allowing nbp_flags_change() to have a bit mask with potentially more brport flags set, and to call br_switchdev_set_port_flag in a for_each_set_bit() loop?