From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3E4A8A046B for ; Mon, 22 Jul 2019 07:35:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1062D1B464; Mon, 22 Jul 2019 07:35:02 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30085.outbound.protection.outlook.com [40.107.3.85]) by dpdk.org (Postfix) with ESMTP id AC4525B34 for ; Mon, 22 Jul 2019 07:35:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dOcgXSDPQ+CsCLvtOj4GiZI4amYwHhezQD8/CnDQik32pn/9uW3zFa4JPoKF2Ottqk7Yzaeq2JPBUUVJdWzBmhcwBXeVjkkn0pQoSQ+rQbFJi8wbeSZm6Jsm1Z7AZDbdietcu+zOi9Eo+uEIcsvbeaWTHrut5mWVL1smcN8dcPesvM9vBx1KdfNL7FmVQ0j2mnd9YDWVzrwXikHVYeTyQalwubqP8KAmjBcDqRgisbajiDpDJM21aq/lrKkivDAWKvyT0scnvASPklLTFOXLlKmojpzta9tUlmIvuuioru0HQMjpD2y/JXaF1RRcOKOa7NDjr4ZL3zhgaa6v9Za2sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kWNyJ4BPsmaInDjAFuNAiSwPl4HJQp0cUNEJnqqAeAw=; b=VVyAaqHeSxLe19jVk2ZmKxSewQbVeDcTGVURyBNGMftC8R0wIfvgyEWY2KbSTj0O4i8dAqOctSslYamh2sKbjlRxpDMAK2s4hKgRquqN0XOZZw/NV3Q7fPjj9l/q5SRtK8//D40Dqmz4eWgWY5Bji1nlixI8EqJYGCPnloY9Ob060ZOFiWsObEDyBj83y7l7IogBCPHGOYE7GiyRAfRIMXJae+70y8h9BXXje23SNZn2pWzUtU2d0S4S0wcL8FMpcv1z3VP1TjcS0dCPGwuTywil0rBVhLI/Lm4xavy0xF1jt5z+tSLl39PAUWr1WikrgsRnHAGIjewxGfUNL5g8hA== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=mellanox.com;dmarc=pass action=none header.from=mellanox.com;dkim=pass header.d=mellanox.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kWNyJ4BPsmaInDjAFuNAiSwPl4HJQp0cUNEJnqqAeAw=; b=AQ5yCojGtAZCQL7c8fckM/cMmuzVaD5epzIVU7gxUbNCuTIIbYePeZ5Hu8S1i2MjI1LgxLReqU05RZoVfJCR9DvmAdssoFWFsS6eITvSGFVOh1hQGNxx8AVrhbZwTRmlcNwRS/QXxC1y9IrGfqwSBe2vcZ0gi1X+8MsO4cwip7Y= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3995.eurprd05.prod.outlook.com (52.134.72.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Mon, 22 Jul 2019 05:34:59 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::69c1:c0d7:1fa1:f89f]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::69c1:c0d7:1fa1:f89f%6]) with mapi id 15.20.2094.013; Mon, 22 Jul 2019 05:34:59 +0000 From: Yongseok Koh To: Slava Ovsiienko CC: "dev@dpdk.org" Thread-Topic: [PATCH v4 8/8] net/mlx5: report supported max number of mbuf segments Thread-Index: AQHVP9A2oA1Ttnhd90ihDWyPwyycJKbWHsaA Date: Mon, 22 Jul 2019 05:34:59 +0000 Message-ID: <74B1CEDE-A496-454F-AA6A-677F8AF3941B@mellanox.com> References: <1563346400-1762-1-git-send-email-viacheslavo@mellanox.com> <1563719100-368-1-git-send-email-viacheslavo@mellanox.com> <1563719100-368-9-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1563719100-368-9-git-send-email-viacheslavo@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [69.181.245.183] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d19bbfe7-731c-45c7-5fb5-08d70e665692 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:DB3PR0502MB3995; x-ms-traffictypediagnostic: DB3PR0502MB3995: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-forefront-prvs: 01068D0A20 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(346002)(366004)(396003)(136003)(199004)(189003)(478600001)(6486002)(33656002)(53936002)(76176011)(6436002)(316002)(37006003)(36756003)(6512007)(81156014)(81166006)(186003)(6862004)(25786009)(446003)(8676002)(26005)(2616005)(11346002)(476003)(4326008)(229853002)(6636002)(8936002)(71190400001)(71200400001)(486006)(102836004)(7736002)(2906002)(14454004)(6506007)(305945005)(6246003)(66946007)(66476007)(66556008)(64756008)(66446008)(66066001)(76116006)(91956017)(14444005)(256004)(6116002)(68736007)(86362001)(99286004)(5660300002)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3995; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: hcY61m6fFVqG15NjG6P5LheSGVxAiWdvmluOF9hythVMIAfZDdv6l6DZA75MMxLuTmEvE1FQwLGo2ReLBECjz8fsNh3Ep+jhFCcu+XNWH0urjzTr89lhUG0Xk+Zkw+hlZK1iAtUZCYIrbDAQMd0pNtYb03BJmolhOpzYsJqoHfuCK5cWgxznWUKi1CafPeeZpEb7CdzPID0F5qk/k3YfTqy/8oPfs1c+0xlmJEnbGvjqcC4a5jbHTSS7PAKLKTjyhPQZIhliEFbzWfw9yyMEWr+dDuC/1rnZUB8qkXJWopDv99yAMGfZnIrnrlfVNjZoc4nS6ZIqv1A6BPl4llQnWoLM7bKGMuHuhDFOPRVHwGdRaTw1JXfe/3USbUmjlDyucS1W6UXz4xnzHWeCdMK1fApqJlTSVhaPxcE84t+/Njo= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: d19bbfe7-731c-45c7-5fb5-08d70e665692 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2019 05:34:59.6072 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yskoh@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3995 Subject: Re: [dpdk-dev] [PATCH v4 8/8] net/mlx5: report supported max number of mbuf segments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > \On Jul 21, 2019, at 7:25 AM, Viacheslav Ovsiienko wrote: >=20 > This patch fills the tx_desc_lim.nb_seg_max and > tx_desc_lim.nb_mtu_seg_max fields of rte_eth_dev_info > structure to report thee maximal number of packet > segments, requested inline data configuration is > taken into account in conservative way. >=20 > Signed-off-by: Viacheslav Ovsiienko > --- Acked-by: Yongseok Koh > drivers/net/mlx5/mlx5_ethdev.c | 37 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) >=20 > diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethde= v.c > index 738d540..6c9bcf1 100644 > --- a/drivers/net/mlx5/mlx5_ethdev.c > +++ b/drivers/net/mlx5/mlx5_ethdev.c > @@ -592,6 +592,42 @@ struct ethtool_link_settings { > } >=20 > /** > + * Sets tx mbuf limiting parameters. > + * > + * @param dev > + * Pointer to Ethernet device. > + * @param[out] info > + * Info structure output buffer. > + */ > +static void > +mlx5_set_txlimit_params(struct rte_eth_dev *dev, struct rte_eth_dev_info= *info) > +{ > + struct mlx5_priv *priv =3D dev->data->dev_private; > + struct mlx5_dev_config *config =3D &priv->config; > + unsigned int inlen; > + uint16_t nb_max; > + > + inlen =3D (config->txq_inline_max =3D=3D MLX5_ARG_UNSET) ? > + MLX5_SEND_DEF_INLINE_LEN : > + (unsigned int)config->txq_inline_max; > + assert(config->txq_inline_min >=3D 0); > + inlen =3D RTE_MAX(inlen, (unsigned int)config->txq_inline_min); > + inlen =3D RTE_MIN(inlen, MLX5_WQE_SIZE_MAX + > + MLX5_ESEG_MIN_INLINE_SIZE - > + MLX5_WQE_CSEG_SIZE - > + MLX5_WQE_ESEG_SIZE - > + MLX5_WQE_DSEG_SIZE * 2); > + nb_max =3D (MLX5_WQE_SIZE_MAX + > + MLX5_ESEG_MIN_INLINE_SIZE - > + MLX5_WQE_CSEG_SIZE - > + MLX5_WQE_ESEG_SIZE - > + MLX5_WQE_DSEG_SIZE - > + inlen) / MLX5_WSEG_SIZE; > + info->tx_desc_lim.nb_seg_max =3D nb_max; > + info->tx_desc_lim.nb_mtu_seg_max =3D nb_max; > +} > + > +/** > * DPDK callback to get information about the device. > * > * @param dev > @@ -634,6 +670,7 @@ struct ethtool_link_settings { > info->speed_capa =3D priv->link_speed_capa; > info->flow_type_rss_offloads =3D ~MLX5_RSS_HF_MASK; > mlx5_set_default_params(dev, info); > + mlx5_set_txlimit_params(dev, info); > info->switch_info.name =3D dev->data->name; > info->switch_info.domain_id =3D priv->domain_id; > info->switch_info.port_id =3D priv->representor_id; > --=20 > 1.8.3.1 >=20