DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: kaara.satwik@chelsio.com, dev@dpdk.org, nirranjan@chelsio.com,
	ferruh.yigit@intel.com, orika@mellanox.com
Subject: Re: [dpdk-dev] [PATCH 0/9] net/cxgbe: updates for rte_flow support
Date: Wed, 18 Mar 2020 18:36:15 +0530	[thread overview]
Message-ID: <20200318130614.GA24949@chelsio.com> (raw)
In-Reply-To: <18214127.sIn9rWBj0N@xps>

Hi Thomas,

On Wednesday, March 03/18/20, 2020 at 13:09:47 +0100, Thomas Monjalon wrote:
> 11/03/2020 10:05, Rahul Lakkireddy:
> > From: Karra Satwik <kaara.satwik@chelsio.com>
> > 
> > This series of patches contain rte_flow support for matching
> > Q-in-Q VLAN, IP TOS, PF, and VF fields. Also, adds Destination
> > MAC rewrite and Source MAC rewrite actions.
> > 
> > Apart from the 4-tuple (IP src/dst addresses and TCP/UDP src/dst
> > port addresses), there are only 40-bits available to match other
> > fields in packet headers. Currently, the combination of packet
> > header fields to match are configured via filterMode for LETCAM
> > filters and filterMask for HASH filters in firmware config files
> > (t5/t6-config.txt). Adapter needs to be reflashed with new firmware
> > config file everytime the combinations need to be changed. To avoid
> > this, a new firmware API is available to dynamically change the
> > combination before completing full adapter initialization. So, 2
> > new devargs filtermode and filtermask are added to dynamically
> > select the combinations during runtime.
> 
> Please, could you explain why you are using devargs for flow matching,
> instead of using the common and generic rte_flow API?
> 

The devargs are being used to configure the TCAM in hardware on
what header fields need to be matched in packets by the TCAM. The
actual filter rules are still being inserted using rte_flow API.

Apart from the 4-tuple (src/dst IP, src/dst port addresses), there
are only 40-bits available for each filter rule to match other
header fields. Hardware supports matching ethertype (16-bit),
DST MAC (9-bit MPS index), Inner VLAN (16-bit), Outer VLAN (16-bit),
IP Protocol (8-bit), IP TOS (8-bit), Ingress Physical Port (3-bit),
and PFVF (17-bit) for now. It's not possible to write a filter rule
which wants to match all the above fields, which is far beyond 40-bits
available. So, the devargs are being used to control which of the
above fields that user wants to configure the TCAM to match. Note
that once the TCAM is configured, "all" the rules in the TCAM can
only match the selected fields in the combination. They can't match
any other header fields.

For example, let's say user wants to match ethertype (16-bit),
DST MAC (9-bit MPS index), and IP protocol (8-bit) in all filter
rules. Then, they would configure the TCAM with the {ethertype,
DST MAC, and IP protocol} combination. All rules that the user
wants to insert into TCAM can only have the above header fields,
alongside the default 4-tuple (src/dst IP, src/dst port addresses).

There are 2 regions in hardware. One for matching wild-card filter
rules and the other for matching exact-match rules. The "filtermode"
devarg controls the 40-bit combination for wild-card filter rules and
the "filtermask" devarg controls the combination for exact-match rules.

Thanks,
Rahul

  reply	other threads:[~2020-03-18 13:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  9:05 Rahul Lakkireddy
2020-03-11  9:05 ` [dpdk-dev] [PATCH 1/9] net/cxgbe: add rte_flow support for matching Q-in-Q VLAN Rahul Lakkireddy
2020-03-11  9:05 ` [dpdk-dev] [PATCH 2/9] net/cxgbe: add rte_flow support for matching IP TOS Rahul Lakkireddy
2020-03-11  9:05 ` [dpdk-dev] [PATCH 3/9] net/cxgbe: add rte_flow support for matching all packets on PF Rahul Lakkireddy
2020-03-11  9:05 ` [dpdk-dev] [PATCH 4/9] net/cxgbe: add rte_flow support for matching all packets on VF Rahul Lakkireddy
2020-03-11  9:05 ` [dpdk-dev] [PATCH 5/9] net/cxgbe: add rte_flow support for overwriting destination MAC Rahul Lakkireddy
2020-03-11  9:05 ` [dpdk-dev] [PATCH 6/9] net/cxgbe: add Source MAC Table (SMT) support Rahul Lakkireddy
2020-03-11  9:05 ` [dpdk-dev] [PATCH 7/9] net/cxgbe: add rte_flow support for Source MAC Rewrite Rahul Lakkireddy
2020-03-11  9:05 ` [dpdk-dev] [PATCH 8/9] net/cxgbe: use firmware API for validating filter spec Rahul Lakkireddy
2020-03-11  9:05 ` [dpdk-dev] [PATCH 9/9] net/cxgbe: add devargs to control filtermode and filtermask values Rahul Lakkireddy
2020-03-11 13:11 ` [dpdk-dev] [PATCH 0/9] net/cxgbe: updates for rte_flow support Ferruh Yigit
2020-03-18 12:09 ` Thomas Monjalon
2020-03-18 13:06   ` Rahul Lakkireddy [this message]
2020-03-18 15:07     ` Thomas Monjalon
2020-03-19  7:58       ` Rahul Lakkireddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200318130614.GA24949@chelsio.com \
    --to=rahul.lakkireddy@chelsio.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=kaara.satwik@chelsio.com \
    --cc=nirranjan@chelsio.com \
    --cc=orika@mellanox.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).