From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E24BA0C47; Tue, 15 Jun 2021 14:46:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF9A14067A; Tue, 15 Jun 2021 14:46:10 +0200 (CEST) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by mails.dpdk.org (Postfix) with ESMTP id 686EE40140 for ; Tue, 15 Jun 2021 14:46:09 +0200 (CEST) Received: by mail-io1-f43.google.com with SMTP id s19so33508223ioc.3 for ; Tue, 15 Jun 2021 05:46:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+BxcnfhYgwlF/o7BLYmrcCygNnnViMX4eiUyjI9sq0E=; b=CAvcdyWSHHs6zJF3KDWzw2c3TmbQ2vf9c+0evLcsLgonF0wNYsb3jgEXYMlXnUie3O 2nze/wJYEgYCWOjSvtqgvE31Cw/n5Tm56EfIa4VhwoOhc+xrHArkct+nivDjsK2NiaMS fkY8FbYOYkZmrBIcQa/VY5vHGUHj1kVEEqevTEcXL3269toL/65sLpZFZ5IL+U5gL0Fc s5CS0ZOQWy6V0OVzGVx4mPCT7qf2iAwCvpUg2/KUByzBwOAqcJ2MahvlZw8WpmpUiSN3 ZL23OOT1UI+q/VDVO2tY4uZ2cj+G1+CSUaH3439hjCksykBQ40xgHQ2uu8j8BhFXLUHM biAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+BxcnfhYgwlF/o7BLYmrcCygNnnViMX4eiUyjI9sq0E=; b=CvF7kGrqYnkoGmLkFSzSA0Nu1PQaCd4Eg+d0Hj/8usQfEZFxabT7sQH+qPHPsNVH91 spnBwpVSW948APXJCdSajIwO37MTbUcokdy/gUhFRvdTYCH6CAdxFl50gRMT+kjzgeSX t6W3871+7HHCTRjXHXkzZ9CqqbwtLcCAoxu/bxhyIGftVL+q/FO8dx9axLD93mXJOfvO mCiI5RJJr/wCrCzE0dNfdcSeTeJEkojq3qCITt8vZ3D5VJbwiIeg+aO/S3134teLZxWZ TqK4XWLDP/d+vBBGGlUSlWhY5shmoAVN3rqNJ5tVCsshQVFGEaptgbrbrvPQl3N/sx/b cQPQ== X-Gm-Message-State: AOAM530/Npsxj9zRgFHIxpeBC4BFnPlCnJIawqw7ecHpiiizKkttwKi8 VmZ80MQ9gjQaQOJwFr1CGiCWJ0xzgG34j3yMrbY= X-Google-Smtp-Source: ABdhPJxLMuKjL1GbVVtGH02JwKDqmAvrXFQ9RckhHIB484Jg2PDPagMZYu/6/8IY3vg0zBnujswk4dJurZFEbdguAug= X-Received: by 2002:a6b:8f83:: with SMTP id r125mr2613883iod.123.1623761168552; Tue, 15 Jun 2021 05:46:08 -0700 (PDT) MIME-Version: 1.0 References: <20210306153404.10781-1-ndabilpuram@marvell.com> <20210607175943.31690-1-ndabilpuram@marvell.com> <20210607175943.31690-50-ndabilpuram@marvell.com> In-Reply-To: <20210607175943.31690-50-ndabilpuram@marvell.com> From: Jerin Jacob Date: Tue, 15 Jun 2021 18:15:52 +0530 Message-ID: To: Nithin Dabilpuram Cc: dpdk-dev , Jerin Jacob , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Pavan Nikhilesh , Kiran Kumar K , Satheesh Paul , Ashwin Sekhar Thalakalath Kottilveetil Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 49/62] net/cnxk: add initial version of rte flow support 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" On Mon, Jun 7, 2021 at 11:39 PM Nithin Dabilpuram wrote: > > From: Kiran Kumar K > > Adding initial version of rte_flow support for cnxk family device. > Supported rte_flow ops are flow_validate, flow_create, flow_crstroy, > flow_flush, flow_query, flow_isolate. > > Signed-off-by: Kiran Kumar K > --- > doc/guides/nics/cnxk.rst | 118 ++++++++++++++++ > doc/guides/nics/features/cnxk.ini | 42 ++++++ > drivers/net/cnxk/cnxk_rte_flow.c | 282 ++++++++++++++++++++++++++++++++++++++ > drivers/net/cnxk/cnxk_rte_flow.h | 69 ++++++++++ > drivers/net/cnxk/meson.build | 1 + > 5 files changed, 512 insertions(+) > create mode 100644 drivers/net/cnxk/cnxk_rte_flow.c > create mode 100644 drivers/net/cnxk/cnxk_rte_flow.h > > diff --git a/doc/guides/nics/cnxk.rst b/doc/guides/nics/cnxk.rst > index c2a6fbb..87401f0 100644 > --- a/doc/guides/nics/cnxk.rst > +++ b/doc/guides/nics/cnxk.rst > @@ -24,6 +24,7 @@ Features of the CNXK Ethdev PMD are: > - Multiple queues for TX and RX > - Receiver Side Scaling (RSS) > - MAC filtering > +- Generic flow API > - Inner and Outer Checksum offload > - Port hardware statistics > - Link state information > @@ -222,3 +223,120 @@ Debugging Options > +---+------------+-------------------------------------------------------+ > | 2 | NPC | --log-level='pmd\.net.cnxk\.flow,8' | > +---+------------+-------------------------------------------------------+ > + > +RTE Flow Support > +---------------- > + > +The OCTEON CN9K/CN10K SoC family NIC has support for the following patterns and > +actions. > + > +Patterns: > + > +.. _table_cnxk_supported_flow_item_types: > + > +.. table:: Item types > + > + +----+--------------------------------+ > + | # | Pattern Type | > + +====+================================+ > + | 1 | RTE_FLOW_ITEM_TYPE_ETH | > + +----+--------------------------------+ > + | 2 | RTE_FLOW_ITEM_TYPE_VLAN | > + +----+--------------------------------+ > + | 3 | RTE_FLOW_ITEM_TYPE_E_TAG | > + +----+--------------------------------+ > + | 4 | RTE_FLOW_ITEM_TYPE_IPV4 | > + +----+--------------------------------+ > + | 5 | RTE_FLOW_ITEM_TYPE_IPV6 | > + +----+--------------------------------+ > + | 6 | RTE_FLOW_ITEM_TYPE_ARP_ETH_IPV4| > + +----+--------------------------------+ > + | 7 | RTE_FLOW_ITEM_TYPE_MPLS | > + +----+--------------------------------+ > + | 8 | RTE_FLOW_ITEM_TYPE_ICMP | > + +----+--------------------------------+ > + | 9 | RTE_FLOW_ITEM_TYPE_UDP | > + +----+--------------------------------+ > + | 10 | RTE_FLOW_ITEM_TYPE_TCP | > + +----+--------------------------------+ > + | 11 | RTE_FLOW_ITEM_TYPE_SCTP | > + +----+--------------------------------+ > + | 12 | RTE_FLOW_ITEM_TYPE_ESP | > + +----+--------------------------------+ > + | 13 | RTE_FLOW_ITEM_TYPE_GRE | > + +----+--------------------------------+ > + | 14 | RTE_FLOW_ITEM_TYPE_NVGRE | > + +----+--------------------------------+ > + | 15 | RTE_FLOW_ITEM_TYPE_VXLAN | > + +----+--------------------------------+ > + | 16 | RTE_FLOW_ITEM_TYPE_GTPC | > + +----+--------------------------------+ > + | 17 | RTE_FLOW_ITEM_TYPE_GTPU | > + +----+--------------------------------+ > + | 18 | RTE_FLOW_ITEM_TYPE_GENEVE | > + +----+--------------------------------+ > + | 19 | RTE_FLOW_ITEM_TYPE_VXLAN_GPE | > + +----+--------------------------------+ > + | 20 | RTE_FLOW_ITEM_TYPE_IPV6_EXT | > + +----+--------------------------------+ > + | 21 | RTE_FLOW_ITEM_TYPE_VOID | > + +----+--------------------------------+ > + | 22 | RTE_FLOW_ITEM_TYPE_ANY | > + +----+--------------------------------+ > + | 23 | RTE_FLOW_ITEM_TYPE_GRE_KEY | > + +----+--------------------------------+ > + | 24 | RTE_FLOW_ITEM_TYPE_HIGIG2 | > + +----+--------------------------------+ > + > +.. note:: > + > + ``RTE_FLOW_ITEM_TYPE_GRE_KEY`` works only when checksum and routing > + bits in the GRE header are equal to 0. > + > +Actions: > + > +.. _table_cnxk_supported_ingress_action_types: > + > +.. table:: Ingress action types > + > + +----+-----------------------------------------+ > + | # | Action Type | > + +====+=========================================+ > + | 1 | RTE_FLOW_ACTION_TYPE_VOID | > + +----+-----------------------------------------+ > + | 2 | RTE_FLOW_ACTION_TYPE_MARK | > + +----+-----------------------------------------+ > + | 3 | RTE_FLOW_ACTION_TYPE_FLAG | > + +----+-----------------------------------------+ > + | 4 | RTE_FLOW_ACTION_TYPE_COUNT | > + +----+-----------------------------------------+ > + | 5 | RTE_FLOW_ACTION_TYPE_DROP | > + +----+-----------------------------------------+ > + | 6 | RTE_FLOW_ACTION_TYPE_QUEUE | > + +----+-----------------------------------------+ > + | 7 | RTE_FLOW_ACTION_TYPE_RSS | > + +----+-----------------------------------------+ > + | 8 | RTE_FLOW_ACTION_TYPE_PF | > + +----+-----------------------------------------+ > + | 9 | RTE_FLOW_ACTION_TYPE_VF | > + +----+-----------------------------------------+ > + | 10 | RTE_FLOW_ACTION_TYPE_OF_POP_VLAN | > + +----+-----------------------------------------+ > + > +.. _table_cnxk_supported_egress_action_types: > + > +.. table:: Egress action types > + > + +----+-----------------------------------------+ > + | # | Action Type | > + +====+=========================================+ > + | 1 | RTE_FLOW_ACTION_TYPE_COUNT | > + +----+-----------------------------------------+ > + | 2 | RTE_FLOW_ACTION_TYPE_DROP | > + +----+-----------------------------------------+ > + | 3 | RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN | > + +----+-----------------------------------------+ > + | 4 | RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID | > + +----+-----------------------------------------+ > + | 5 | RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP | > + +----+-----------------------------------------+ See below, > diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini > index 192c15a..3c59494 100644 > --- a/doc/guides/nics/features/cnxk.ini > +++ b/doc/guides/nics/features/cnxk.ini > @@ -39,3 +39,45 @@ Module EEPROM dump = Y > Linux = Y > ARMv8 = Y > Usage doc = Y > + > +[rte_flow items] > +any = Y > +arp_eth_ipv4 = Y > +esp = Y > +eth = Y > +e_tag = Y > +geneve = Y > +gre = Y > +gre_key = Y > +gtpc = Y > +gtpu = Y > +higig2 = Y > +icmp = Y > +ipv4 = Y > +ipv6 = Y > +ipv6_ext = Y > +mpls = Y > +nvgre = Y > +raw = Y > +sctp = Y > +tcp = Y > +udp = Y > +vlan = Y > +vxlan = Y > +vxlan_gpe = Y > + > +[rte_flow actions] > +count = Y > +drop = Y > +flag = Y > +mark = Y > +of_pop_vlan = Y > +of_push_vlan = Y > +of_set_vlan_pcp = Y > +of_set_vlan_vid = Y > +pf = Y > +port_id = Y > +queue = Y > +rss = Y > +security = Y > +vf = Y Now that we have this generic doc, The above driver-specific documentation can be removed. We can just keep limitations in the driver documentation.