From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by dpdk.org (Postfix) with ESMTP id C6C6D4C74 for ; Fri, 30 Mar 2018 07:14:17 +0200 (CEST) Received: by mail-pf0-f193.google.com with SMTP id t16so4767283pfh.4 for ; Thu, 29 Mar 2018 22:14:17 -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=IzdZ/UxZ1L7JA8B/kXdGS/+GadfLpry1J9W6E9/hbwc=; b=eBe41MdHQuHc6uj9Jqpr/f+SeuIdFx5SDAiuMlEXos+ger62ZdLI2UPkm13d5jz9sM 0pHmsGNAyimEYCqBHnZWzPbMHHrgdloNsi84x3UVkz6RWyyFn7lR0qqlJFO1VjvOP1Fj KMAg78S1LwYkH1zdRCn3iPMEfQFoekpNZgxYnGWmCJanLhFjXL1fqi5f1pDXDImpT70G jXuxDqBOgvHh2PtBUzoHQ+nQk0pmniXfdIVz73kHVOD1mZ32CewwBKgh2QWfZ+V1+LPr oTzNvkCljgF7D/MfkcD6OqvtubhLBTOziRkCagslBjrVie90Xy8u2LpIsONz0XugJ+A1 1tMw== 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=IzdZ/UxZ1L7JA8B/kXdGS/+GadfLpry1J9W6E9/hbwc=; b=HeaExvIKY8GJhf37AhlAGzF7zT8zsW/YVTq3OZCAPbBC2ckyMdT9hGsL9v1KN+aw6y 8vubugSl314tdJifSeYn1tI5ZsNX7aJXSLB6UsC9bW36cNtF6ehxBYC2+1lAwMCUWSgp Z6nDk0n6oertI6Wx2n1r8/LqN645fZlxX8cCgS7Vy8Szq4GznJLGiZyaRK1p1DWJ3HUf I5QUQZZGu86Cd+3kVY0UivI+znkfg8MbA49zzKovO6gr1IaEjBIzhJmGBjGtjTjHaz8B ajZqaO//1ToyfsyL1tk6qJlRd/U1htlVAoNUuTuj/MBsj31sXg5p2bVSESCEPTnMspbk 5W3A== X-Gm-Message-State: AElRT7Hjff4HpZP6gp+MaQ1y4pGnagkNFSQAEZtGguY9/9rtObcqL8cO 0w1bu22xK7Eshhwm8QXQb0M= X-Google-Smtp-Source: AIpwx49w6hbxt2Y0tHd4CABfhk3HWTMNsproRHRaREN6JudT0ZHo4LCqCBOJlOR9MXHUKMzpMobL3g== X-Received: by 2002:a17:902:8f8b:: with SMTP id z11-v6mr11717173plo.316.1522386857094; Thu, 29 Mar 2018 22:14:17 -0700 (PDT) Received: from localhost.localdomain.localdomain ([101.81.130.12]) by smtp.gmail.com with ESMTPSA id 203sm15360831pfb.50.2018.03.29.22.14.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 22:14:16 -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: Fri, 30 Mar 2018 13:13:38 +0800 Message-Id: <1522386818-6838-1-git-send-email-huangbin.mails@gmail.com> X-Mailer: git-send-email 1.9.0 Subject: [dpdk-dev] [PATCH v2] 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:14:18 -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 --- v1: initial version v2: following review comments from Yongseok drivers/net/mlx5/mlx5_rxtx.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index dc4ead9..3cf4c24 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -86,6 +86,14 @@ RTE_PTYPE_L4_TCP; (*p)[0x06] = 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; + (*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; /* UDP */ (*p)[0x09] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_UDP; @@ -104,6 +112,14 @@ RTE_PTYPE_L4_TCP; (*p)[0x86] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_TCP; + (*p)[0x8d] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_L4_TCP; + (*p)[0x8e] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_L4_TCP; + (*p)[0x91] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | + RTE_PTYPE_L4_TCP; + (*p)[0x92] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | + RTE_PTYPE_L4_TCP; (*p)[0x89] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_UDP; (*p)[0x8a] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | @@ -141,12 +157,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