From owner-dev-commits-src-main@freebsd.org Mon Jul 12 12:00:49 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0819265CF9A; Mon, 12 Jul 2021 12:00:49 +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 4GNj5X0chqz3GTS; Mon, 12 Jul 2021 12:00:47 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 66A926813; Mon, 12 Jul 2021 12:00:47 +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 16CC0lex008796; Mon, 12 Jul 2021 12:00:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16CC0lkA008784; Mon, 12 Jul 2021 12:00:47 GMT (envelope-from git) Date: Mon, 12 Jul 2021 12:00:47 GMT Message-Id: <202107121200.16CC0lkA008784@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: b1277d42d718 - main - mlx5en: add ASCII art providing an overview of flow tables organization 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: b1277d42d718cd42d04d39fa2d61873655e909b3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2021 12:00:49 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b1277d42d718cd42d04d39fa2d61873655e909b3 commit b1277d42d718cd42d04d39fa2d61873655e909b3 Author: Konstantin Belousov AuthorDate: 2021-04-26 22:38:46 +0000 Commit: Konstantin Belousov CommitDate: 2021-07-12 09:34:39 +0000 mlx5en: add ASCII art providing an overview of flow tables organization Reviewed by: hselasky Sponsored by: Mellanox Technologies/NVidia Networking MFC after: 1 week --- sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c index cdfe19d910d1..54fbe8e057cc 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c @@ -31,6 +31,35 @@ #include #include +/* + * The flow tables with rules define the packet processing on receive. + * Currently, the following structure is set up to handle different offloads + * like VLAN decapsulation, packet classification, RSS hashing, VxLAN checksum + * offloading: + * + * + * +=========+ +=========+ +=================+ + * |VLAN ft: | |VxLAN | |VxLAN Main | + * |CTAG/STAG|------>| VNI|----->|Inner Proto Match|=====> Inner TIR n + * |VID/noVID|/ |Catch-all|\ | | + * +=========+ +=========+| +=================+ + * | + * | + * | + * v + * +=================+ + * |Main | + * |Outer Proto Match|=====> TIR n + * | | + * +=================+ + * + * The path through flow rules directs each packet into an appropriate TIR, + * according to the: + * - VLAN encapsulation + * - Outer protocol + * - Presence of inner protocol + */ + #define MLX5_SET_CFG(p, f, v) MLX5_SET(create_flow_group_in, p, f, v) enum {