netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: wenxu <wenxu@ucloud.cn>
Cc: pablo@netfilter.org, fw@strlen.de,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v4 2/3] flow_offload: Support get default block from tc immediately
Date: Mon, 29 Jul 2019 09:55:26 -0700	[thread overview]
Message-ID: <20190729095526.17214c4d@cakuba.netronome.com> (raw)
In-Reply-To: <449a5603-80e9-ad7d-5c02-bf57558f9603@ucloud.cn>

On Mon, 29 Jul 2019 15:18:03 +0800, wenxu wrote:
> On 7/29/2019 12:42 PM, Jakub Kicinski wrote:
> > On Mon, 29 Jul 2019 10:43:56 +0800, wenxu wrote:  
> >> On 7/29/2019 4:16 AM, Jakub Kicinski wrote:  
> >>> I don't know the nft code, but it seems unlikely it wouldn't have the
> >>> same problem/need..    
> >> nft don't have the same problem.  The offload rule can only attached
> >> to offload base chain.
> >>
> >> Th  offload base chain is created after the device driver loaded (the
> >> device exist).  
> > For indirect blocks the block is on the tunnel device and the offload
> > target is another device. E.g. you offload rules from a VXLAN device
> > onto the ASIC. The ASICs driver does not have to be loaded when VXLAN
> > device is created.
> >
> > So I feel like either the chain somehow directly references the offload
> > target (in which case the indirect infrastructure with hash lookup etc
> > is not needed for nft), or indirect infra is needed, and we need to take
> > care of replays.  
> 
> I think the nft is different with tc. 
> 
> In tc case we can create vxlan device add a ingress qdisc with a block success
> 
> Then the ASIC driver loaded,  then register the vxlan indr-dev and get the block
> adn replay it to hardware
> 
> But in the nft case,  The base chain flags with offload. Create an offload netdev
> base chain on vxlan device will fail if there is no indr-device to offload.

Can you show us the offload chain spec? Does it specify offload to the
vxlan device or the ASIC device?

Indir-devs can come and go, how do you handle a situation where offload
chain was installed with indir listener present, but then the ASIC
driver got removed?

  reply	other threads:[~2019-07-29 16:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28  6:52 [PATCH net-next v4 0/3] flow_offload: add indr-block in nf_table_offload wenxu
2019-07-28  6:52 ` [PATCH net-next v4 1/3] flow_offload: move tc indirect block to flow offload wenxu
2019-07-29 11:13   ` Jiri Pirko
2019-07-29 12:47     ` wenxu
2019-07-29 13:13       ` Jiri Pirko
2019-07-29 11:15   ` Jiri Pirko
2019-07-28  6:52 ` [PATCH net-next v4 2/3] flow_offload: Support get default block from tc immediately wenxu
2019-07-28 20:16   ` Jakub Kicinski
2019-07-29  2:43     ` wenxu
2019-07-29  4:42       ` Jakub Kicinski
2019-07-29  7:05         ` wenxu
2019-07-29 16:51           ` Jakub Kicinski
2019-07-29  7:18         ` wenxu
2019-07-29 16:55           ` Jakub Kicinski [this message]
2019-07-30  0:10             ` wenxu
2019-07-28  6:52 ` [PATCH net-next v4 3/3] netfilter: nf_tables_offload: support indr block call wenxu

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=20190729095526.17214c4d@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=wenxu@ucloud.cn \
    /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).