I’m trying to configure a simple variation on the Switch Example (14.7. Switching Examples) in the Programmer’s Guide. What I’d like to do is forward packets from the physical port to the VF1 and vice versa as described in the example, in addition I’d also like to send a 1:N sample of the traffic received from the physical port to the “hypervisor application”, i.e. the DPDK app.
I have not found a way to achieve this, this is what I’ve tried... Note my DPDK ports are 0 (physical) and 1 (VF1 representer) rather than the 3 and 4 in the Programmer’s Guide example and I’m using DPDK-stable-22.11.1 with ConnectX-6 version 22.30.100 (configured in switchdev mode). Setting up the example works as expected, traffic is forwarded between physical and VF1 and nothing goes to DPDK app. I used these testpmd commands... flow create 0 transfer pattern represented_port ethdev_port_id is 0 / end actions represented_port ethdev_port_id 1 / end flow create 0 transfer pattern represented_port ethdev_port_id is 1 / end actions represented_port ethdev_port_id 0 / end However I haven’t been able to setup the sampling. First I tried (leaving out the VF1 to PHY setup for now)... set sample_actions 0 queue index 0 / end flow create 0 transfer pattern represented_port ethdev_port_id is 0 / end actions sample ratio 10 index 0 / represented_port ethdev_port_id 1 / end >port_flow_complain(): Caught PMD error type 16 (specific action): E-Switch >doesn't support any optional action for sampling: Operation not supported Next tried sampling after the forwarding (use priority to avoid ambiguity), I need to have a fate action on the sample line otherwise I get "no fate action is found:” error… set sample_actions 0 queue index 0 / end flow create 0 transfer priority 2 pattern represented_port ethdev_port_id is 0 / end actions represented_port ethdev_port_id 1 / end flow create 0 ingress pattern end actions sample ratio 10 index 0 / jump group 1 / end >port_flow_complain(): Caught PMD error type 1 (cause unspecified): hardware >refuses to create flow: Operation not supported I have not been able to use sampling in group 0, but seems to work in non-0 group, So… set sample_actions 0 queue index 0 / end flow create 0 ingress pattern end actions jump group 1 / end flow create 0 ingress group 1 pattern end actions sample ratio 10 index 0 / count / jump group 2 / end flow create 0 transfer group 2 pattern represented_port ethdev_port_id is 0 / end actions count / represented_port ethdev_port_id 1 / end flow create 0 ingress group 2 priority 2 pattern end actions count / jump group 3 / end No errors! And samples show up in DPDK in the 1:10 ratio expected. However there’s no forwarding between physical and VF1. The counter for the transfer rule confirms this, its 0, however the counter for the last rule shows hits (and the traffic is blocked). testpmd> flow query 0 2 count COUNT: hits_set: 1 bytes_set: 1 hits: 0 bytes: 0 testpmd> flow query 0 3 count COUNT: hits_set: 1 bytes_set: 1 hits: 117 bytes: 7488 Thanks for any help, Tony Tony Hart | Chief Architect [email protected] <mailto:[email protected]> 293 Boston Post Road West Suite 310, Marlborough, MA 01752 Access Corero Network Security’s Privacy Policy here <www.corero.com/privacy>. We are Corero Network Security plc (“Corero”), registered in England and Wales, with registered company number 02662978, registered office address Regus House Highbridge, Oxford Road, Uxbridge, Middlesex, UB8 1HR. Corero is the parent company for Corero Network Security, Inc. and Corero Network Security (UK) Ltd (a company registered in England and Wales with registered number 04047090, with the same registered office address as above) For information about how we process your data, or to manage your data preferences, click here <info.corero.com/data-preferences.html>.
