From nobody Tue Jan 24 20:48:19 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 4P1fFH5S4bz3bSnv; Tue, 24 Jan 2023 20:48:19 +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 4P1fFH4vymz41k3; Tue, 24 Jan 2023 20:48:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674593299; 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=vGNnCIqn8ZBXPUayVGpESaER/LMJe4qtpDYbmLJlcWI=; b=Ot+pZ5Z74GEuAASLvX/c/37BZpBZAVckd01GsCYU5d8LT3IhRKev1KgvKZDESeJ71gAWkg 9spaEoCCg7SkOppzSiXGUeZGuC/svXa4/2jEzl0NyD4pl73q27J4v1aqXVb47kERxZwwed YVb1mGOKPTwHZdINOdL5yTI1bPtPqJw3tKxS7w/FBN+Oq5feLXw04e6m51Py6FplwXFvL5 9IbJq4EzJiJLpFqLuxeQViO+N3i14v5lapuZjDKi3PyWsDBzN/1+k4cUfUiUUzM50teLLs AZzOVdb4/FG0uCuB9GVup0FwRjftlxCNMCoO3b/1riF2jqX/YK3KdCQad8PZ9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674593299; 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=vGNnCIqn8ZBXPUayVGpESaER/LMJe4qtpDYbmLJlcWI=; b=G+tAmuIh/ghDo1NFWdQwP+rSfVVBCMTRVccPb2HQFjadsAapnRQMWaSKj4DAaoc9ghcaGU Bi/iqToekqePshiD/+Xfest5KOFlz1DxmNeeimK558ro9lk/1Zw7BhABSTY5unL9E84SMv TTA0zT7LZ+j9VSl7on3Oz3RmaMX48eyppyeZXyhRmTG3LgvRrO2u6p/v4D6kEFsewFlLeY ZLUKct9W9vydCTY9wcPOH7yn6Fmyxak3M+4zOttbhBzWbjdP+UBI1FRHx4a8hLhpHB2RrF pITMXuSYFi/rh9szSm6XLgCDI3fOkWUNkDYn7Tlsl1720+qLkjehwH17gG8w8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674593299; a=rsa-sha256; cv=none; b=waNO8ZKlwlUu0Te8yTWqiVax6KDYVaa6cJTT/HH6A+KqGlN9DQmM30XXxqfjpJctLsB7e0 yAKgfG1NevdvY3SVMIvY+QU1n5WTNYaRFIkwR/SslfPUwADuH4o7R4gteScpxF0qyzLaSy 6OZ9QE2DmPBtE+K4zntiuJGYuoorO4k4hS7kyc1WAnFTKOU+248D/5Rl++usn0ZXK1PgX1 Zx4QeKDciN2iRiuqZNWThkrsFPAFDgcg1RulvDzqxQWGjB317wUgbQ8dSvnyUm4dqTziwY f+x7xkn0Q4b3ovS9U55LYK0esr76Dov26leuOV+TuEHElB9wHarGh2RqXxZBBA== 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 4P1fFH3zKSzN6P; Tue, 24 Jan 2023 20:48:19 +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 30OKmJOB053796; Tue, 24 Jan 2023 20:48:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OKmJ0w053795; Tue, 24 Jan 2023 20:48:19 GMT (envelope-from git) Date: Tue, 24 Jan 2023 20:48:19 GMT Message-Id: <202301242048.30OKmJ0w053795@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: d8096b2df282 - main - Mechanically convert iavf(4) to IfAPI 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: d8096b2df282d7a50e56eddba523bcdda1676106 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=d8096b2df282d7a50e56eddba523bcdda1676106 commit d8096b2df282d7a50e56eddba523bcdda1676106 Author: Justin Hibbits AuthorDate: 2022-08-19 15:55:36 +0000 Commit: Justin Hibbits CommitDate: 2023-01-24 19:36:29 +0000 Mechanically convert iavf(4) to IfAPI Reviewed by: erj Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37858 --- sys/dev/iavf/iavf_iflib.h | 2 +- sys/dev/iavf/iavf_lib.c | 6 +++--- sys/dev/iavf/iavf_lib.h | 4 ++-- sys/dev/iavf/if_iavf_iflib.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/dev/iavf/iavf_iflib.h b/sys/dev/iavf/iavf_iflib.h index 33d5243496c8..f670cb901ba4 100644 --- a/sys/dev/iavf/iavf_iflib.h +++ b/sys/dev/iavf/iavf_iflib.h @@ -238,7 +238,7 @@ struct iavf_rx_queue { struct iavf_vsi { if_ctx_t ctx; if_softc_ctx_t shared; - struct ifnet *ifp; + if_t ifp; struct iavf_sc *back; device_t dev; struct iavf_hw *hw; diff --git a/sys/dev/iavf/iavf_lib.c b/sys/dev/iavf/iavf_lib.c index 9b4ec425f1a9..61de2a438c12 100644 --- a/sys/dev/iavf/iavf_lib.c +++ b/sys/dev/iavf/iavf_lib.c @@ -968,7 +968,7 @@ iavf_media_status_common(struct iavf_sc *sc, struct ifmediareq *ifmr) * @returns ENODEV because changing the media and speed is not supported. */ int -iavf_media_change_common(struct ifnet *ifp) +iavf_media_change_common(if_t ifp) { if_printf(ifp, "Changing speed is not supported\n"); @@ -984,7 +984,7 @@ iavf_media_change_common(struct ifnet *ifp) * reports speed to us over the virtchnl interface. */ void -iavf_set_initial_baudrate(struct ifnet *ifp) +iavf_set_initial_baudrate(if_t ifp) { #if __FreeBSD_version >= 1100000 if_setbaudrate(ifp, IF_Gbps(40)); @@ -1210,7 +1210,7 @@ iavf_config_rss(struct iavf_sc *sc) int iavf_config_promisc(struct iavf_sc *sc, int flags) { - struct ifnet *ifp = sc->vsi.ifp; + if_t ifp = sc->vsi.ifp; sc->promisc_flags = 0; diff --git a/sys/dev/iavf/iavf_lib.h b/sys/dev/iavf/iavf_lib.h index b57299a4eaa6..d0e1d6e53c2d 100644 --- a/sys/dev/iavf/iavf_lib.h +++ b/sys/dev/iavf/iavf_lib.h @@ -487,8 +487,8 @@ void iavf_add_sysctls_eth_stats(struct sysctl_ctx_list *ctx, struct sysctl_oid_list *child, struct iavf_eth_stats *eth_stats); void iavf_media_status_common(struct iavf_sc *sc, struct ifmediareq *ifmr); -int iavf_media_change_common(struct ifnet *ifp); -void iavf_set_initial_baudrate(struct ifnet *ifp); +int iavf_media_change_common(if_t ifp); +void iavf_set_initial_baudrate(if_t ifp); u64 iavf_max_vc_speed_to_value(u8 link_speeds); void iavf_config_rss_reg(struct iavf_sc *sc); void iavf_config_rss_pf(struct iavf_sc *sc); diff --git a/sys/dev/iavf/if_iavf_iflib.c b/sys/dev/iavf/if_iavf_iflib.c index 848ad682ef0b..71d14ca7b701 100644 --- a/sys/dev/iavf/if_iavf_iflib.c +++ b/sys/dev/iavf/if_iavf_iflib.c @@ -761,7 +761,7 @@ iavf_if_init(if_ctx_t ctx) /* Make sure queues are disabled */ iavf_disable_queues_with_retries(sc); - bcopy(IF_LLADDR(ifp), tmpaddr, ETHER_ADDR_LEN); + bcopy(if_getlladdr(ifp), tmpaddr, ETHER_ADDR_LEN); if (!cmp_etheraddr(hw->mac.addr, tmpaddr) && (iavf_validate_mac_addr(tmpaddr) == IAVF_SUCCESS)) { error = iavf_del_mac_filter(sc, hw->mac.addr); @@ -1540,12 +1540,12 @@ iavf_setup_interface(struct iavf_sc *sc) { struct iavf_vsi *vsi = &sc->vsi; if_ctx_t ctx = vsi->ctx; - struct ifnet *ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); iavf_dbg_init(sc, "begin\n"); vsi->shared->isc_max_frame_size = - ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN; iavf_set_initial_baudrate(ifp);