From nobody Tue Feb 01 15:24:25 2022 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 D0E1B19165B5; Tue, 1 Feb 2022 15:24:28 +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 4Jp7yM25wpz3FnP; Tue, 1 Feb 2022 15:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643729068; 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=RBJbIOZzaLVvCSHhxMHTH/nOrSrjTsYOYEhdLlQ15oI=; b=j+NLOWqhilEWlA1HHJRNzOwpqv+UxmFjNlZHA8eTG4om+Wa84lQQkrUz6nKOdpAeLBWxH3 z22QVJe8kfL4jvW5iEi6gT53Opw5u8TFlr0XGr8rA2T1SeaSphoygh3jHDAYzCfnuZOFSc QHaIe4rc5OU9Fa7VHnkDeyt5fiBSqfRV6XSVGKx7mlvGxKIIIxuLLh9JIYraSeOTbtuxMT byY8YTBOGMqpwC9Lq7i7jmDOIPWiOros8S1Xvsjw9iiQBpBKVSYX817yYmWmhGVi+/iELa +3u9kSTTeQ/APFxTu6sJPHj1WPgMXAyj1E5ZSigoF98YpIBAwB2jCMn1iaJPYA== 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 BDD3C13597; Tue, 1 Feb 2022 15:24:25 +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 211FOPl4051124; Tue, 1 Feb 2022 15:24:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 211FOP4K051123; Tue, 1 Feb 2022 15:24:25 GMT (envelope-from git) Date: Tue, 1 Feb 2022 15:24:25 GMT Message-Id: <202202011524.211FOP4K051123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 06c2bd1872d6 - main - mlx5en: Force all packets through the indirection table. 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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06c2bd1872d637da6042da7059eb2800f3cbe4de Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643729068; 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=RBJbIOZzaLVvCSHhxMHTH/nOrSrjTsYOYEhdLlQ15oI=; b=lkUwpmM2p6gjDlYe1axRCC+mlH3/xsUK5DlDs3AOAmPVGnVt0ti5VY3pw4mpG2qnU1MS+v J/Ma5ADRvc99qvLa42W3AW+HuIkC4HEkRJ8SwtrcEoqQ9SKzDmJEtjSxJQgYO1TOqZsLo5 cm8wN9Q8XLPAOsrKmu99U7hdfdxdEvGFmYYXWUiGIxSJKDUY7UREynn1a+W5fvcuitNS3O OhhMkF8VEos8goHHMhdG/+Rk/qgcq27bN2kknVyXFoankhEwjNSIV/z1DMbKyOhA+8VdB2 Cfe/1nhiyKVB9nPdRU5Jc9bZX0NKUOQjveBqofj0isQBoxKKzaIZdtXXj8OCGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643729068; a=rsa-sha256; cv=none; b=DsKPxn6Fl+Hv55VATLGJ+cMcRkzoXLBaqtIfz4ao09QBaSt8h8MAUxllxTzQJR3wioQTtR 5yQjHI/Wfz+UALq3mK3rlRuT9OU+EXc0Tdl+rKjYzx9uZVy+HEXmCepRnrs645bLqBRRNE eFfmAeqUSwxfr/LkJ95MNo7wN+GyTcjXI357Za2rTSI8w5geRDbg9lWIYdwaIGfUCoevQZ KO28AIImJRrBeSeHM7km22HuVwtvFqgTBr657MqfC1zulBJFivEIqlWrXIt4/0NWahTXEg 9RJL3bR9phFoyk0PEfrka9tZj7K5jqPJm1+AMnkx5ptBrxGA18BYWEgr1lkX9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=06c2bd1872d637da6042da7059eb2800f3cbe4de commit 06c2bd1872d637da6042da7059eb2800f3cbe4de Author: Hans Petter Selasky AuthorDate: 2022-02-01 15:20:11 +0000 Commit: Hans Petter Selasky CommitDate: 2022-02-01 15:21:15 +0000 mlx5en: Force all packets through the indirection table. All packets must go through the indirection table, RQT, because it is not possible to modify the RQN of the TIR for direct dispatchment after it is created, typically when the link goes up and down. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 51 +++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index cc7a5dc76131..aa54567ce4ab 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2918,37 +2918,32 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla if (inner_vxlan) MLX5_SET(tirc, tirc, tunneled_offload_en, 1); - /* setup parameters for hashing TIR type, if any */ - switch (tt) { - case MLX5E_TT_ANY: - MLX5_SET(tirc, tirc, disp_type, - MLX5_TIRC_DISP_TYPE_DIRECT); - MLX5_SET(tirc, tirc, inline_rqn, - priv->channel[0].rq.rqn); - break; - default: - MLX5_SET(tirc, tirc, disp_type, - MLX5_TIRC_DISP_TYPE_INDIRECT); - MLX5_SET(tirc, tirc, indirect_table, - priv->rqtn); - MLX5_SET(tirc, tirc, rx_hash_fn, - MLX5_TIRC_RX_HASH_FN_HASH_TOEPLITZ); - hkey = (__be32 *) MLX5_ADDR_OF(tirc, tirc, rx_hash_toeplitz_key); - - CTASSERT(MLX5_FLD_SZ_BYTES(tirc, rx_hash_toeplitz_key) >= - MLX5E_RSS_KEY_SIZE); + /* + * All packets must go through the indirection table, RQT, + * because it is not possible to modify the RQN of the TIR + * for direct dispatchment after it is created, typically + * when the link goes up and down. + */ + MLX5_SET(tirc, tirc, disp_type, + MLX5_TIRC_DISP_TYPE_INDIRECT); + MLX5_SET(tirc, tirc, indirect_table, + priv->rqtn); + MLX5_SET(tirc, tirc, rx_hash_fn, + MLX5_TIRC_RX_HASH_FN_HASH_TOEPLITZ); + hkey = (__be32 *) MLX5_ADDR_OF(tirc, tirc, rx_hash_toeplitz_key); + + CTASSERT(MLX5_FLD_SZ_BYTES(tirc, rx_hash_toeplitz_key) >= + MLX5E_RSS_KEY_SIZE); #ifdef RSS - /* - * The FreeBSD RSS implementation does currently not - * support symmetric Toeplitz hashes: - */ - MLX5_SET(tirc, tirc, rx_hash_symmetric, 0); + /* + * The FreeBSD RSS implementation does currently not + * support symmetric Toeplitz hashes: + */ + MLX5_SET(tirc, tirc, rx_hash_symmetric, 0); #else - MLX5_SET(tirc, tirc, rx_hash_symmetric, 1); + MLX5_SET(tirc, tirc, rx_hash_symmetric, 1); #endif - mlx5e_get_rss_key(hkey); - break; - } + mlx5e_get_rss_key(hkey); switch (tt) { case MLX5E_TT_IPV4_TCP: