From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00083.outbound.protection.outlook.com [40.107.0.83]) by dpdk.org (Postfix) with ESMTP id 42AF17CE1 for ; Tue, 27 Mar 2018 23:13:05 +0200 (CEST) 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; bh=wYbJ4Daqv1qR1hoYwUBR8URRGfAqxI+ccAtpEC9li3g=; b=x6rjKxKBnW/M6dmn4DtBs3ZAm6/Y6L865sm76dXvIPDdZIx0cSi7kjq5ixFS9H4f0+OUScO3RYLd3fY6NBRqFpTd/ZxVqwR0WyTlvcthN17GBO3z7diPaxjMYhoYYdRHM1XODSb3DZKgVV576DDQWfKegeOUSzmFsM+16gh/fiw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from yongseok-MBP.local (209.116.155.178) by VI1PR0501MB2045.eurprd05.prod.outlook.com (2603:10a6:800:36::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Tue, 27 Mar 2018 21:13:02 +0000 Date: Tue, 27 Mar 2018 14:12:33 -0700 From: Yongseok Koh To: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Cc: Bin Huang , users@dpdk.org, Adrien Mazarguil Message-ID: <20180327211021.GA16677@yongseok-MBP.local> References: <20180327071434.bmkbwauak3dsbjtm@laranjeiro-vm.dev.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180327071434.bmkbwauak3dsbjtm@laranjeiro-vm.dev.6wind.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: CO2PR18CA0044.namprd18.prod.outlook.com (2603:10b6:104:2::12) To VI1PR0501MB2045.eurprd05.prod.outlook.com (2603:10a6:800:36::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5fcfcb5f-b9e2-4e47-a6f2-08d59427873c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2045; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 3:19j57jdOdJ/wBG+y/JhNgTz3aQZMc52Eh9MJymPFmvSbkIPW8Ivf+c+QMFrRM0nh3f9xFn7c6sBceRlngwnUwal3G8yGMaGf11voskjlK8G3UGsBluY0pw4mQrKAsX2tKimMiY0T+b07tYo8dFJ8kaEvvcbYEUd+lMeuwGZI74J3f74F1rqYUdyFIAFjMI7vS23EG7XSvHj07GbAUwSDkZ4GJcO8sh7+kWOVXyGi+iAbuUh8AfyxCsVdxyV0eqtF; 25:b9HcKxzeKpJH4Kz6dCc1l/b8spmxdXw6M7SmY1D1FqFywDOu1kUBAxvMD876AddWL+FaAP23gukTyCw7ze6zZWmlMbaO4B9KceBtCQ4u6OM5vags2dsaEspXBo2+E0dQBRhZlIIfbInHFl+c5U8Y+d9wge4iK/VShYXSCtODFv/AVTS6oxL+1uteWRyofR+xTzqqiogL2+aGijjoVvxSY/BG98y5BGfpx62auMOtyn4OeV1OUYKvNF6XxUK5MMyonNlQpOOjMHz3YPH3sgcQ+0K2URAcJTIOr+RRliU6YBU2R5I9cKSX06c7tiSD331+aExW756IFpdy7InJPmMvkw==; 31:06J7LdE8uTT17zVdVFFuilrbruQ1RsoHb3zWk2uDUvc8L2dFpzPpkFxLzJgQDcMks+2txA6Z57N3bIhXzXjrt0NI453/GIggqXWhNNFhEhgM6dJhYoENxOdxf0FNRYKalIJZiURhbg2ZpLiSRf1I+ggSsQG61UE2/toxpXXxapl/oZIqFw0IIn+MVT3gI5wXD4vzDb6xY0S2INxurgy/tYJ5mP2FDcP9/EvEn2CStRI= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2045: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 20:GOLq2itfvL7z0pZujK+zqPECc5TqqLb4bZJD05vdcLHuuFle18BxjFe2x/hF7StXHlYTlCakX8Hc1WkfwM9/saDW3T69FWUhCFFzY6ttKso0Kwj4ROdA5yHPZY126OUSYwxbZjDadH+9HPZjwDKYAIszSIr4+jK6Im4zPk8YB2/leDdepkOUhZxBBGRfEOZwXGzz8/vJBZoX9tzLg0XDCWZFgjy67dfy1HrRCt+fvVjlM05ZOKZASX7XucZjBMbVjeWkPxgzfLyXO6Cqpo+Q7kB/oTeDPUVA5b3Cy/nva1sB63errF3zvRuhVJ7bLP5LKD0jRJKcs+CO+AME4aJm3Z96glvnm8lvaDmoFC0SYU8geepH18OBGY4IdEF43yQzuafWiH0kb1OaQKJqHEXlR5ixuY7QjI6xtALAsAUjKgf6QYrpVupYPgbNv4qv819C0O5AltZD0r4KP3557nXYELe7vxP+Rzn4zyNMM6eX7956Bzk/MaKna7/v75qDJlfc; 4:M12V9WPXFlSajRz6fkUIjdkW6zwv2or5L3xvCjLGcmGSsynchcY1EAx3QOmyCwpAgaLqMNoZYTR2OhURXFv9OOGspnPB0d8Csyj2uaE4OgTsjRr7EKfy0/lEuKBI+tpAY5cDyVvHcaabSJlQnZiwLG1iYUh014H6zHASnHB8lH7xsqaIhrpxIDXsuhzPbO2VPD6/Ym63kuH4+uOoKRpO/YnU3w4b/W/cL4JbDfFQhsc33e0iwWmePG+P6Zd6Di1mq4RQhI2DOom9THRJN+n1jQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231221)(944501327)(52105095)(6055026)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR0501MB2045; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2045; X-Forefront-PRVS: 0624A2429E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(39380400002)(39860400002)(346002)(396003)(199004)(189003)(966005)(4326008)(25786009)(97736004)(86362001)(50466002)(47776003)(66066001)(23756003)(106356001)(39060400002)(33656002)(53376002)(53936002)(98436002)(6246003)(105586002)(9686003)(6306002)(2906002)(55016002)(446003)(6116002)(1076002)(3846002)(305945005)(5660300001)(76176011)(33896004)(68736007)(7696005)(52116002)(26005)(386003)(6506007)(186003)(316002)(81166006)(54906003)(81156014)(8936002)(16526019)(6916009)(6666003)(8676002)(478600001)(476003)(486005)(486005)(58126008)(7736002)(2870700001)(956004)(229853002)(11346002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2045; H:yongseok-MBP.local; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1; VI1PR0501MB2045; 23:HalJZBI9OWaqtWw/tB9onB/r8VLOW3hgPG+kQ?= =?iso-8859-1?Q?E8K/jA6cs4FvZubDAOdXh1aOaNA8JPZ5A34vjfWbSOBdaR23lcNo916ukk?= =?iso-8859-1?Q?ISa1SPPQnecCrIcM25ow/HkpFqqr5AYCVEjip+LToACwW9OC+axa++sT/1?= =?iso-8859-1?Q?/9OgXZBUas8dGaqwAY3Ur1UmRBumI32ADSGxRBHMSA+9efxnQwCd75y3MW?= =?iso-8859-1?Q?v3Aw7gEbM5cj0yr8Wjd+eyj2uGzl34giQXXyWy+yr7yXMvb7PsD7yPV6tm?= =?iso-8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IeS/s54FIoybqoqqc+T6kRecvSifQN2HMhl7d1iW8IVmis5lADAN4chV44uy8WO8zbwzCBt4pL7pp1nw==; 5:HD3ViDG0fmz6k0HBQv4NHXN+6z6lhuP2Gk+ps641NP+yuiLn7eYTVCnwdo3g+Ug3GuJEYz3HTqOozH0TbTmZCpf/mHR/6vEn6Er6OMXdHBLfn0afiqDIvig8OqnIVZT7/5xEfI3iMtqcMZo2rUlpCeyQ+3ejOrbJlO9nn+5lnG8=; 24:YJQM1W14MR8GGD+/rWbWIjK3VNu+v0nqGKEk5krpE2WQuk6wlry26nUvH4kHXgqwI2Xkb0R7D7St4FJHpOM3223cgdultmdJvDjJajSxzJY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 7:RAjpkugxjj49if9X0q/Ilr+pKffVEG4QlJLv859kmyA/nrmof7D/vpKL8oWvQPsDS/DE5023FY78u1PdHz0gTgviKhBCScanhxKoHUP4rswcvGTNGXUc39YXY15jiwCJDGUm63dM8Ie8W7ReIRiAEu8gL9ANnBAsxf/Cx2gRcBpmJHQXJCf/ZmD6tb1I2KTfuIZz4lDdireR3j5hUG2tH4vuQ6IpBy+DojgKu7p9/4q1/14oAtEliCPY8W0MzIwM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2018 21:13:02.5389 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fcfcb5f-b9e2-4e47-a6f2-08d59427873c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2045 Subject: Re: [dpdk-users] mlx5 driver didn't set corresponding packet_type flag in TCP_ACK packet case X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2018 21:13:05 -0000 On Tue, Mar 27, 2018 at 09:14:34AM +0200, Nélio Laranjeiro wrote: > Hi Bin, > > On Mon, Mar 26, 2018 at 06:09:35PM +0800, Bin Huang wrote: > > Greetings all, > > > > > > I have run l3fwd example program using two mlx5 NIC( > > MLNX_OFED_LINUX-4.3-1.0.1.0 ) base on DPDK 17.08 and use pktgen as > > flowgen. > > > > This demo provided by DPDK works fine in UDP case, but in pktgen TCP > > case, l3fwd can't forward packet to nexthop port. > > > > > > After look into function rxq_cq_to_pkt_type(), I found while handling > > IPv4 TCP ACK packets: > > > > > l4_hdr_type bits[2:0] in CQE is (100) > > > > > l3_hdr_type bits[1:0] in CQE is (10) > > > > > > It looks fine according to CQE format in > > doc: > > > > > 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). > > > > > l3_hdr_type: > > > > 00 - None > > 01 - IPv6 > > 10 - IPv4 > > > > > > But combined l4_hdr_type and l3_hdr_type into idx, the idx would be > > 0x12, which was not reserved in mlx5_set_ptype_type(). > > > > Then RTE_PTYPE_UNKNOWN would be return to caller which caused > > sub-sequence procedure going wrong. > > > > > > Did I omit any possible configuration to make ptype flag work for TCP > > ACK packets, or should I add (*p)[0x12] in mlx5_set_ptype_type() to > > make this work? > > According to the mlx5_set_ptype_table(), the index of the array is a > little more complex: > > /* > * The index to the array should have: > * bit[1:0] = l3_hdr_type > * bit[4:2] = l4_hdr_type > * bit[5] = ip_frag > * bit[6] = tunneled > * bit[7] = outer_l3_type > */ > > If in the CQE the other three fields are 0, your hypothesis is correct > and index 0x12 should be filled. > > Can you also check it? When I changed it to the current array-based conversion, I followed the use of MLX5_CQE_RX_TCP_PACKET [1], but it looks Bin is right. A packet should be identified as TCP packet if l4_hdr_type is 1, 3 or 4. Bin, will you send out a patch for it or shall I? I'd love to see a patch from you. :-) [1] http://dpdk.org/browse/dpdk/commit/?id=ea16068c00647fb6c7fe8704d8ad2adff6bf378f Thanks, Yongseok