From nobody Tue May 24 20:59:45 2022 X-Original-To: dev-commits-src-all@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 F090B1B4F48D; Tue, 24 May 2022 20:59:45 +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 4L765Y55VRz4jpC; Tue, 24 May 2022 20:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653425985; 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=Fo8Hoi92uBb0WeuoezbYXKjrF90SkBtwtw0VHswLlns=; b=O/J+3alc0nCNHv1ci39x6+HfuZqmyIablEZe770+ZrIbpMqNwx1uuMpXZhdBeCx7NxYgLd IQCS2DsFHtdtZLlKkFZ2Ci7f1BTKP1jhS+tZiHRUMWliF3z+D7CW2yxyFY72NygvDdQG5p tNWVcZvpSNuSqK4fj9Z6PoJAlRt62UoDbhV7wWgm/cUg/sqE5bFxyMcwDrB5htsf/Gdyr/ XkH+aLUNL0oTJyubalXNz7eNHPCL3dGxMIcOMWmVF5FdfL6rIakXP/w/ohT5D/N4hwGrxK n1+GbgAYEDVWRI9rThMW1a9YQ0vsf2/W3iC2gdY1TGnPWZQKOuosUdVPUe21/g== 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 6E7493D32; Tue, 24 May 2022 20:59:45 +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 24OKxjpB036579; Tue, 24 May 2022 20:59:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24OKxjCo036578; Tue, 24 May 2022 20:59:45 GMT (envelope-from git) Date: Tue, 24 May 2022 20:59:45 GMT Message-Id: <202205242059.24OKxjCo036578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f7ea19958b03 - main - Convert mlx5_en to SIOCSIFCAPNV List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7ea19958b0313ed44c73a602708d57595f594bb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653425985; 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=Fo8Hoi92uBb0WeuoezbYXKjrF90SkBtwtw0VHswLlns=; b=b/F6j0Rkq4ioBOupF5Ouom4rMpLX/x1BZ4oSGsGFoQr4CHM0C7VSjcaqiDSROV5Ddfr4v2 KX24hTrtPfGYIYPG9vCJBvsf7i9Mzw+VUuuOgsyHVbJdV7rqwAU/4GxZ6AsT0K8e38ul2p 4PBiosYuajQNbML0wiA2Q6oig0pcEzAnFQiz2Pk4U3X1Vnde2FVEe/eaLuPoeDW/nCmYl7 Fup548PqPHkoyC0b+aQtZOM3DlqYa5gtNkm743Iwb3Vjcqw2ueaQ4s/KjTWPlN70+UigU2 amx/sKjWE0YsUbwwAaDpbhTFQdEza5fn4cBYS4chRox0Xa3suvYzZ1n7D0EGBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653425985; a=rsa-sha256; cv=none; b=yWbHJUF9r8pv9GNsHwyBmX1kIl7X4hgO01pkFQvqkdwQ0T0FzblkO+7MrMc8rgDQ/V/U9P kh71IpwV8KQkT0kkF13ngOMN+CzbhuUD4NH0eHGdmGdmSB5IwA144ozMou4i3VP5tzwROm X8lrRk9sZM7590Mot610dOpB13TIwQQk1ZD7zZtuYHkSMBh01xjkFBLiJq+3e1J2F1S3v4 7tY6eX3xG2eJCfaeKua2KZV4PPzRulqRaZY8uX7TkGO4AEYwXmwiKck5iwO8wvHf5QaapF 4YxiYhgfdbILrtN4x4yPml75XiSCViYpzg1Fd7tzktPwyA5YT+BmDmbdlxhBQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f7ea19958b0313ed44c73a602708d57595f594bb commit f7ea19958b0313ed44c73a602708d57595f594bb Author: Konstantin Belousov AuthorDate: 2021-10-19 17:56:55 +0000 Commit: Konstantin Belousov CommitDate: 2022-05-24 20:59:32 +0000 Convert mlx5_en to SIOCSIFCAPNV Reviewed by: hselasky, jhb, kp (previous version) Sponsored by: NVIDIA Networking MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D32551 --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 32d5d761674f..3a5b44406076 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -3434,6 +3434,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) struct ifi2creq i2c; struct ifrsskey *ifrk; struct ifrsshash *ifrh; + struct siocsifcapnv_driver_data *drv_ioctl_data, drv_ioctl_data_d = {}; int error = 0; int mask = 0; int size_read = 0; @@ -3512,10 +3513,22 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifr = (struct ifreq *)data; error = ifmedia_ioctl(ifp, ifr, &priv->media, command); break; + case SIOCGIFCAPNV: + error = 0; + break; case SIOCSIFCAP: ifr = (struct ifreq *)data; + drv_ioctl_data = &drv_ioctl_data_d; + drv_ioctl_data->reqcap = ifr->ifr_reqcap; + PRIV_LOCK(priv); + drv_ioctl_data->reqcap2 = ifp->if_capabilities2; + drv_ioctl_data->nvcap = NULL; + goto siocsifcap_driver; + case SIOCSIFCAPNV: + drv_ioctl_data = (struct siocsifcapnv_driver_data *)data; PRIV_LOCK(priv); - mask = ifr->ifr_reqcap ^ ifp->if_capenable; +siocsifcap_driver: + mask = drv_ioctl_data->reqcap ^ ifp->if_capenable; if (mask & IFCAP_TXCSUM) { ifp->if_capenable ^= IFCAP_TXCSUM; @@ -4518,6 +4531,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) /* * Set driver features */ + ifp->if_capabilities |= IFCAP_NV; ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6; ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; ifp->if_capabilities |= IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER; @@ -4541,6 +4555,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) ifp->if_hw_tsomaxsegsize = MLX5E_MAX_TX_MBUF_SIZE; ifp->if_capenable = ifp->if_capabilities; + ifp->if_capenable2 = ifp->if_capabilities2; ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TSO) ifp->if_hwassist |= CSUM_TSO;