From nobody Tue Feb 14 15:36:16 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 4PGQKX6Xs1z3s4w9; Tue, 14 Feb 2023 15:36:16 +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 4PGQKX5bxYz4L2c; Tue, 14 Feb 2023 15:36:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388976; 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=1GO16mAO3OO9pqBI7R7KPwGIEUdBRl8880f5Tqcxv5E=; b=EoYIn4lRiJmAkFo+1WKSPInWtqOQSnLSiqO2S87f7ilTCwepudlar3IrjndSBlR24WDOKk xO6TBE5qFg1hOCjigeM78s1ZcW9ltNahKvylPXcInKJ7dIDi5pIaLJr59sJWiLCMeI37Km Y51exCt+au0alYagCthLgwfZnI0F3E84IZSrQJ+31AYwAdKvZixLmhQJ6qHBzxQvXEPNcl 0pyjzpbZJaCl3Ub5V5DVOxOyHwAMVVTg9JI+22yx6fdWBmiNPFN5QoP8PCkPtC/NPfkeip QjB5lZIa79MAaJ8BiDsX16QM1kVDOOv0ddUpFbk4N2tzkGWO/dOIIfe4OaSgpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388976; 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=1GO16mAO3OO9pqBI7R7KPwGIEUdBRl8880f5Tqcxv5E=; b=wuPXgkpdL7Cdr8LCn0u9/On1A1p5zZF6gDv0JTAdHJ9BAztm/dAxZgBvJmbSQawS76P1UI gjweeUTzK+orEQUu5K9FFpFdLJWe9pmiEBH3rBTSqobhz4fT2Qq2/RSHLdfGIn/h5qJKlr Y1o4HRdu8c6ZD84PKrTotVPbX5DRbDL0c/P8cs2XUVx5PSxpkkqk2JnD5f0jBZ7fe2ULAh bDTHqKEDN/ZSKr//sAKGVpQhmmRqc5oGLVL03Jx3qkiE99ZEe+15Un3V5Glbj0oezTUX+h xoR+I6Vy5seWHF3Vbk9lXuCYbNgAH1VIrHBPokrekkxqXDF85xShtVAjdk1cww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388976; a=rsa-sha256; cv=none; b=jEJmJ37QfmUdfva/TUFyBtgN4aARbzPALdX/nxhbMepY7wY1YZHH42AnGppWaQwXrsS0ZL FPwIUsFsaWOt3x9KGqINein4CQVdfyclby2bYKyu0TJVcFz4jFcCrOXJc72OlMzrApEzhz CeicIDDg11HZsAn5+Dc6nwrjBoIxL+QC5SxFqJsnY1LM3fxKgCQmRvE9QtwWzJ4Ne3mf0Z uhwSjZi4vHgLZUe8A0Mth5AOb9FKn2krGq0kVrQACuh7zFGpaJe9XEAlSNPsck+sUdxPTk 8N7bQeQb5vEqV2uHpfyjR34ylGUZzIu4f7pkDunbr8KSM23+eJuw5NlFHjQ2zA== 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 4PGQKX4X4Yz13Vd; Tue, 14 Feb 2023 15:36:16 +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 31EFaG8G043654; Tue, 14 Feb 2023 15:36:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaGq5043653; Tue, 14 Feb 2023 15:36:16 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:16 GMT Message-Id: <202302141536.31EFaGq5043653@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: 4366ea339ddb - main - mlx4: Finish conversion 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: 4366ea339ddb0945d94a646fc991ff293c6ec526 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=4366ea339ddb0945d94a646fc991ff293c6ec526 commit 4366ea339ddb0945d94a646fc991ff293c6ec526 Author: Justin Hibbits AuthorDate: 2023-02-09 02:36:11 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:19 +0000 mlx4: Finish conversion to IfAPI Fix a few stragglers found with further IfAPI work. Sponsored by: Juniper Networks, Inc. --- sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c b/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c index 3a2b9d7a8139..ae82f8c1a187 100644 --- a/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c +++ b/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c @@ -731,11 +731,11 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port, if (!ndev) goto out_unlock; - tmp = iboe_get_mtu(ndev->if_mtu); + tmp = iboe_get_mtu(if_getmtu(ndev)); props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256; - props->state = ((ndev->if_drv_flags & IFF_DRV_RUNNING) != 0 && - ndev->if_link_state == LINK_STATE_UP) ? + props->state = ((if_getdrvflags(ndev) & IFF_DRV_RUNNING) != 0 && + if_getlinkstate(ndev) == LINK_STATE_UP) ? IB_PORT_ACTIVE : IB_PORT_DOWN; props->phys_state = state_to_phys_state(props->state); out_unlock: @@ -2281,7 +2281,7 @@ static int mlx4_ib_netdev_event(struct notifier_block *this, if_t dev = netdev_notifier_info_to_ifp(ptr); struct mlx4_ib_dev *ibdev; - if (dev->if_vnet != &init_net) + if (if_getvnet(dev) != &init_net) return NOTIFY_DONE; ibdev = container_of(this, struct mlx4_ib_dev, iboe.nb); @@ -3021,8 +3021,8 @@ static void handle_bonded_port_state_event(struct work_struct *work) continue; curr_port_state = - ((curr_netdev->if_drv_flags & IFF_DRV_RUNNING) != 0 && - curr_netdev->if_link_state == LINK_STATE_UP) ? + ((if_getdrvflags(curr_netdev) & IFF_DRV_RUNNING) != 0 && + if_getlinkstate(curr_netdev) == LINK_STATE_UP) ? IB_PORT_ACTIVE : IB_PORT_DOWN; bonded_port_state = (bonded_port_state != IB_PORT_ACTIVE) ?