[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64004716-fdbe-9542-2484-8a1691d54e53@solarflare.com>
Date: Thu, 19 Mar 2020 15:57:25 +0000
From: Edward Cree <ecree@...arflare.com>
To: Pablo Neira Ayuso <pablo@...filter.org>,
<netfilter-devel@...r.kernel.org>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<paulb@...lanox.com>, <ozsh@...lanox.com>, <majd@...lanox.com>,
<saeedm@...lanox.com>
Subject: Re: [PATCH net-next 6/6] netfilter: nf_flow_table: hardware offload
support
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@...filter.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?
-ed
Powered by blists - more mailing lists