From owner-svn-src-all@freebsd.org Tue May 26 07:41:47 2020 Return-Path: Delivered-To: svn-src-all@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 B59372F47A6; Tue, 26 May 2020 07:41:47 +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 49WQrq4SXXz4Zr2; Tue, 26 May 2020 07:41:47 +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 9468D2021D; Tue, 26 May 2020 07:41:47 +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 04Q7flMN060647; Tue, 26 May 2020 07:41:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04Q7flDn060645; Tue, 26 May 2020 07:41:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202005260741.04Q7flDn060645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 May 2020 07:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361498 - in head/sys/dev/mlx5: . mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 361498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 07:41:47 -0000 Author: hselasky Date: Tue May 26 07:41:46 2020 New Revision: 361498 URL: https://svnweb.freebsd.org/changeset/base/361498 Log: Sync with Linux packet pacing enhancements in mlx5en(4). Linux commit: 05d3ac978ed25b753bfe34fe76c50c31ee506a82 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_rl.c head/sys/dev/mlx5/mlx5_ifc.h Modified: head/sys/dev/mlx5/mlx5_core/mlx5_rl.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_rl.c Tue May 26 06:55:03 2020 (r361497) +++ head/sys/dev/mlx5/mlx5_core/mlx5_rl.c Tue May 26 07:41:46 2020 (r361498) @@ -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: head/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ifc.h Tue May 26 06:55:03 2020 (r361497) +++ head/sys/dev/mlx5/mlx5_ifc.h Tue May 26 07:41:46 2020 (r361498) @@ -690,7 +690,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]; @@ -7790,7 +7791,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 {