mbox series

[External,bpf-next,v2,0/3] bpf: Add support to set and get

Message ID 20220322154231.55044-1-fankaixi.li@bytedance.com (mailing list archive)
Headers show
Series bpf: Add support to set and get | expand

Message

Kaixi Fan March 22, 2022, 3:42 p.m. UTC
From: "kaixi.fan" <fankaixi.li@bytedance.com>

Now bpf code could not set tunnel source ip address of ip tunnel. So it
could not support flow based tunnel mode completely. Because flow based
tunnel mode could set tunnel source, destination ip address and tunnel 
key simultaneously.

Flow based tunnel is useful for overlay networks. And by configuring tunnel
source ip address, user could make their networks more elastic.
For example, tunnel source ip could be used to select different egress
nic interface for different flows with same tunnel destination ip. Another
example, user could choose one of multiple ip address of the egress nic
interface as the packet's tunnel source ip.

v1 -> v2:
v1: https://lore.kernel.org/bpf/20220319130538.55741-1-fankaixi.li@bytedance.com

- Add secondary ip and set tunnel remote ip in "add_vxlan_tunnel" and
"add_ip6vxlan_tunnel"

kaixi.fan (3):
  bpf: Add source ip in "struct bpf_tunnel_key"
  selftests/bpf: add ipv4 vxlan tunnel source testcase
  selftests/bpf: add ipv6 vxlan tunnel source testcase

 include/uapi/linux/bpf.h                      |   4 +
 net/core/filter.c                             |   9 ++
 tools/include/uapi/linux/bpf.h                |   4 +
 .../selftests/bpf/progs/test_tunnel_kern.c    | 115 ++++++++++++++++++
 tools/testing/selftests/bpf/test_tunnel.sh    |  80 +++++++++++-
 5 files changed, 206 insertions(+), 6 deletions(-)

Comments

Yonghong Song March 25, 2022, 4:46 p.m. UTC | #1
On 3/22/22 8:42 AM, fankaixi.li@bytedance.com wrote:
> From: "kaixi.fan" <fankaixi.li@bytedance.com>
> 
> Now bpf code could not set tunnel source ip address of ip tunnel. So it
> could not support flow based tunnel mode completely. Because flow based
> tunnel mode could set tunnel source, destination ip address and tunnel
> key simultaneously.
> 
> Flow based tunnel is useful for overlay networks. And by configuring tunnel
> source ip address, user could make their networks more elastic.
> For example, tunnel source ip could be used to select different egress
> nic interface for different flows with same tunnel destination ip. Another
> example, user could choose one of multiple ip address of the egress nic
> interface as the packet's tunnel source ip.
> 
> v1 -> v2:
> v1: https://lore.kernel.org/bpf/20220319130538.55741-1-fankaixi.li@bytedance.com
> 
> - Add secondary ip and set tunnel remote ip in "add_vxlan_tunnel" and
> "add_ip6vxlan_tunnel"
> 
> kaixi.fan (3):
>    bpf: Add source ip in "struct bpf_tunnel_key"
>    selftests/bpf: add ipv4 vxlan tunnel source testcase
>    selftests/bpf: add ipv6 vxlan tunnel source testcase
> 
>   include/uapi/linux/bpf.h                      |   4 +
>   net/core/filter.c                             |   9 ++
>   tools/include/uapi/linux/bpf.h                |   4 +
>   .../selftests/bpf/progs/test_tunnel_kern.c    | 115 ++++++++++++++++++
>   tools/testing/selftests/bpf/test_tunnel.sh    |  80 +++++++++++-
>   5 files changed, 206 insertions(+), 6 deletions(-)

The subject "bpf: Add support to set and get" is incomplete.
Kaixi Fan March 26, 2022, 5:06 p.m. UTC | #2
Yonghong Song <yhs@fb.com> 于2022年3月26日周六 00:46写道:
>
>
>
> On 3/22/22 8:42 AM, fankaixi.li@bytedance.com wrote:
> > From: "kaixi.fan" <fankaixi.li@bytedance.com>
> >
> > Now bpf code could not set tunnel source ip address of ip tunnel. So it
> > could not support flow based tunnel mode completely. Because flow based
> > tunnel mode could set tunnel source, destination ip address and tunnel
> > key simultaneously.
> >
> > Flow based tunnel is useful for overlay networks. And by configuring tunnel
> > source ip address, user could make their networks more elastic.
> > For example, tunnel source ip could be used to select different egress
> > nic interface for different flows with same tunnel destination ip. Another
> > example, user could choose one of multiple ip address of the egress nic
> > interface as the packet's tunnel source ip.
> >
> > v1 -> v2:
> > v1: https://lore.kernel.org/bpf/20220319130538.55741-1-fankaixi.li@bytedance.com
> >
> > - Add secondary ip and set tunnel remote ip in "add_vxlan_tunnel" and
> > "add_ip6vxlan_tunnel"
> >
> > kaixi.fan (3):
> >    bpf: Add source ip in "struct bpf_tunnel_key"
> >    selftests/bpf: add ipv4 vxlan tunnel source testcase
> >    selftests/bpf: add ipv6 vxlan tunnel source testcase
> >
> >   include/uapi/linux/bpf.h                      |   4 +
> >   net/core/filter.c                             |   9 ++
> >   tools/include/uapi/linux/bpf.h                |   4 +
> >   .../selftests/bpf/progs/test_tunnel_kern.c    | 115 ++++++++++++++++++
> >   tools/testing/selftests/bpf/test_tunnel.sh    |  80 +++++++++++-
> >   5 files changed, 206 insertions(+), 6 deletions(-)
>
> The subject "bpf: Add support to set and get" is incomplete.

Thanks. Sorry for the confusion. I will fix it.