netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, ast@kernel.org,
	daniel@iogearbox.net, andrii@kernel.org, davem@davemloft.net,
	kuba@kernel.org, edumazet@google.com, pabeni@redhat.com,
	pablo@netfilter.org, fw@strlen.de,
	netfilter-devel@vger.kernel.org, lorenzo.bianconi@redhat.com,
	brouer@redhat.com, toke@redhat.com, memxor@gmail.com
Subject: Re: [PATCH v3 bpf-next 2/3] net: netfilter: add bpf_ct_set_nat_info kfunc helper
Date: Sat, 24 Sep 2022 13:10:44 +0200	[thread overview]
Message-ID: <Yy7ltMthyiWn/cYM@lore-desk> (raw)
In-Reply-To: <Yy4xGT7XGGredCB2@lore-desk>

[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]

> > Hi Lorenzo,
> 
> Hi Nathan,
> 
> > 
> > On Wed, Sep 21, 2022 at 06:48:26PM +0200, Lorenzo Bianconi wrote:
> > > Introduce bpf_ct_set_nat_info kfunc helper in order to set source and
> > > destination nat addresses/ports in a new allocated ct entry not inserted
> > > in the connection tracking table yet.
> > > 
> > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > 
> > This commit is now in -next as commit 0fabd2aa199f ("net: netfilter: add
> > bpf_ct_set_nat_info kfunc helper"). Unfortunately, it introduces a
> > circular dependency when I build with my distribution's (Arch Linux)
> > configuration:
> > 
> > $ curl -LSso .config https://github.com/archlinux/svntogit-packages/raw/packages/linux/trunk/config
> > 
> > $ make -skj"$(nproc)" INSTALL_MOD_PATH=rootfs INSTALL_MOD_STRIP=1 olddefconfig all modules_install
> > ...
> > WARN: multiple IDs found for 'nf_conn': 99333, 114119 - using 99333
> > WARN: multiple IDs found for 'nf_conn': 99333, 115663 - using 99333
> > WARN: multiple IDs found for 'nf_conn': 99333, 117330 - using 99333
> > WARN: multiple IDs found for 'nf_conn': 99333, 119583 - using 99333
> > depmod: ERROR: Cycle detected: nf_conntrack -> nf_nat -> nf_conntrack
> > depmod: ERROR: Found 2 modules in dependency cycles!
> 
> I guess the issue occurs when we compile both nf_conntrack and nf_nat as module
> since now we introduced the dependency "nf_conntrack -> nf_nat".
> Discussing with Kumar, in order to fix it, we can move bpf_ct_set_nat_info() in
> nf_nat module (with some required registration code similar to register_nf_conntrack_bpf()).
> What do you think?
> Sorry for the inconvenience.

Hi Nathan,

this is a PoC of what I described above:
https://github.com/LorenzoBianconi/bpf-next/commit/765d32dd08e56f5059532845e70d0bbfe4badda1

Regards,
Lorenzo

> 
> Regards,
> Lorenzo
> 
> 
> > ...
> > 
> > The WARN lines are there before this change but I figured they were
> > worth including anyways, in case they factor in here.
> > 
> > If there is any more information I can provide or patches I can test,
> > please let me know!
> > 
> > Cheers,
> > Nathan



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2022-09-24 11:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 16:48 [PATCH v3 bpf-next 0/3] Introduce bpf_ct_set_nat_info kfunc helper Lorenzo Bianconi
2022-09-21 16:48 ` [PATCH v3 bpf-next 1/3] bpf: Tweak definition of KF_TRUSTED_ARGS Lorenzo Bianconi
2022-09-22  2:39   ` Alexei Starovoitov
2022-09-22  8:00     ` Kumar Kartikeya Dwivedi
2022-09-21 16:48 ` [PATCH v3 bpf-next 2/3] net: netfilter: add bpf_ct_set_nat_info kfunc helper Lorenzo Bianconi
2022-09-23 21:34   ` Nathan Chancellor
2022-09-23 22:20     ` Lorenzo Bianconi
2022-09-24 11:10       ` Lorenzo Bianconi [this message]
2022-09-24 14:51         ` Nathan Chancellor
2022-09-21 16:48 ` [PATCH v3 bpf-next 3/3] selftests/bpf: add tests for bpf_ct_set_nat_info kfunc Lorenzo Bianconi
2022-09-22  2:40 ` [PATCH v3 bpf-next 0/3] Introduce bpf_ct_set_nat_info kfunc helper patchwork-bot+netdevbpf

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=Yy7ltMthyiWn/cYM@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=kuba@kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=memxor@gmail.com \
    --cc=nathan@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=toke@redhat.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 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).