What is the difference between vnf and switch in pipe mode?

According to the Flow programming guide, it describes vnf as “the packet arrives from one side of application, processed, and sent from the other side. The miss packet by default goes to the RSS of all queues.”
Does this mean the “missed packet” is processed by the application, while other packet goes by defined rules by default? What does the go to “RSS of all queues” mean? I assume it means on cores of RSS queues of a dpdk port.

And switch mode is defined as “used for internal switching, only representor supported. The missed packet is received on all RSS queues of the representor of the uplink.”

Is the difference between vnf and switch mode, in the difference of received on the “representor of uplink” or not?
Or is the difference in the “only representor port supported”, like the vnf is “only” supporting the “not” representor ports, for example PF/SF/VF?

The switch picture draws the packet goes to the DOCA_FLOW app, how is it different from “the packet arrives from one side of application, processed, and sent from the other side” in vnf?

Also the switch pictures shows “HOST/ARM”, but I assume the E-Switch is on the NIC, how can it be on host?

Do vnf and switch mode both involving hardware offloading? Do both involve E-switch on ConnectX adapter?

I run the simple_forward_vnf and doca_switch example, do they represent such differences?

So basically I still not understood the difference between vnf and switch mode. I would appreciate so much if someone could explain such long questions.

Hi kylelsun,

I have anderstood that vnf works with basic ports , (switchdev mode legacy) so there is no representor interface. In this mode hw acceleration is possible in basically way . if match criterions then forward to dev.
Switch mode is more elaborate. It works in conjunction with switchdev mode eswitch so it introduce representor devices and I guess it can do lookup into eswitch fdb (need to be confirmed)

Hi auger,

Thanks for your kindly explanation.
I am not sure if it is correct to understand as the switch mode only allows representor ports,
About the switchdev mode difference, is there any document that to read and in relation to the the flow api?

Best wishes
Kyle

You’re right, switchdev does more than just allows representor ports , but flow seems to only use the representor ports for dataplane operations.

kernel switchdev documenttion is a good starting point

Switchdev internals : Ethernet switch device driver model

https://www.kernel.org/doc/html/latest/networking/switchdev.html

Mellanox ASAP2 : Accelerated Switching and Packet Processing https://network.nvidia.com/related-docs/products/SB_asap2.pdf

Switchdev documentation

https://www.kernel.org/doc/Documentation/networking/switchdev.txt

Proof of concept

https://community.mellanox.com/s/article/Configuring-VXLAN-Encap-Decap-Offload-Using-tc

Evolution of mlxsw in linux kernel (ASIC underlying driver)

1 Like