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 33C8CA0521; Thu, 23 Jul 2020 16:50:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 13E141BF94; Thu, 23 Jul 2020 16:50:41 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70041.outbound.protection.outlook.com [40.107.7.41]) by dpdk.org (Postfix) with ESMTP id 26E8C1BF7B for ; Thu, 23 Jul 2020 16:50:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P7oUKalWBP8c5cN+auX9NePJssUcD4LHCm2P3XSRTbVrJwaICPJ8XeP5uthA7RYHxunsF0jLYSoYUx01hXdvwu/ZU2am8bAg6AiHcvjYGs3JhfI4RnSWOBGWTAjw+pTtYCVdRr9ez/hb+N8Jmjpcdf1I0eu2aamB/Hngxeny9tEx2xKtOecU/z+iLt4oOg6x67xme5y0pPygD4C5TUtTiRYjj8O95EthmRDJRteMiTJ9IVsYfv1/h19U9zVc6rDf5jdcJcgMPQtM21q9EBp7LgWRKQlNHoWFyqxin2p6TqXjv39CzQmQdYY0SLeImXlWzAfZgnGn2Z8SF894Nq8vVw== 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=M0uho9Wfb8Md2cPK6R0Cz/oPU2KrlT6o7uwgJH8ve4Y=; b=FnY74x/DbZbnkz3MQL+0TP6YrWKRetBT0jj/t186xf8UQQF1j0Pr2qJZev6YPzWTfp/Tj3Dl/zqJ6jY0Sy4ERTX/nUmbdpIAgJkIh58bj+BEKuJMnC0k2BHrkqrvV3JK8KCL0TGv2P4W/RWB4L2OjP43TjALF/KoAWPcvWrokNltL/bRJ4Q2b0HWJGBN92lLy5/zl1SE6thXArztLa7PdVmWxRrfOR/8u4dwMy3CaUWtzufpt/pyHaK8ZtviemVVwxqm1B6OpQI/XDjJYlqWxyc5dIsMFl9Jkj49g1CenjJTbJYVJq0pUEWZBkOiZzq1x0cAXxkjNdvZ1kwzdhzpgg== 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=M0uho9Wfb8Md2cPK6R0Cz/oPU2KrlT6o7uwgJH8ve4Y=; b=nM1J0Do/Bbj2Hms/tMykrK+LsRC4XOwkOdDkUVBX+Wnc0lGyJWmiweDqGEPTJl860sznQ7Jyz5XKN2+L9NTKlN7gNgiFkKlxMbCEu7j96XT+8sXrrXrlVnLdpCPvTZjUjNNNR2FasHMfYCQ5GQXw7jxUyVr3P5wCKQ0ATOpW+Go= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) by AM0PR05MB6193.eurprd05.prod.outlook.com (2603:10a6:208:119::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.23; Thu, 23 Jul 2020 14:50:39 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::ecd3:6008:3784:4012]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::ecd3:6008:3784:4012%5]) with mapi id 15.20.3195.028; Thu, 23 Jul 2020 14:50:39 +0000 From: Raslan Darawsheh To: Gregory Etelson , "dev@dpdk.org" CC: Matan Azrad , Slava Ovsiienko , Shahaf Shuler Thread-Topic: [PATCH v2] net/mlx5: fix dynamic inline hint handling Thread-Index: AQHWYPyIfSHo3lU7UkCZcRs3afdnlKkVPxbQ Date: Thu, 23 Jul 2020 14:50:38 +0000 Message-ID: References: <20200723142106.2391-1-getelson@mellanox.com> In-Reply-To: <20200723142106.2391-1-getelson@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [84.242.49.134] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9dbce83b-c6fe-4986-2d56-08d82f17c3f5 x-ms-traffictypediagnostic: AM0PR05MB6193: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CVlcRQ0LLSvqiLmPSh8p+YJbAvpyb4zN3UauXMtocNfJ5PwV658WGKbIvrYbWyzd/agPgOZWoL6/Eyhx41J8yV301OhlYLDQ9/u6G9lq23qzJ2O4NOUVTmBR6tRccpZ0ljTNu60G5ErJtqPwjEPeZG/R2xpvQCj31SI/9m5IKjNJrE38q/d03EXHcNbmSoQF3vIT2P4YeHeJK8amA1ZyoZFmNGQU6x8q3P5Hcm8cze4/FkQNit5PI1JQSwUP5dqFOMH8n/lWwX5Zd3tb8xRUobZfabWVS2XJTUHcSmQAP3rb38tlXhNqOKLAvSHAvC9b7qS6NhbuuqKINTjsUMPDMA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(396003)(346002)(366004)(376002)(54906003)(26005)(9686003)(2906002)(7696005)(186003)(4326008)(33656002)(8676002)(478600001)(83380400001)(86362001)(64756008)(66446008)(66476007)(66556008)(8936002)(5660300002)(110136005)(55016002)(52536014)(66946007)(76116006)(107886003)(316002)(6506007)(71200400001)(53546011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: vTAFteM0GbApQ4rdkuaDUOziv/BCShfIDk0ocoaq5umEjfwYt0/YNSD+0TJfFdA1H6FUIMxWgzbBm2Dr4aC+UKA8T8R12XgSo9MCmyy4igezoOgUL635DSPt2esbArIEwaVjO+Azk568dyH4gNa75zFxaMovWIMQN9uHPryEqGD35ImRszEurucpIll1JoaJ6MOuIoMuHJsiME/Il2eJnQd2lhPA/7YKy0wRyV+rDjFlwORyOJ6JEnQ/HKBnHZJ8SxqCXSyj60goKczpLlmrKQkP4EOHtveKrW8/+tPfyaq4NsAfOUxUuXNcXdUXRjZaBZ9kVboJ7ovwWziF/8mfYXwypU8DnKOiULXV0MiZQrPzUzMJ5RPF31qGlxYSH2pNXrjMYdIIjYTv7/yyRC1aitAZYsqkw9J+nzVAh+wtfaNVRAm90jFndYcnvd8MBEoUKyQcGafhQseqs1hAJsZSiddrKof2DdNUtPnaQxkebDRnXcEseM6xYwTsnnuJEygS Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB6707.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9dbce83b-c6fe-4986-2d56-08d82f17c3f5 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jul 2020 14:50:38.9780 (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: 9kkGYtvDlktxkIsbEcb6dtXXGarvbgJMFEeIgspV/i4J8qyQrnxsF3HEgzZJCKgBJ7du4+U4KCKNuX4+BoHS7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6193 Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: fix dynamic inline hint handling 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: Gregory Etelson > Sent: Thursday, July 23, 2020 5:21 PM > To: dev@dpdk.org > Cc: Gregory Etelson ; Matan Azrad > ; Raslan Darawsheh ; > Slava Ovsiienko ; Shahaf Shuler > > Subject: [PATCH v2] net/mlx5: fix dynamic inline hint handling >=20 > The ConnectX NICs can transfer data from the host memory with two > approaches: provide the pointer to the data buffer, or do data inline > - copy the data to the transmit descriptor (WQE) entirely or only the > part of data. In some configurations the NIC hardware requires the > minimal data to be inline in the descriptor to operate correctly. And > there is the special dynamic flag to hint PMD not to inline the data > (for example, if buffer is located on some other device - storage or > GPU) on per packet basis. >=20 > If there was a packet with length shorter than the minimal inline data > length requested by the NIC hardware and the no-inline hint was set > the PMD tried to inline the packet with minimal required length > instead of actual packet's one. This patch adds the missed length > check into no-inline hint handling branch. >=20 > Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag") Added missing Cc: stable@dpdk.org >=20 > Signed-off-by: Gregory Etelson > Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_rxtx.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c > index 3eb0243603..1b71e94221 100644 > --- a/drivers/net/mlx5/mlx5_rxtx.c > +++ b/drivers/net/mlx5/mlx5_rxtx.c > @@ -4739,6 +4739,8 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data > *__rte_restrict txq, > txq->inlen_mode) || > (MLX5_TXOFF_CONFIG(MPW) && > txq->inlen_mode)) { > + if (inlen <=3D txq->inlen_send) > + goto single_inline; > /* > * The hardware requires the > * minimal inline data header. > @@ -4755,6 +4757,7 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data > *__rte_restrict txq, > } > goto single_no_inline; > } > +single_inline: > /* > * Completely inlined packet data WQE: > * - Control Segment, SEND opcode > -- > 2.25.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh