Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp15265ybi; Thu, 1 Aug 2019 13:44:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq3REj29Zn1Yz7gIyjR6ExGe4eGx+VV0ehuVK6crPU8vDxOrGQX789+dL4aYulZWHkk9xK X-Received: by 2002:a17:90a:ad86:: with SMTP id s6mr705650pjq.42.1564692289789; Thu, 01 Aug 2019 13:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564692289; cv=none; d=google.com; s=arc-20160816; b=puaX7xczcN0mvCF9bvKLCYCmuPfYQQt1iEXrP9FyRvVHy33H5NqatgWT7xWnFBXw39 wb7QzbS8wqtgj8MxBIljfO1qVfZoxWWawE/fvIGuO5WQtyA9TIRxNi070Nf5yKCEB8tG zuLf7rXHbYb2aFzwd9hf6nHuV+2oIeKMRNfMoD1JUQxk5s6wsYtQmtYhhTpJ1EIUev21 M8JAPbixh6shdFZ9SDMOhMeAmndPKOQb4wQjgpfH2JEEQbjo/3OkF7wH+4/Zkei8LJ/R n+pkh6wUJwgedIDXL3qPeNUl9fW75t4WfDuXAkA48bE/yrsLgxUNkpjr/HSO97iCVlsf pxXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=fIQu2BJ7SZ2LvN6WSlDXCuvVN5R5MhAra64T1PBksOI=; b=Q4unB1fM2xPHN67+p8W7kt5Y7wO3rzYadZ1bv1PkGDleBRpZ1uJpjUw3HRy2IX9FCo 4H27XLHHZAfCMIdy0bCHUk1eSe6TGc3d0bJtz8VIeQ0jGGlJzU+Ax3pgfwCwM0RLdC+j lK4N2aCbG5/KKMtJUbW/lxrkJCpeVngsmNgZB2/Fwy8N6Bpb3kV0pynJBJXFPo+NpgyD YUmGZ6nKdrDfkDp0lDQXyu2HhjBJr5f4FrAhRhYl8jdCU21iGhz3A19/5Du+/OyJkj7T P7+ucYDZTbmaOH46hEIRmkClP8Ur1IhGcGOe1cfhrsC45/eS190d6F0OHkoXK4aWNMeD +BBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v18si35903229pfm.145.2019.08.01.13.44.32; Thu, 01 Aug 2019 13:44:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732102AbfHAUnv (ORCPT + 99 others); Thu, 1 Aug 2019 16:43:51 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:60718 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725846AbfHAUnv (ORCPT ); Thu, 1 Aug 2019 16:43:51 -0400 Received: from localhost (c-24-20-22-31.hsd1.or.comcast.net [24.20.22.31]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 8D0C915408812; Thu, 1 Aug 2019 13:43:48 -0700 (PDT) Date: Thu, 01 Aug 2019 16:43:45 -0400 (EDT) Message-Id: <20190801.164345.1007767435484564146.davem@davemloft.net> To: vivien.didelot@gmail.com Cc: linux-kernel@vger.kernel.org, rasmus.villemoes@prevas.dk, f.fainelli@gmail.com, andrew@lunn.ch, netdev@vger.kernel.org Subject: Re: [PATCH net-next 0/5] net: dsa: mv88e6xxx: avoid some redundant VTU operations From: David Miller In-Reply-To: <20190801183637.24841-1-vivien.didelot@gmail.com> References: <20190801183637.24841-1-vivien.didelot@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 01 Aug 2019 13:43:48 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vivien Didelot Date: Thu, 1 Aug 2019 14:36:32 -0400 > The mv88e6xxx driver currently uses a mv88e6xxx_vtu_get wrapper to get a > single entry and uses a boolean to eventually initialize a fresh one. > > However the fresh entry is only needed in one place and mv88e6xxx_vtu_getnext > is simple enough to call it directly. Doing so makes the code easier to read, > especially for the return code expected by switchdev to honor software VLANs. > > In addition to not loading the VTU again when an entry is already correctly > programmed, this also allows to avoid programming the broadcast entries > again when updating a port's membership, from e.g. tagged to untagged. > > This patch series removes the mv88e6xxx_vtu_get wrapper in favor of direct > calls to mv88e6xxx_vtu_getnext, and also renames the _mv88e6xxx_port_vlan_add > and _mv88e6xxx_port_vlan_del helpers using an old underscore prefix convention. > > In case the port's membership is already correctly programmed in hardware, > the following debug message may be printed: > > [ 745.989884] mv88e6085 2188000.ethernet-1:00: p4: already a member of VLAN 42 Series applied, thanks Vivien.