From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-f195.google.com (mail-ua0-f195.google.com [209.85.217.195]) by dpdk.org (Postfix) with ESMTP id 6A2755F16 for ; Fri, 30 Mar 2018 07:46:51 +0200 (CEST) Received: by mail-ua0-f195.google.com with SMTP id n20so4888231ual.7 for ; Thu, 29 Mar 2018 22:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=lNDI4/hNTfX+iRxMqNI08nXT8i1kYXxS9szn7qg0bLw=; b=Ps8lygV+Y+p7gbyJArEwWVSCy3fDiC+2t8F9AydRwz8PhifZ/fqcWUf5WbajVrV4Nz fEnh6qc3ShhchogVTO/Wg7hMGfKd8DXWrRvLh6pujsuZi3v5U8Sa19oUhOvJERQVOKmC wGmPzVloMemT5shY1bzQMAjZpq+r0XV3A3GVxySoK38D6zYUd5bmVWHbcHRVp4+SS1oO SNuljquwMysijI6mrATfWQWrjlksC0rmD8xxZoZLBBRlGVXzx70JmxdPoJOREC5ZjHTU 74nWhSndsCBrweGdx6g3yvwQjbO9mQ0KJu08Xee2Nr9Xqe6Yc4ZxRQEMt9HLo4rYzv+Y bSXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=lNDI4/hNTfX+iRxMqNI08nXT8i1kYXxS9szn7qg0bLw=; b=c3eT7+6LQa67ieIEJdWm+wKGzdIF03MSFm4rN2qZgHc42ZOajiz5d15Grxtk+tS2Yh F/gXQ0FPRq8O9zFkssFVp/kA6SedKk2wiq2i/KjWvsBbnECQvgGnqL2KmfnwSn//6y7Y PjfQ/W4xopK8exVLT+9NF/APD+sktZaZmr2T7/3Up53Irlfp1Gter1JXB5oOR6KuvtXv noKzDKrdF0Ac8IJRQOgYIXHeK1Mrjti2gViXPYu5DwfPCPW2HFZ32QfFAU2ubywOHhNW GigiUNlrrb2N0kVhZd1gZH5m8eT4D6W9MHvxwOl2HL0ngvDgbsOd7MySLtH5HSNQUNK8 rACA== X-Gm-Message-State: AElRT7EXeUBw5vw0+8hlLKjbPRcNX6LQeNJ4O3byrX497qfkWvPfIwyn lDXl3e+YT2WTSq9GXOQTgdNb+cZIa0aAzXX3eEU= X-Google-Smtp-Source: AIpwx4+bltAoEthAa8Ao+E56spmJkKGuC2ammntm2qUMaXwa+VZhE/uHt0YHSFpnJCjpggJgL+CGJVJJeWEg/8glf30= X-Received: by 10.176.2.16 with SMTP id 16mr7826511uas.26.1522388810817; Thu, 29 Mar 2018 22:46:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.157.14 with HTTP; Thu, 29 Mar 2018 22:46:30 -0700 (PDT) In-Reply-To: <20180329204624.GA23501@yongseok-MBP.local> References: <1522322725-6244-1-git-send-email-huangbin.mails@gmail.com> <20180329204624.GA23501@yongseok-MBP.local> From: Bin Huang Date: Fri, 30 Mar 2018 13:46:30 +0800 Message-ID: To: Yongseok Koh Cc: =?UTF-8?Q?N=C3=A9lio_Laranjeiro?= , dev@dpdk.org, Adrien Mazarguil , bin.huang@hxt-semitech.com, jie2.liu@hxt-semitech.com, bing.zhao@hxt-semitech.com, zhiqiang.zhang@hxt-semitech.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] net/mlx5: add ptype table idx for TCP ACK packets 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: , X-List-Received-Date: Fri, 30 Mar 2018 05:46:51 -0000 Hi Yongseok, Thanks for the comments, I have submitted v2 patch following your comments. https://dpdk.org/dev/patchwork/patch/36763/ On Fri, Mar 30, 2018 at 4:46 AM, Yongseok Koh wrote: > On Thu, Mar 29, 2018 at 07:25:25PM +0800, Bin Huang wrote: >> From: Bin Huang >> >> According to CQE format: >> - l4_hdr_type: >> 0 - None >> 1 - TCP header was present in the packet >> 2 - UDP header was present in the packet >> 3 - TCP header was present in the packet with Empty >> TCP ACK indication. (TCP packet flag is set, >> and packet carries no data) >> 4 - TCP header was present in the packet with TCP ACK indication. >> (TCP packet flag is set, and packet carries data). >> >> A packet should be identified as TCP packet if l4_hdr_type is 1, 3 or 4. >> Add corresponding idx of TCP ACK to ptype table. >> >> previous discussion: >> https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fwww= .mail-archive.com%2Fusers%40dpdk.org%2Fmsg02980.html&data=3D02%7C01%7Cyskoh= %40mellanox.com%7C6e489616778d4440d68708d59567c921%7Ca652971c7d2e4d9ba6a4d1= 49256f461b%7C0%7C1%7C636579195347091211&sdata=3D%2BPG5X1%2BOR0tnGMw4QKQyz1Q= rMNqOQ%2BQ5WeJRgjrY7j8%3D&reserved=3D0 >> >> Signed-off-by: Bin Huang >> --- > > Thank you for the patch and nice catch! > Only small comments. > >> drivers/net/mlx5/mlx5_rxtx.c | 34 +++++++++++++++++++++++++++++++++- >> 1 file changed, 33 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c >> index dc4ead9..e9c5a6f 100644 >> --- a/drivers/net/mlx5/mlx5_rxtx.c >> +++ b/drivers/net/mlx5/mlx5_rxtx.c >> @@ -81,11 +81,19 @@ >> RTE_PTYPE_L4_FRAG; >> (*p)[0x22] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> RTE_PTYPE_L4_FRAG; >> - /* TCP */ >> + /* TCP - Support TCP ACK indication */ > > This comment might not be needed. This can give wrong impression that the > following is to support TCP ACK. Let's leave it as is. > > Or, in order to be informative, you can leave separate comments below for= each > two. For example, > >> (*p)[0x05] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> RTE_PTYPE_L4_TCP; >> (*p)[0x06] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> RTE_PTYPE_L4_TCP; > + /* TCP ACK indication */ >> + (*p)[0x11] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> + RTE_PTYPE_L4_TCP; >> + (*p)[0x12] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> + RTE_PTYPE_L4_TCP; > + /* TCP ACK */ >> + (*p)[0x0d] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> + RTE_PTYPE_L4_TCP; >> + (*p)[0x0e] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> + RTE_PTYPE_L4_TCP; > > Please sort it. Better to move 0x0d and 0x0e earlier. > Can you also repeat it after 0x85 and 0x86? > >> /* UDP */ >> (*p)[0x09] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> RTE_PTYPE_L4_UDP; >> @@ -141,12 +149,36 @@ >> (*p)[0x46] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | >> RTE_PTYPE_INNER_L4_TCP; >> + (*p)[0x4d] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | >> + RTE_PTYPE_INNER_L4_TCP; >> + (*p)[0x4e] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | >> + RTE_PTYPE_INNER_L4_TCP; >> + (*p)[0x51] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | >> + RTE_PTYPE_INNER_L4_TCP; >> + (*p)[0x52] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | >> + RTE_PTYPE_INNER_L4_TCP; >> (*p)[0xc5] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | >> RTE_PTYPE_INNER_L4_TCP; >> (*p)[0xc6] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | >> RTE_PTYPE_INNER_L4_TCP; >> + (*p)[0xcd] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | >> + RTE_PTYPE_INNER_L4_TCP; >> + (*p)[0xce] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | >> + RTE_PTYPE_INNER_L4_TCP; >> + (*p)[0xd1] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | >> + RTE_PTYPE_INNER_L4_TCP; >> + (*p)[0xd2] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN = | >> + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | >> + RTE_PTYPE_INNER_L4_TCP; >> /* Tunneled - UDP */ >> (*p)[0x49] =3D RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN = | >> RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | > > Thanks, > Yongseok Thanks, Bin