From nobody Sun Sep 22 16:07:51 2024 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 4XBWHX1VnLz5X99K; Sun, 22 Sep 2024 16:07:52 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XBWHW5s45z41jj; Sun, 22 Sep 2024 16:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727021271; 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=cwEkWqj5R0Ten/uctGrC3ikiu0wy6YQoO42G2aILONo=; b=eB5SZf8kaYtyNYxlfBe60qU2r422/zZnidxxYhW+f8H7aXSlxA0m1YZeFhp96wqKYGfGh0 QmEfmu34jpG+CZpn/T0FBuvcVqXKgcnDUtSPaHG6P0k6tP7vwfcu2+VrDOwxkOogil2OG1 kFTMxH6n/EELg6kqDrjpGD2I75N/4pLOaPkkAjDAAnygjmyou6DpOwtnZpZt1a/C1GeEzo cEDOuoVXQWviA682e6kiNWaRupDftHOjqP839PI+pAs536ikvKiSEKwU+RlzZA9KJJDqB5 QiH4INcKMpTRyp8a929ZH4mWAMBqnWq+P+XgfF9DgAbLtwOKOwtOC+eqzbI0NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727021271; a=rsa-sha256; cv=none; b=hfSu/ElugjWeSQm/z0SZd1YQSqgnVjkhbB02qmGsybC+bBdAKM4aCz/karjjNFR6LVr29j gTKND/G0csnRoD28FZLXBtqUBsCTHibxJczkq5UbwhZa1FqLY7g8CeCXrizgEoY6vKUqi1 NMQAKn9GFbgk27/PTjN+k1o2g08Ws6GGhxrhAtTzc3TWFRl7Spg7FKVsXid6U68bUoih3q oV5YGco2aBtJ+dEZHCoLPqTCxwN5jQu7DhQ4VO+atBcbYOGo4PBWOMA+7bvmgadUyfC5Ia gq+kOdGObZA1CUQpmJO1nmi5T4c3dUc+oEs8jdjQEpNQnQl80WXgg6hwJDvGNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727021271; 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=cwEkWqj5R0Ten/uctGrC3ikiu0wy6YQoO42G2aILONo=; b=syGok3G03w67OQUpHJhUw2bHgqeVBGveiidMkCjMOIkSSVUE2znQtVk3gacDmf/NY2arQp 7iRN8sUYhLWDEC96ZnFmln6hEBXl6wBIJvST2OdUkvyV3UyP7PI28b+11rNPPZN6E3Zroy 2xxPVWoJuEzwD2w5lAyL8TYGn9dbCNc6Ykix+2Pj/bIFVoQZFrI/1kKQKqC9PDvnruQKqD V0EzTQA52otTyOadqwO7zExtm8ozZH/xiRfx5zjp5Z9Jj/T8z4SZIlmdSXBpbzsXx+zMr6 eHyHGy6zXIvmzMb6UlevY42K9SY50rMqiQC1N6+DaQWKp/WMiyTY+99nj+ABew== 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 4XBWHW4v9Nz1My7; Sun, 22 Sep 2024 16:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48MG7pk3066445; Sun, 22 Sep 2024 16:07:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48MG7p1L066442; Sun, 22 Sep 2024 16:07:51 GMT (envelope-from git) Date: Sun, 22 Sep 2024 16:07:51 GMT Message-Id: <202409221607.48MG7p1L066442@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: 3503aa0cdcb0 - main - mlx5en: Handle install SA for ipv6 encapsulated case 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3503aa0cdcb01f141fbc1b60746e840e06ac4987 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3503aa0cdcb01f141fbc1b60746e840e06ac4987 commit 3503aa0cdcb01f141fbc1b60746e840e06ac4987 Author: Ariel Ehrenberg AuthorDate: 2024-09-10 12:26:15 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-22 16:06:02 +0000 mlx5en: Handle install SA for ipv6 encapsulated case Pass the right encap flag to network card Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c index e348ab1992a5..9523dc8d5e95 100644 --- a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c +++ b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c @@ -388,14 +388,19 @@ setup_pkt_transport_reformat(struct mlx5_accel_esp_xfrm_attrs *attrs, __be32 spi; void *hdr; - if (attrs->family == AF_INET) + if (attrs->family == AF_INET) { if (attrs->encap) reformat_params->type = MLX5_REFORMAT_TYPE_ADD_ESP_TRANSPORT_OVER_UDPV4; else reformat_params->type = MLX5_REFORMAT_TYPE_ADD_ESP_TRANSPORT_OVER_IPV4; - else - reformat_params->type = - MLX5_REFORMAT_TYPE_ADD_ESP_TRANSPORT_OVER_IPV6; + } else { + if (attrs->encap) + reformat_params->type = + MLX5_REFORMAT_TYPE_ADD_ESP_TRANSPORT_OVER_UDPV6; + else + reformat_params->type = + MLX5_REFORMAT_TYPE_ADD_ESP_TRANSPORT_OVER_IPV6; + } if (attrs->encap) bfflen += sizeof(*udphdr);