Skip to content
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

Option to use veth instead of dummy for DPDK support #189

Open
krsna1729 opened this issue Mar 13, 2020 · 8 comments
Open

Option to use veth instead of dummy for DPDK support #189

krsna1729 opened this issue Mar 13, 2020 · 8 comments
Labels
support How? And why?

Comments

@krsna1729
Copy link

I did not follow up on your comment here k8snetworkplumbingwg/sriov-cni#37 (comment) but one of the reasons I used veth here was some slowpath processing can happen in the kernel. We used veth to inject on one side from DPDK app. The kernel would receive them on the other end of veth and then craft any replies or update its state.

From what I understand dummy interface is not capable of this. What are you thoughts on providing a veth option?

@Levovar
Copy link
Collaborator

Levovar commented Mar 13, 2020

if you want slowpath synch why don't you simply ask an additional slowpath interface for this, i.e. IPVLAN for example?
the dummy interface is purely for conveying CaaS allocated network resources to the application but is not intended for communicating on top of it. from my perspective a slowpath interface is an extra, functional network interface you need, and it shouldn't come automatically with a VFIO bound VF.
it is something your app needs in addition to the VF, so IMHO it is better to explicitly express this need in your manifest

@Levovar Levovar added the support How? And why? label Mar 13, 2020
@krsna1729
Copy link
Author

krsna1729 commented Mar 13, 2020

The use case is to direct arp, icmp, dynamic route protocol packets targeting the fastpath IP of the app etc., to the kernel i.e., slowpath and handle transit traffic routing in fastpath. If this can be done using an extra ipvlan, i am interested in knowing that.

Basically we want to offload as much control packet processing targeted to fastpath's IP to the kernel, instead of re-implementing it within the app/fastpath

@Levovar
Copy link
Collaborator

Levovar commented Mar 16, 2020

yeah I'm familiar with terminology, we use the same internally as well
I don't see why an IPVLAN or MACVLAN interface wouldn't work for your case, depends whether you need L2 or L3 switching
you just need some intelligence/configurability in the app to be able to tell it which kernel IF should be used for sycnhing, but I'm assuming something like that is anyway needed
and you could identify the kernel synch interface based on its name, which is configurable in DANM from the network's Spec.Options.container_prefix

but please let me know if you find a problem with this approach!

@krsna1729
Copy link
Author

Is there an example of such a pod?

Who is splitting the traffic and based on what is it decided that arp, icmp go to macvlan vs GTPU traffic goes to SRIOV interface?

Currently we have a filter in our app we do this splitting. SRIOV -> host-traffic filter -> veth. This veth is dpdk end. The kernel end mirrors the VF mac and has IP and route details.

https://github.com/omec-project/upf-epc/blob/master/conf/spgwu.bess#L148-L170

@Levovar
Copy link
Collaborator

Levovar commented Mar 16, 2020

I'm sure there is, but the only one I know of is unfortunetaly proprietary :)

so just for my reference, how do exactly the veth pair look like in your example? I understand that both are created inside the container netns, but I'm not sure how would that work exactly
veths are usually connected to a bridge, but I maybe not in this case? or the "kernel end" still is, otherwise how would connectivity work?
also what's the IP/MAC of the DPDK end? nothing?

@krsna1729
Copy link
Author

They are not connected to bridge in this case. The DPDK end there is no IP and MAC is dont care.

image

@Levovar
Copy link
Collaborator

Levovar commented May 7, 2020

BTW how does the application know which veth interface it should use? or simply "the one not having an IP is mine"?

@krsna1729
Copy link
Author

krsna1729 commented May 7, 2020

The app simply looks up the peer of the CNI configured veth end. Since we know the "CNI/linux" end's name we can do this -

detect_mode
peer_by_interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support How? And why?
Projects
None yet
Development

No branches or pull requests

2 participants