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 F00DCA04F0; Thu, 19 Dec 2019 12:26:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDF6F1BE8A; Thu, 19 Dec 2019 12:26:34 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130041.outbound.protection.outlook.com [40.107.13.41]) by dpdk.org (Postfix) with ESMTP id E3A481BE8A for ; Thu, 19 Dec 2019 12:26:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AbBZSvaggkGVNjnSYwGXg5Y+e9v42IUIaTaUWVJSbL0kMKFCtB9NaEBimjvwpGt/EuxPM3Mmgva3gMtI2A2ORhqCcnqKsrF0bo5YQcBFN0r/vfPoWS3JRrRA+9+rOG+xjSgRPqsCHeM8ziKAQdJpJe0Z41vjgm+WREef8WbhcoYKwTmHJD8EvnQUclGML1KgotoDJ+tEp23/RwUMXMRiOpCTteH9F0LGY7Ol9ha5L28byjIkjS0Vr7i1ikziXVFD9DdMSbwP6O4FJJyBurEJKCwP8R29/uo6G/wUz7M2Bxk7mA7SjL0QDgZZklbsusNYYXr9P9D1B3cMseoQteE7fA== 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=NbFuXMU0m/9T0NT/ZCRnnh+2tGnojpZU3YqEgC1egzo=; b=ZGuvOU/TrSKyobhfBMlE5kFij/wkulKQnx0Lb81gN4kHDyCsSq7g1cqtKm4tesA3Syu4lDatIXckkkxGGFvFdLYRw2CQ4FtIJSqrL8br9Rd+LFRoFj0ETIy4l9Q9/592rLSod/ytyrLzN5iSAwGWmPSPJEBhuT0WhLq/0GCGMcT8OIJWb+5LytRqjhZgFPyHLG722I8syJkynYyFTUCrWXrQ9PEIAVk/cVQghOqgB5m+SX8AFKmsGKmvjdJ1HA4Kv7/HXZsd4xYC/94v4o8fxafJrGW8kgTwvTxK9OVyy4Rpatu2k4Ea+VTZQ5XFwcTq/s8RyOwtbb9hp6GHLW+YVw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NbFuXMU0m/9T0NT/ZCRnnh+2tGnojpZU3YqEgC1egzo=; b=T/dY6O2jFXVfWdSoHEExDeI7kqz2SRY9nVlIKoSTKQu5YtFzdQtxTx33MRCRjqWgRzRcw1ohqYAMlHFKb3coi/RZy4+vDAE1+ACb42EQMj1KVlaAKlfbWb4XViDNCWNLiChoRW5GfbWVzfMvBJ1OdUT9z4qLpkdQfYcq1mgny7Y= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB4043.eurprd05.prod.outlook.com (52.134.68.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.18; Thu, 19 Dec 2019 11:26:32 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::2151:27c7:b8ec:3da9]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::2151:27c7:b8ec:3da9%6]) with mapi id 15.20.2538.022; Thu, 19 Dec 2019 11:26:32 +0000 From: Raslan Darawsheh To: Dekel Peled , Matan Azrad , Slava Ovsiienko , Shahaf Shuler CC: Ori Kam , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: add define of LRO segment chunk size Thread-Index: AQHVtXgKJQKDN7h1S0myye2COd0ksafBU1gQ Date: Thu, 19 Dec 2019 11:26:31 +0000 Message-ID: References: <9e1ca71b1fd1da5830f44e74f8b12ba7a088a357.1576654991.git.dekelp@mellanox.com> In-Reply-To: <9e1ca71b1fd1da5830f44e74f8b12ba7a088a357.1576654991.git.dekelp@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=rasland@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: fc5a6cff-3c84-4147-71b7-08d784764c79 x-ms-traffictypediagnostic: DB3PR0502MB4043:|DB3PR0502MB4043: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2449; x-forefront-prvs: 0256C18696 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(346002)(396003)(136003)(366004)(199004)(13464003)(189003)(66556008)(55016002)(186003)(9686003)(71200400001)(4326008)(86362001)(33656002)(66476007)(26005)(66946007)(110136005)(54906003)(316002)(478600001)(64756008)(81166006)(81156014)(76116006)(66446008)(52536014)(6636002)(7696005)(5660300002)(2906002)(8936002)(6506007)(53546011)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4043; H:DB3PR0502MB3964.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: BCL:0; x-microsoft-antispam-message-info: UlFELC5oD4sZe39dr0NLTv6rtUlU4vsIQu1yqx5+5NBc4jzPUoij9tMfIBgwFw+RpnyA5cLLL2EAvGRe41hzBOKP6tM/bwwjRerZvTKue42BdGgftLHyk9Zl9pXrhnaxuwtj1S/woSiWJ4GvF4br5TMdE1vr/5TSVbqiRkJ+LH9iTLrBo38uh1kFSWyvYfSoMqDt8nFUNrmU2LwYcZPomE/cMObYQEsqovAqqQDHakVOZHPa2SFL2mWDYX4TgqbTYqlxnb58SJszEhySsBa0pNriHD4nNHmkae9WTi+X6uikXtncfzpDoUSbB8kadW3rCTz1OUcB7NkFcGn1BPYpm6qbRCHr5cRcZ861YjGoOMnhtC5SsjtIZfahmJ1V2oBfStNyfuW9RazlcQ29B41zR8efT6t2EFw3MgOl69WovalWaWiIxcRleG7SlkJDeodihJq6MUcW6hb9i+Cm94Cs++les+Rexzb+7KSINfCQ55aX1tsG7YL7bZgYGuJZ7r1R Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc5a6cff-3c84-4147-71b7-08d784764c79 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2019 11:26:31.8880 (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: NgcdSehYvl/tHr+/H5CykQssnsHxeZyQs25pvDpazLqbuyJLKQputVhLBtW7n3rc8qSQIo1R9RIhhhAn4VvyVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4043 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: add define of LRO segment chunk size 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" Hi, > -----Original Message----- > From: dev On Behalf Of Dekel Peled > Sent: Wednesday, December 18, 2019 9:52 AM > To: Matan Azrad ; Slava Ovsiienko > ; Shahaf Shuler > Cc: Ori Kam ; dev@dpdk.org > Subject: [dpdk-dev] [PATCH] net/mlx5: add define of LRO segment chunk > size >=20 > Maximal size of coalesced LRO segment is set in TIR attributes as > number of chunks of size 256 bytes each. > Current implementation uses the hardcoded value 256 in several places. >=20 > This patch adds a definition for this value, and uses this definition > in all relevant places. > A debug message is added to clearly notify the actual configured size. >=20 > Signed-off-by: Dekel Peled > Acked-by: Matan Azrad >=20 > --- > drivers/net/mlx5/mlx5.h | 5 ++++- > drivers/net/mlx5/mlx5_rxq.c | 15 +++++++++++---- > 2 files changed, 15 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h > index 0c3a90e..c3df825 100644 > --- a/drivers/net/mlx5/mlx5.h > +++ b/drivers/net/mlx5/mlx5.h > @@ -218,8 +218,11 @@ struct mlx5_hca_attr { > #define MLX5_LRO_SUPPORTED(dev) \ > (((struct mlx5_priv *)((dev)->data->dev_private))- > >config.lro.supported) >=20 > +/* Maximal size of coalesced segment for LRO is set in chunks of 256 Byt= es. > */ > +#define MLX5_LRO_SEG_CHUNK_SIZE 256u > + > /* Maximal size of aggregated LRO packet. */ > -#define MLX5_MAX_LRO_SIZE (UINT8_MAX * 256u) > +#define MLX5_MAX_LRO_SIZE (UINT8_MAX * > MLX5_LRO_SEG_CHUNK_SIZE) >=20 > /* LRO configurations structure. */ > struct mlx5_lro_config { > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c > index 986ec01..bbc07db 100644 > --- a/drivers/net/mlx5/mlx5_rxq.c > +++ b/drivers/net/mlx5/mlx5_rxq.c > @@ -1717,11 +1717,14 @@ struct mlx5_rxq_obj * > * > * @param dev > * Pointer to Ethernet device. > + * @param idx > + * RX queue index. > * @param max_lro_size > * The maximum size for LRO packet. > */ > static void > -mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint32_t > max_lro_size) > +mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, > + uint32_t max_lro_size) > { > struct mlx5_priv *priv =3D dev->data->dev_private; >=20 > @@ -1730,13 +1733,17 @@ struct mlx5_rxq_obj * > MLX5_MAX_TCP_HDR_OFFSET) > max_lro_size -=3D MLX5_MAX_TCP_HDR_OFFSET; > max_lro_size =3D RTE_MIN(max_lro_size, MLX5_MAX_LRO_SIZE); > - assert(max_lro_size >=3D 256u); > - max_lro_size /=3D 256u; > + assert(max_lro_size >=3D MLX5_LRO_SEG_CHUNK_SIZE); > + max_lro_size /=3D MLX5_LRO_SEG_CHUNK_SIZE; > if (priv->max_lro_msg_size) > priv->max_lro_msg_size =3D > RTE_MIN((uint32_t)priv->max_lro_msg_size, > max_lro_size); > else > priv->max_lro_msg_size =3D max_lro_size; > + DRV_LOG(DEBUG, > + "port %u Rx Queue %u max LRO message size adjusted to %u > bytes", > + dev->data->port_id, idx, > + priv->max_lro_msg_size * MLX5_LRO_SEG_CHUNK_SIZE); > } >=20 > /** > @@ -1909,7 +1916,7 @@ struct mlx5_rxq_ctrl * > rte_errno =3D EINVAL; > goto error; > } > - mlx5_max_lro_msg_size_adjust(dev, max_lro_size); > + mlx5_max_lro_msg_size_adjust(dev, idx, max_lro_size); > /* Toggle RX checksum offload if hardware supports it. */ > tmpl->rxq.csum =3D !!(offloads & DEV_RX_OFFLOAD_CHECKSUM); > tmpl->rxq.hw_timestamp =3D !!(offloads & > DEV_RX_OFFLOAD_TIMESTAMP); > -- > 1.8.3.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh