-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
datapath: Improve BPF SNAT address selection #17158
Labels
feature/snat
Relates to SNAT or Masquerading of traffic
kind/feature
This introduces new functionality.
pinned
These issues are not marked stale by our issue bot.
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
sig/kernel
Requires upstream work in the Linux kernel.
Comments
brb
added
sig/kernel
Requires upstream work in the Linux kernel.
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
kind/feature
This introduces new functionality.
labels
Aug 13, 2021
brb
added a commit
that referenced
this issue
Aug 24, 2021
The new option is used to specify a device which globally scoped IP addr should be used for BPF-based masquerading. This is a workaround for an environment which uses ECMP for outgoing traffic and it has a dedicated device which IP addr should be used for the masquerading. The workaround is relevant until #17158 has been resolved (thus, we hide the flag). Signed-off-by: Martynas Pumputis <m@lambda.lt>
brb
added a commit
that referenced
this issue
Sep 6, 2021
The new option is used to specify a device which globally scoped IP addr should be used for BPF-based masquerading. This is a workaround for an environment which uses ECMP for outgoing traffic via multiple devices and it has a dedicated device which IP addr should be used for the masquerading. The workaround is relevant until #17158 has been resolved (thus, we hide the flag). Signed-off-by: Martynas Pumputis <m@lambda.lt>
brb
added a commit
that referenced
this issue
Sep 15, 2021
The new option is used to specify a device which globally scoped IP addr should be used for BPF-based masquerading. This is a workaround for an environment which uses ECMP for outgoing traffic via multiple devices and it has a dedicated device which IP addr should be used for the masquerading. The workaround is relevant until #17158 has been resolved (thus, we hide the flag). Signed-off-by: Martynas Pumputis <m@lambda.lt>
christarazi
pushed a commit
that referenced
this issue
Sep 16, 2021
The new option is used to specify a device which globally scoped IP addr should be used for BPF-based masquerading. This is a workaround for an environment which uses ECMP for outgoing traffic via multiple devices and it has a dedicated device which IP addr should be used for the masquerading. The workaround is relevant until #17158 has been resolved (thus, we hide the flag). Signed-off-by: Martynas Pumputis <m@lambda.lt>
jibi
pushed a commit
that referenced
this issue
Sep 29, 2021
[ upstream commit d204d78 ] The new option is used to specify a device which globally scoped IP addr should be used for BPF-based masquerading. This is a workaround for an environment which uses ECMP for outgoing traffic via multiple devices and it has a dedicated device which IP addr should be used for the masquerading. The workaround is relevant until #17158 has been resolved (thus, we hide the flag). Signed-off-by: Martynas Pumputis <m@lambda.lt> Signed-off-by: Gilberto Bertin <gilberto@isovalent.com>
aanm
pushed a commit
that referenced
this issue
Oct 2, 2021
[ upstream commit d204d78 ] The new option is used to specify a device which globally scoped IP addr should be used for BPF-based masquerading. This is a workaround for an environment which uses ECMP for outgoing traffic via multiple devices and it has a dedicated device which IP addr should be used for the masquerading. The workaround is relevant until #17158 has been resolved (thus, we hide the flag). Signed-off-by: Martynas Pumputis <m@lambda.lt> Signed-off-by: Gilberto Bertin <gilberto@isovalent.com>
Related #17441 (the same required kernel patch is already in). |
This issue has been automatically marked as stale because it has not |
github-actions
bot
added
the
stale
The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale.
label
May 4, 2024
This issue has not seen any activity since it was marked stale. |
ti-mo
added
pinned
These issues are not marked stale by our issue bot.
and removed
stale
The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale.
labels
Aug 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature/snat
Relates to SNAT or Masquerading of traffic
kind/feature
This introduces new functionality.
pinned
These issues are not marked stale by our issue bot.
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
sig/kernel
Requires upstream work in the Linux kernel.
Currently, the BPF-based SNAT uses
IPV4_MASQUERADE
addr for SNAT'ing. This works fine as long as there is a single global scope IP addr. However, if we add multiple IP addrs then only one will be selected.To improve the selection we could do the
bpf_fib_lookup()
to determine src IP addr instead. This would also eliminate theIPV4_MASQUERADE
. However, the kernel helper might need to be relaxed, as currently it errors out if no L2 neigh entry is found for a nexthop of the given dst IP addr.The text was updated successfully, but these errors were encountered: