From: David Ahern <dsahern@gmail.com>
To: Lorenz Bauer <lmb@cloudflare.com>
Cc: bpf <bpf@vger.kernel.org>, Networking <netdev@vger.kernel.org>,
Martynas Pumputis <m@lambda.lt>,
kernel-team <kernel-team@cloudflare.com>
Subject: Re: "Forwarding" from TC classifier
Date: Fri, 15 May 2020 08:24:39 -0600 [thread overview]
Message-ID: <b212a92c-7684-8c47-1b63-75762c326a24@gmail.com> (raw)
In-Reply-To: <CACAyw9-TEDHdcjykuQZ8P0Q6QngEZU0z7PXgqtZRQq4Jh1_ojw@mail.gmail.com>
On 5/15/20 3:59 AM, Lorenz Bauer wrote:
>
> Yes, but that doesn't play well with changing the source address to
> the local machine's, since the upper part of the stack will drop the
> packet due to accept_local=0.
Can you defer the source address swap to the Tx path? Let the packet go
up the stack and do the fib lookup again as an skb. neighbor entry does
not exist, so the packet is stashed, neighbor resolution done, once
resolved the packet goes out. tc program on the egress device can flip
the source address, and then subsequent packets take the XDP fast path.
If the next host is on the same LAN I believe the stack will want to
generate an ICMP redirect, but that can be squashed.
next prev parent reply other threads:[~2020-05-15 14:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 16:40 "Forwarding" from TC classifier Lorenz Bauer
2020-05-13 17:48 ` David Ahern
2020-05-14 15:41 ` Lorenz Bauer
2020-05-14 18:54 ` David Ahern
2020-05-15 9:59 ` Lorenz Bauer
2020-05-15 14:24 ` David Ahern [this message]
2020-05-18 9:38 ` Lorenz Bauer
2020-05-18 14:32 ` David Ahern
2020-05-13 21:23 ` David Ahern
2020-05-14 15:41 ` Lorenz Bauer
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=b212a92c-7684-8c47-1b63-75762c326a24@gmail.com \
--to=dsahern@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=kernel-team@cloudflare.com \
--cc=lmb@cloudflare.com \
--cc=m@lambda.lt \
--cc=netdev@vger.kernel.org \
/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).