From patchwork Sat Jul 17 02:02:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 96006 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C72BA0C4A; Sat, 17 Jul 2021 04:04:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2514A413A5; Sat, 17 Jul 2021 04:03:56 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 04FA14067B for ; Sat, 17 Jul 2021 04:03:45 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GRWXS3b0HzcdC1 for ; Sat, 17 Jul 2021 10:00:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sat, 17 Jul 2021 10:03:43 +0800 From: "Min Hu (Connor)" To: CC: , Date: Sat, 17 Jul 2021 10:02:51 +0800 Message-ID: <1626487376-30038-4-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626487376-30038-1-git-send-email-humin29@huawei.com> References: <1626487376-30038-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 3/8] net/hns3: fix incorrect comment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" From: Chengwen Feng This patch fixed incorrect comment of hns3_parse_fdir_filter(). Fixes: fcba820d9b9e ("net/hns3: support flow director") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_flow.c | 59 +++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 82810e0..755a6f2 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1134,42 +1134,29 @@ is_tunnel_packet(enum rte_flow_item_type type) } /* - * Parse the rule to see if it is a IP or MAC VLAN flow director rule. - * And get the flow director filter info BTW. - * UDP/TCP/SCTP PATTERN: - * The first not void item can be ETH or IPV4 or IPV6 - * The second not void item must be IPV4 or IPV6 if the first one is ETH. - * The next not void item could be UDP or TCP or SCTP (optional) - * The next not void item could be RAW (for flexbyte, optional) - * The next not void item must be END. - * A Fuzzy Match pattern can appear at any place before END. - * Fuzzy Match is optional for IPV4 but is required for IPV6 - * MAC VLAN PATTERN: - * The first not void item must be ETH. - * The second not void item must be MAC VLAN. - * The next not void item must be END. - * ACTION: - * The first not void action should be QUEUE or DROP. - * The second not void optional action should be MARK, - * mark_id is a uint32_t number. - * The next not void action should be END. - * UDP/TCP/SCTP pattern example: - * ITEM Spec Mask - * ETH NULL NULL - * IPV4 src_addr 192.168.1.20 0xFFFFFFFF - * dst_addr 192.167.3.50 0xFFFFFFFF - * UDP/TCP/SCTP src_port 80 0xFFFF - * dst_port 80 0xFFFF - * END - * MAC VLAN pattern example: - * ITEM Spec Mask - * ETH dst_addr - {0xAC, 0x7B, 0xA1, {0xFF, 0xFF, 0xFF, - 0x2C, 0x6D, 0x36} 0xFF, 0xFF, 0xFF} - * MAC VLAN tci 0x2016 0xEFFF - * END - * Other members in mask and spec should set to 0x00. - * Item->last should be NULL. + * Parse the flow director rule. + * The supported PATTERN: + * case: non-tunnel packet: + * ETH : src-mac, dst-mac, ethertype + * VLAN: tag1, tag2 + * IPv4: src-ip, dst-ip, tos, proto + * IPv6: src-ip(last 32 bit addr), dst-ip(last 32 bit addr), proto + * UDP : src-port, dst-port + * TCP : src-port, dst-port + * SCTP: src-port, dst-port, tag + * case: tunnel packet: + * OUTER-ETH: ethertype + * OUTER-L3 : proto + * OUTER-L4 : src-port, dst-port + * TUNNEL : vni, flow-id(only valid when NVGRE) + * INNER-ETH/VLAN/IPv4/IPv6/UDP/TCP/SCTP: same as non-tunnel packet + * The supported ACTION: + * QUEUE + * DROP + * COUNT + * MARK: the id range [0, 4094] + * FLAG + * RSS: only valid if firmware support FD_QUEUE_REGION. */ static int hns3_parse_fdir_filter(struct rte_eth_dev *dev,