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=-3.8 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 0719DC43463 for ; Sun, 20 Sep 2020 00:31:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1A4120773 for ; Sun, 20 Sep 2020 00:31:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726853AbgITAbr (ORCPT ); Sat, 19 Sep 2020 20:31:47 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:45656 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbgITAbr (ORCPT ); Sat, 19 Sep 2020 20:31:47 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kJnGK-00FR5b-RV; Sun, 20 Sep 2020 02:31:28 +0200 Date: Sun, 20 Sep 2020 02:31:28 +0200 From: Andrew Lunn To: Ansuel Smith Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , "David S. Miller" , Jakub Kicinski , Heiner Kallweit , Russell King , Frank Rowand , Boris Brezillon , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v2 4/4] dt-bindings: net: Document use of mac-address-increment Message-ID: <20200920003128.GC3673389@lunn.ch> References: <20200919223026.20803-1-ansuelsmth@gmail.com> <20200919223026.20803-5-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200919223026.20803-5-ansuelsmth@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + mac-address-increment: > + description: > + The MAC address can optionally be increased (or decreased using > + negative values) from the original value readed (from a nvmem cell Read is irregular, there is no readed, just read. > + for example). This can be used if the mac is readed from a dedicated > + partition and must be increased based on the number of device > + present in the system. You should probably add there is no underflow/overflow to other bytes of the MAC address. 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00. > + minimum: -255 > + maximum: 255 > + > + mac-address-increment-byte: > + description: > + If 'mac-address-increment' is defined, this will tell what byte of > + the mac-address will be increased. If 'mac-address-increment' is > + not defined, this option will do nothing. > + default: 5 > + minimum: 0 > + maximum: 5 Is there a real need for this? A value of 0 seems like a bad idea, since a unicast address could easily become a multicast address, which is not valid for an interface address. It also does not seem like a good idea to allow the OUI to be changed. So i think only bytes 3-5 should be allowed, but even then, i don't think this is needed, unless you do have a clear use case. Andrew