From nobody Tue Jan 31 20:03:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P5ww92Fcjz3c8Tv; Tue, 31 Jan 2023 20:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P5ww90XMMz3DCJ; Tue, 31 Jan 2023 20:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675195401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s1D68JQ/R2xj12DUN5w/rfJCYfQjbNfahE6LEyZ3tKo=; b=UNrD0xfK4kPFWR5ZM6N5IoHJeI5gVM5kVvWJnyv4ieXfk21Do29Pm4sCjjZz/7b+mnv+2k VuPHqv4BLhlWmBBjcOnMLtRN2iz+UPEALcnFWFO0eq1PSy+tla0UOBY1ZfwSu93UGcS+VW mhTci0BucUYcVL6VSzyYFKLqleWmOe+NsX+kq2G7IpPu2Dm0vlPeY7w6aUA9PhYMzinTC9 fTMWAxClJWVvqDDYFeExzhgNX1UGjQ104nJ4oS4u4vE/wZ7f8t5Gdyg3PwmsB6jRqzymLA G9noQ2wsEtRGRKujl4tthVA6guYe7W3SoJGw0APUQK3YtRiittzLeXlgLkdTYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675195401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s1D68JQ/R2xj12DUN5w/rfJCYfQjbNfahE6LEyZ3tKo=; b=VRkVsR6bt59RVtSIBshxVz0FoH8VPaXJbQdNGtPWqMecSjglcDqIfhMXTv9SjDOsU+X/Nn 60UfNLpqWjXPhSDJUe4ChLpXCh3KDLpElXEj2I0wQmgDYRVWIYSdBVK5Cibkh4duyIZR2o 1CmICvN7HZeBZJVKZzbDVx3v6tltemIE8Q8qEtdl3kopuO1BMW3nknlxDUfkYPHJqP8DXX HJY/NUuk3PaqDxQj3vmSEp9Sd0lz4rDn0BuWRRVpIz8VJ8hLzQp0NtrfJRyKYQ2rLHJuIc 76Iq/tiNq8Mw7zB8XsauZ8uP4yBIMbt64iq37y0a5YixvBktyfio59aJsG3Q3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675195401; a=rsa-sha256; cv=none; b=etd5uW7lYFWY7P0SZ3kG3QbvL99GwrtDJZqiugcFKMBXglwr0/sQcbvQSczv/Sy5EqaxW0 GCmpi3ySeE8xv6fgTypXRHnspb3bLLHWu+hdbeVd/u3DRA26uTDaOwjjuVqFCp/nHWbCZG N50Yv8LrQ0oSbJVCedUHZ8LBlMdeFq6fvMURynRDdNJaBpOThHJHBh+MO3XejvRbp4bPvq 13nVLV4b0ww1LjHqOMsW/bZrjZbHvkdi7DejqRgiKv4WCmsEZOvqZVtoIk1GBNiwrbKKxt EWxgwtg80O3cI5Sc8noZ1Brhp/an1+0sfOuTt4R4SNdvquVUi2+HThdyL4Cf1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P5ww86KjRz12NN; Tue, 31 Jan 2023 20:03:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30VK3K3W025022; Tue, 31 Jan 2023 20:03:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30VK3KXk025021; Tue, 31 Jan 2023 20:03:20 GMT (envelope-from git) Date: Tue, 31 Jan 2023 20:03:20 GMT Message-Id: <202301312003.30VK3KXk025021@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 31cfaf191b08 - main - IfAPI: Add l2com accessor for firewire. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31cfaf191b0861d54ce8e212c77b458fd8fc018e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=31cfaf191b0861d54ce8e212c77b458fd8fc018e commit 31cfaf191b0861d54ce8e212c77b458fd8fc018e Author: Justin Hibbits AuthorDate: 2023-01-25 19:45:53 +0000 Commit: Justin Hibbits CommitDate: 2023-01-31 20:02:17 +0000 IfAPI: Add l2com accessor for firewire. Summary: Firewire is the only device driver that accesses the l2com member, all other accesses are handled within the netstack itself. Sponsored by: Juniper Networks, Inc. Reviewed by: glebius, melifaro Differential Revision: https://reviews.freebsd.org/D38203 --- sys/net/firewire.h | 2 +- sys/net/if.c | 6 ++++++ sys/net/if_var.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/net/firewire.h b/sys/net/firewire.h index dd7d23e49e73..527113aec720 100644 --- a/sys/net/firewire.h +++ b/sys/net/firewire.h @@ -131,7 +131,7 @@ struct fw_com { uint16_t fc_node; /* our nodeid */ struct fw_reass_list fc_frags; /* partial datagrams */ }; -#define IFP2FWC(ifp) ((struct fw_com *)(ifp)->if_l2com) +#define IFP2FWC(ifp) ((struct fw_com *)if_getl2com(ifp)) extern void firewire_input(struct ifnet *ifp, struct mbuf *m, uint16_t src); extern void firewire_ifattach(struct ifnet *, struct fw_hwaddr *); diff --git a/sys/net/if.c b/sys/net/if.c index ac8b6963172d..2ab12d1ac313 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4941,6 +4941,12 @@ if_getpcp(if_t ifp) return (ifp->if_pcp); } +void * +if_getl2com(if_t ifp) +{ + return (ifp->if_l2com); +} + #ifdef DDB static void if_show_ifnet(struct ifnet *ifp) diff --git a/sys/net/if_var.h b/sys/net/if_var.h index be7a5f059a7e..dbf8796865f0 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -644,6 +644,7 @@ struct label *if_getmaclabel(if_t ifp); void if_setmaclabel(if_t ifp, struct label *label); struct bpf_if *if_getbpf(if_t ifp); uint8_t if_getpcp(if_t ifp); +void *if_getl2com(if_t ifp); struct ifvlantrunk *if_getvlantrunk(if_t ifp); void *if_getafdata(if_t ifp, int);