From nobody Wed Nov 22 01:51:58 2023 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 4SZkkl0ZmMz51W9k; Wed, 22 Nov 2023 01:51:59 +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 4SZkkk66k8z3Hc5; Wed, 22 Nov 2023 01:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700617918; 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=jqzuon5X6PUk1Bl82qiDEoeBJD0E/fD0gMqugDWbbWk=; b=Wt7XrDMArQ1qG3eQIwtSZwiBUTydHMReZiBchCcztfAjO5vSIsbhvxjdHk8XNmQs0yEVF8 BvmCejMo/p9W1KrYn0Had87G705qGbK7z9fEsE/OA7ZL9aVEKPsQJFW6fgi+GLqzX6b4Tk M92EDvy/8P+4o+Gw5uhEHkNagqwQNLYPgYyXi7033VHl9g5yp8ahTYoAS5n7BVa80jBMaC dvEJFHZYBG0sL3/vALNVP76iJrXHhkMsNqSzpRwLb1Yd2aYs9sk0BfjYijLCRz+2YOcIAB zMayRuE0iYM2vTBaRRnnESe2g+LnXZleWy1+9JjyX/l8GjvPdnUsbGJHWZrUSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700617918; 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=jqzuon5X6PUk1Bl82qiDEoeBJD0E/fD0gMqugDWbbWk=; b=WCLc6ELQTvCEWZr4scOrw5qwx2UlVTMxLg6woEWMOZ1c67+AQ/vwhWZGb3KJecsNgeWrPc UzTey8c0/L9vPvdyWGYHr0aF/4VhUTTOvNmVxGMtgHkBYmwT9hXuzqKLP/8oQEmUV2CrKV mUhbUd5WfLq12X0CuTbKnltD635n9xt6XrzqwAJ8ZRxCOTjG+Llz/H001FNhQsjFVyjZhW lSe4VQ+weCCP608rdnzy6uQLMDa63yNyNcwJ4BSz32BBDjikckD4njzz+yaf0N0WOuBENr U/ZZv+qMbliZaVGSBu1FggUPL9shf9s4WTXBDBRVV2lL1yK4Vvr2gd3fRHRPEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700617918; a=rsa-sha256; cv=none; b=Apk/ckg75lUowMfNHXZiEHZwAA3Pho/cr/CS5TRuHNEVKnWS4nmTrRNXQDyF0LnQLktcdp jgZENyJ9M2Uk0zaDBGj6UqvAR3bmWF6TwqmRNNmky6plD7FNXSMvfGY6HrcFW4O59p+89d l38FqIQuEfToFoMLWhSAK9Es8U6sgNQRahCCWp1tQzPZ6JcCvoBoyx3Xe4BqgFnjjON0MD NC92dODQ4wVbd9XxFTvSFyXomHyb2pGbIobApSQSlBgBgzyFaTIaqtJQsCMOyViNTlcoH4 bUXkkIA2Kv/0dFnbpsjjJUwUob4qg+t3rfZsf2xk7oGlZ5ybzqYvRZGdZSp4lw== 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 4SZkkk5DBHz10Dl; Wed, 22 Nov 2023 01:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AM1pw9s078258; Wed, 22 Nov 2023 01:51:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AM1pwJ2078255; Wed, 22 Nov 2023 01:51:58 GMT (envelope-from git) Date: Wed, 22 Nov 2023 01:51:58 GMT Message-Id: <202311220151.3AM1pwJ2078255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5a2ff1f03ad2 - stable/14 - mlx5: Add a no-append flow insertion mode 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5a2ff1f03ad245577498bcbc3907f4ae336fd9e8 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5a2ff1f03ad245577498bcbc3907f4ae336fd9e8 commit 5a2ff1f03ad245577498bcbc3907f4ae336fd9e8 Author: Mark Bloch AuthorDate: 2023-02-20 15:46:42 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-22 01:40:28 +0000 mlx5: Add a no-append flow insertion mode (cherry picked from commit 6a6af22b6ec42eb0436381fae8dd1b86bc4c6327) --- sys/dev/mlx5/fs.h | 5 +++++ sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index d61a2bb498b7..f62716d806d0 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -96,8 +96,13 @@ enum mlx5_flow_act_actions { MLX5_FLOW_ACT_ACTIONS_PACKET_REFORMAT = 1 << 2, }; +enum MLX5_FLOW_ACT_FLAGS { + MLX5_FLOW_ACT_NO_APPEND = 1 << 0, +}; + struct mlx5_flow_act { u32 actions; /* See enum mlx5_flow_act_actions */ + u32 flags; u32 flow_tag; struct mlx5_modify_hdr *modify_hdr; struct mlx5_pkt_reformat *pkt_reformat; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index dcf93e5fc892..c4edc940b1bc 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -1806,6 +1806,9 @@ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, char fte_name[20]; mutex_lock(&fg->base.lock); + if (flow_act->flags & MLX5_FLOW_ACT_NO_APPEND) + goto insert_fte; + fs_for_each_fte(fte, fg) { /* TODO: Check of size against PRM max size */ mutex_lock(&fte->base.lock); @@ -1821,6 +1824,7 @@ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, mutex_unlock(&fte->base.lock); } +insert_fte: fs_get_parent(ft, fg); if (fg->num_ftes == fg->max_ftes) { dst = ERR_PTR(-ENOSPC);