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.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 4ED65CA9EAC for ; Sat, 19 Oct 2019 18:52:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 18B9E21925 for ; Sat, 19 Oct 2019 18:52:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="K8xstA52" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726300AbfJSSwg (ORCPT ); Sat, 19 Oct 2019 14:52:36 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:53984 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbfJSSwg (ORCPT ); Sat, 19 Oct 2019 14:52:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=G2eCqvz0itTvdMCSxflnan9+fRptCzD1xTEXR/ZXSi0=; b=K8xstA52wUE9UmyaSg3l9iVw6a jehgK4VNyb4kXxd2czvJ2Vt0e3kOLgRmfTh69qC0wHWhj4x+JunjzB1vLSQE7k1/wpQK8FYTd6AdV 2U49Nzw5R4GyhiXnYZadFazDDhHY84Y4zcotwzoQZTvYU/cbi0EwxITienPaQwe4/oQ4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.92.2) (envelope-from ) id 1iLtph-0006Vf-Dq; Sat, 19 Oct 2019 20:52:09 +0200 From: Andrew Lunn To: David Miller Cc: netdev , Vivien Didelot , Andrew Lunn Subject: [PATCH net-next v4 0/2] mv88e6xxx: Allow config of ATU hash algorithm Date: Sat, 19 Oct 2019 20:51:59 +0200 Message-Id: <20191019185201.24980-1-andrew@lunn.ch> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The Marvell switches allow the hash algorithm for MAC addresses in the address translation unit to be configured. Add support to the DSA core to allow DSA drivers to make use of devlink parameters, and allow the ATU hash to be get/set via such a parameter. v2: Pass a pointer for where the hash should be stored, return a plain errno, or 0. Document the parameter. v3: Document type of parameter, and valid range Add break statements to default clause of switch Directly use ctx->val.vu8 v4: Consistently use devlink, not a mix of devlink and dl. Fix allocation of devlink priv Remove upper case from parameter name Make mask 16 bit wide. Andrew Lunn (2): net: dsa: Add support for devlink device parameters net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm. .../networking/devlink-params-mv88e6xxx.txt | 7 + MAINTAINERS | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 132 +++++++++++++++++- drivers/net/dsa/mv88e6xxx/chip.h | 4 + drivers/net/dsa/mv88e6xxx/global1.h | 3 + drivers/net/dsa/mv88e6xxx/global1_atu.c | 32 +++++ include/net/dsa.h | 23 +++ net/dsa/dsa.c | 48 +++++++ net/dsa/dsa2.c | 7 +- 9 files changed, 255 insertions(+), 2 deletions(-) create mode 100644 Documentation/networking/devlink-params-mv88e6xxx.txt -- 2.23.0