From mboxrd@z Thu Jan 1 00:00:00 1970 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=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 1A96DC433E2 for ; Fri, 4 Sep 2020 13:42:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC3F821741 for ; Fri, 4 Sep 2020 13:42:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730507AbgIDNmf (ORCPT ); Fri, 4 Sep 2020 09:42:35 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:42872 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730480AbgIDNeW (ORCPT ); Fri, 4 Sep 2020 09:34:22 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kEBpB-00DCNS-G7; Fri, 04 Sep 2020 15:32:17 +0200 Date: Fri, 4 Sep 2020 15:32:17 +0200 From: Andrew Lunn To: Vadym Kochan Cc: Willem de Bruijn , "David S. Miller" , Jakub Kicinski , Jiri Pirko , Ido Schimmel , Oleksandr Mazur , Serhiy Boiko , Serhiy Pshyk , Volodymyr Mytnyk , Taras Chornyi , Andrii Savka , Network Development , linux-kernel , Andy Shevchenko , Mickey Rachamim Subject: Re: [PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices Message-ID: <20200904133217.GJ3112546@lunn.ch> References: <20200902150442.2779-1-vadym.kochan@plvision.eu> <20200902150442.2779-2-vadym.kochan@plvision.eu> <20200904093252.GA10654@plvision.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200904093252.GA10654@plvision.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > +static int prestera_is_valid_mac_addr(struct prestera_port *port, u8 *addr) > > > +{ > > > + if (!is_valid_ether_addr(addr)) > > > + return -EADDRNOTAVAIL; > > > + > > > + if (memcmp(port->sw->base_mac, addr, ETH_ALEN - 1)) > > > > Why ETH_ALEN - 1? > > > This is the restriction of the port mac address, it must have base mac > address part at first 5 bytes. You probably want to put a comment here about that. And this is particularly user unfriendly. Is this a hardware issue? Or firmware? Is this likely to change in the future? Andrew