From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by dpdk.org (Postfix) with ESMTP id 6A6BF2B82 for ; Thu, 29 Mar 2018 13:25:32 +0200 (CEST) Received: by mail-pf0-f194.google.com with SMTP id m68so3001290pfm.11 for ; Thu, 29 Mar 2018 04:25:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=rKrLumsTE6hRdSSjCVrff+UtdlD/2t1A/TnKYgEhlHU=; b=gBB1uXgbzdgVJZqnZ1+oT1gabsmuJ0EtYcGzJjQmbhOxFb+VMrQbKHmPn2cMQyTdrM Bdhym6bIEZ23fY6UFr2NHjo9TTbp2YKBLmuErd10s4c0aB9e5OQzzkPJs03/rJLPnCCJ tIthqimM5r3QmkVmDklUrbJrfVo335viaR+itDrYDA/5y8LFY8NypRGBlPfXXimLqSTT 7tt4akM5qqG3gtPcTW4f+mfPchm36OFpZyJVs4MoQfjjGtMQM5vhXzwDuLcBJByAmj8u 9jnh6syIvvK6OSaXU6D43SLf/fhDw6mscwFBkHVr+4uToOAiSPw/BOj0IINSnY329VY5 09sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rKrLumsTE6hRdSSjCVrff+UtdlD/2t1A/TnKYgEhlHU=; b=UbwnAwsPOrBVpw3SUAF7xTx+TQi7QEQj3vrJSUeg621Y5/GTmCguV87WWn9eOgOoP2 jaHQiN8JtnGpmFQYCmQRreVBQGuX68HzhjykvJEOYXWUeTAyxlrewnLc6DZARqFKfObl xACWKi1JmEgDL6k/G3jZz9i0GXgOwxVCbwP/GoS0gvP7pCvNJE8F2sIngdfRSPQKyiWn 6qd2dZ+4rfORwYyb/BkX3sXmRm07XEEcqXC5a6rF01ei060uaqu3C2dkKVwDZbrinHx3 MYAfSfZtyFsqj+ufYpe4ClN3VNH6RFAt9D8fkam/9u0w4bJfDi0fdPI2I1kDM4H4XAnc aRcQ== X-Gm-Message-State: AElRT7H+Pdx+MIGL/o91n9CdZTC2iFAJf84P+I/NZlQ+D9t44JbVUfju dbkYfryGTNIlLeY2ZJZq85AUU4OuSNo= X-Google-Smtp-Source: AIpwx4/TOp6zShvt6jpYoxZR8WA6KbZ9E/c/s5uSLbTAlSi3Tz9XxiN7+XGvvrQ22rm13Df1U0U8JQ== X-Received: by 10.98.97.1 with SMTP id v1mr6110405pfb.119.1522322731624; Thu, 29 Mar 2018 04:25:31 -0700 (PDT) Received: from localhost.localdomain.localdomain ([101.81.130.12]) by smtp.gmail.com with ESMTPSA id t25sm12935627pfk.69.2018.03.29.04.25.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 04:25:31 -0700 (PDT) From: Bin Huang To: nelio.laranjeiro@6wind.com, yskoh@mellanox.com Cc: dev@dpdk.org, adrien.mazarguil@6wind.com, bin.huang@hxt-semitech.com, jie2.liu@hxt-semitech.com, bing.zhao@hxt-semitech.com, zhiqiang.zhang@hxt-semitech.com Date: Thu, 29 Mar 2018 19:25:25 +0800 Message-Id: <1522322725-6244-1-git-send-email-huangbin.mails@gmail.com> X-Mailer: git-send-email 1.9.0 Subject: [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: Thu, 29 Mar 2018 11:25:32 -0000 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://www.mail-archive.com/users@dpdk.org/msg02980.html Signed-off-by: Bin Huang --- 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] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG; - /* TCP */ + /* TCP - Support TCP ACK indication */ (*p)[0x05] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_TCP; (*p)[0x06] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_TCP; + (*p)[0x11] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_L4_TCP; + (*p)[0x12] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_L4_TCP; + (*p)[0x0d] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_L4_TCP; + (*p)[0x0e] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_L4_TCP; /* UDP */ (*p)[0x09] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_UDP; @@ -141,12 +149,36 @@ (*p)[0x46] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_INNER_L4_TCP; + (*p)[0x4d] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_INNER_L4_TCP; + (*p)[0x4e] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_INNER_L4_TCP; + (*p)[0x51] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_INNER_L4_TCP; + (*p)[0x52] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_INNER_L4_TCP; (*p)[0xc5] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_INNER_L4_TCP; (*p)[0xc6] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_INNER_L4_TCP; + (*p)[0xcd] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_INNER_L4_TCP; + (*p)[0xce] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_INNER_L4_TCP; + (*p)[0xd1] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_INNER_L4_TCP; + (*p)[0xd2] = 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] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | -- 1.9.0