Open mestery opened 2 years ago
Hi @Namrata-intel would you know who might understand this issue? Thanks!
@mestery, P4 DPDK PIPELINE expects the port and pipeline configuration in the following sequence
Thanks for the info @vsureshkumarp! So, in terms of CLI commands, here is my understanding of how things work and the specific order in which they work:
gnmi-cli
ovs_pipeline_builder
to build the pipelinesovs-p4ctl set-pipe
ovs-p4ctl add-entry
for each portWhat I'd like to do instead is as follows:
ovs_pipeline_builder
to build the pipelinesovs-p4ctl set-pipe
gnmi-cli
ovs-p4ctl add-entry
for each portIf I am integrating IPDK with an orchestrator of some kind, the hook to create ports will be used when the VM (or container) is launched, and at that time I want to create the vhost-user socket and add the pipeline entry. And when deleting the VM/container, at that time I want to remove the port from the pipeline and delete the vhost-user socket.
This issue may be exposing a more fundamental concern about ordering dependencies for P4-OVS. The previous comments indicate that it may be required that ports be instantiated before the P4 pipeline be built and plumbed. Can we clarify if this is the case?
If so, this could be a problem in many environments. In hardware, for example, reconfiguring the speed of a port may change the port numbering. We should not require rebuilding or reinstalling the P4 program just because the speed of a port is changed. Similarly, in a virtual environment, the network connections to VMs or containers will be dynamic and shouldn't require changes to the running P4 pipeline.
If needed, we could split this issue into a low level one for investigating the specifics of vhost-user sockets and a higher one for deploying P4 pipelines via P4-OVS in general.
That is why have the patch for hotplug that we are working on on OVS github. That way we can create and hotplug ports into the VMs and the pipeline after VMs are up. Some of the dependencies will go away once we do that. After that goes in you could program your ports after you set your pipeline. The plan is to have the flexibility eventually.
@Namrata-intel Can someone push that patch out to P4-OVS so we can make use of it here? And also, it's not clear to me if we still need to track the higher level discussion which @det-intel brought up below:
This issue may be exposing a more fundamental concern about ordering dependencies for P4-OVS. The previous comments indicate that it may be required that ports be instantiated before the P4 pipeline be built and plumbed. Can we clarify if this is the case?
https://github.com/ipdk-io/ovs/pull/21 - this is the patch. Still in works by @nupuruttarwar as it needs some code to be added to p4-dpdk-target opensource as well. I agree with @det-intel and we need to add the flexibility.
The way the existing demo works is that you have to use
gnmi-cli
to create the ports before you load the P4 pipeline into P4-OVS. However, what I'd like to do is create the P4 pipeline first (using bothovs_pipeline_builder
andovs-p4ctl
and then usinggnmi-cli
to create the vhost-user ports. When I do this, P4-OVs fails to create the vhost-user ports.Can someone explain the ordering oddness here?