From owner-svn-src-head@freebsd.org Tue Feb 6 08:34:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7422EE33B2; Tue, 6 Feb 2018 08:34:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 692327D537; Tue, 6 Feb 2018 08:34:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63F8E15766; Tue, 6 Feb 2018 08:34:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w168YoKu025638; Tue, 6 Feb 2018 08:34:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w168YooN025637; Tue, 6 Feb 2018 08:34:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201802060834.w168YooN025637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 6 Feb 2018 08:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328922 - head/sys/dev/etherswitch X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/dev/etherswitch X-SVN-Commit-Revision: 328922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2018 08:34:50 -0000 Author: adrian Date: Tue Feb 6 08:34:50 2018 New Revision: 328922 URL: https://svnweb.freebsd.org/changeset/base/328922 Log: [etherswitch] add initial support for potentially configuring and fetching the switch MAC address. Switches that originate their own frames (eg obvious ones like Pause frames) need a MAC address to use to send those frames from. This API will hopefully begin to allow that to be configurable. Modified: head/sys/dev/etherswitch/etherswitch.h Modified: head/sys/dev/etherswitch/etherswitch.h ============================================================================== --- head/sys/dev/etherswitch/etherswitch.h Tue Feb 6 07:50:30 2018 (r328921) +++ head/sys/dev/etherswitch/etherswitch.h Tue Feb 6 08:34:50 2018 (r328922) @@ -48,10 +48,12 @@ typedef struct etherswitch_info etherswitch_info_t; #define ETHERSWITCH_CONF_FLAGS (1 << 0) #define ETHERSWITCH_CONF_MIRROR (1 << 1) #define ETHERSWITCH_CONF_VLAN_MODE (1 << 2) +#define ETHERSWITCH_CONF_SWITCH_MACADDR (1 << 3) struct etherswitch_conf { uint32_t cmd; /* What to configure */ uint32_t vlan_mode; /* Switch VLAN mode */ + struct ether_addr switch_macaddr; /* Switch MAC address */ }; typedef struct etherswitch_conf etherswitch_conf_t;