All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Blakey <paulb@mellanox.com>
To: Edward Cree <ecree@solarflare.com>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org, ozsh@mellanox.com,
	majd@mellanox.com, saeedm@mellanox.com
Subject: Re: [PATCH net-next 6/6] netfilter: nf_flow_table: hardware offload support
Date: Thu, 19 Mar 2020 18:47:07 +0200	[thread overview]
Message-ID: <87cc5180-4e84-753f-0acf-1c7a0fa8549d@mellanox.com> (raw)
In-Reply-To: <64004716-fdbe-9542-2484-8a1691d54e53@solarflare.com>


On 19/03/2020 17:57, Edward Cree wrote:
> On 11/11/2019 23:29, Pablo Neira Ayuso wrote:
>> This patch adds the dataplane hardware offload to the flowtable
>> infrastructure. Three new flags represent the hardware state of this
>> flow:
>>
>> * FLOW_OFFLOAD_HW: This flow entry resides in the hardware.
>> * FLOW_OFFLOAD_HW_DYING: This flow entry has been scheduled to be remove
>>   from hardware. This might be triggered by either packet path (via TCP
>>   RST/FIN packet) or via aging.
>> * FLOW_OFFLOAD_HW_DEAD: This flow entry has been already removed from
>>   the hardware, the software garbage collector can remove it from the
>>   software flowtable.
>>
>> This patch supports for:
>>
>> * IPv4 only.
>> * Aging via FLOW_CLS_STATS, no packet and byte counter synchronization
>>   at this stage.
>>
>> This patch also adds the action callback that specifies how to convert
>> the flow entry into the flow_rule object that is passed to the driver.
>>
>> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> <snip>
>> +static int nf_flow_rule_match(struct nf_flow_match *match,
>> +			      const struct flow_offload_tuple *tuple)
>> +{
>> +	struct nf_flow_key *mask = &match->mask;
>> +	struct nf_flow_key *key = &match->key;
>> +
>> +	NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_CONTROL, control);
>> +	NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_BASIC, basic);
>> +	NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_IPV4_ADDRS, ipv4);
>> +	NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_TCP, tcp);
>> +	NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_PORTS, tp);
>> +
>> +	switch (tuple->l3proto) {
>> +	case AF_INET:
>> +		key->control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
> Is it intentional that mask->control.addr_type never gets set?
It should be set.
>
> -ed

  reply	other threads:[~2020-03-19 16:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 23:29 [PATCH net-next 0/6] netfilter flowtable hardware offload Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 1/6] netfilter: nf_flow_table: move conntrack object to struct flow_offload Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 2/6] netfilter: nf_flow_table: remove union from flow_offload structure Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 3/6] netfilter: nf_flowtable: remove flow_offload_entry structure Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 4/6] netfilter: nf_flow_table: detach routing information from flow description Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 5/6] netfilter: nf_tables: add flowtable offload control plane Pablo Neira Ayuso
2019-11-11 23:29 ` [PATCH net-next 6/6] netfilter: nf_flow_table: hardware offload support Pablo Neira Ayuso
2019-11-12 23:31   ` kbuild test robot
2019-11-12 23:31     ` kbuild test robot
2020-03-19 15:57   ` Edward Cree
2020-03-19 16:47     ` Paul Blakey [this message]
2020-03-19 19:37       ` Pablo Neira Ayuso
2019-11-13  3:42 ` [PATCH net-next 0/6] netfilter flowtable hardware offload David Miller

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=87cc5180-4e84-753f-0acf-1c7a0fa8549d@mellanox.com \
    --to=paulb@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=majd@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=ozsh@mellanox.com \
    --cc=pablo@netfilter.org \
    --cc=saeedm@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.