From owner-svn-src-stable@freebsd.org Mon Jun 8 09:37:22 2020 Return-Path: Delivered-To: svn-src-stable@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 00D053295E4; Mon, 8 Jun 2020 09:37:22 +0000 (UTC) (envelope-from hselasky@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49gSp95gkLz44DP; Mon, 8 Jun 2020 09:37:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A418822796; Mon, 8 Jun 2020 09:37:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0589bL9F036926; Mon, 8 Jun 2020 09:37:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0589bLLS036924; Mon, 8 Jun 2020 09:37:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006080937.0589bLLS036924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 8 Jun 2020 09:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361923 - in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 361923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 09:37:22 -0000 Author: hselasky Date: Mon Jun 8 09:37:20 2020 New Revision: 361923 URL: https://svnweb.freebsd.org/changeset/base/361923 Log: MFC r361498: Sync with Linux packet pacing enhancements in mlx5en(4). Linux commit: 05d3ac978ed25b753bfe34fe76c50c31ee506a82 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_rl.c stable/12/sys/dev/mlx5/mlx5_ifc.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_rl.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_rl.c Mon Jun 8 09:35:32 2020 (r361922) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_rl.c Mon Jun 8 09:37:20 2020 (r361923) @@ -58,16 +58,14 @@ static struct mlx5_rl_entry *find_rl_entry(struct mlx5 static int mlx5_set_rate_limit_cmd(struct mlx5_core_dev *dev, u32 rate, u32 burst, u16 index) { - u32 in[MLX5_ST_SZ_DW(set_rate_limit_in)] = {0}; - u32 out[MLX5_ST_SZ_DW(set_rate_limit_out)] = {0}; + u32 in[MLX5_ST_SZ_DW(set_rate_limit_in)] = {}; + u32 out[MLX5_ST_SZ_DW(set_rate_limit_out)] = {}; - MLX5_SET(set_rate_limit_in, in, opcode, - MLX5_CMD_OP_SET_RATE_LIMIT); + MLX5_SET(set_rate_limit_in, in, opcode, MLX5_CMD_OP_SET_RATE_LIMIT); MLX5_SET(set_rate_limit_in, in, rate_limit_index, index); MLX5_SET(set_rate_limit_in, in, rate_limit, rate); - - if (MLX5_CAP_QOS(dev, packet_pacing_burst_bound)) - MLX5_SET(set_rate_limit_in, in, burst_upper_bound, burst); + MLX5_SET(set_rate_limit_in, in, burst_upper_bound, burst); + MLX5_SET(set_rate_limit_in, in, typical_packet_size, 0 /* use MTU */); return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); } Modified: stable/12/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ifc.h Mon Jun 8 09:35:32 2020 (r361922) +++ stable/12/sys/dev/mlx5/mlx5_ifc.h Mon Jun 8 09:37:20 2020 (r361923) @@ -667,7 +667,8 @@ struct mlx5_ifc_qos_cap_bits { u8 esw_rate_limit[0x1]; u8 hll[0x1]; u8 packet_pacing_burst_bound[0x1]; - u8 reserved_at_6[0x1a]; + u8 packet_pacing_typical_size[0x1]; + u8 reserved_at_7[0x19]; u8 reserved_at_20[0x20]; @@ -7672,7 +7673,13 @@ struct mlx5_ifc_set_rate_limit_in_bits { u8 reserved_at_60[0x20]; u8 rate_limit[0x20]; + u8 burst_upper_bound[0x20]; + + u8 reserved_at_c0[0x10]; + u8 typical_packet_size[0x10]; + + u8 reserved_at_e0[0x120]; }; struct mlx5_ifc_access_register_out_bits {