Showing results for 
Search instead for 
Did you mean: 

Datapath trouble when applying policy and acl direction

Hi, i encountered a problem with a function which handles direction of policy and acl application when trying to copy packets from an interface with Datapath.

The function is onep_policy_target_op_set_direction().

I used this successfully with the variable set as ONEP_DIRECTION_IN  and ONEP_DERECTION_OUT. This was when i tested whether my program can receive packets trom the interface. Later on i needed to switch this to ONEP_DIRECTION_BOTH as i found the definition of this variable with the datatype specified for arguments of this function.

This change is supposed to enable Datapath to copy packets from the interface in both directions or atleast thats the way i understand it.

The trouble is that once i set the variable right, the Datapath on router stopped sending me packets. My program did connect to the router, and it even applied policies to the interface and started listening for packets, or so i think because it didnt encounter any errors along the way. All i did was change a single argument for that function.

I tested this in the All-in-one VM with its 3-node routers as well as on real routers in pc lab.

The program worked 100% fine with single direction variables. With the both direction setting it got only weird income or no income at all.

I would like to know whether the problem is in the function or whether i may have overlooked some important matter. This program of mine is taking SIP packets from the router interface and without both way capture its statistical data gathering is absolutely useless.

Id also like to know whether any good workaround is possible here and how that may be.

Thank you all for you time. Bye

Cisco Employee

Hi Matej

  To see about what is supported where, click on the Datapath Tutorial under Tutorials & Service Sets at

Cisco onePK Documentation Portal

Scroll down to the bottom of the page to view the support matrix.

Also request you to post your question under topic onePK

Reference  -  inject_raw_l3_packet

Thanks and Regards,


Hall of Fame Cisco Employee

Unfortunately, ONEP_DIRECTION_BOTH doesn't yet work for DPSS.  Checkout the presentation and examples I built around the DPSS at .  There is a wireshark example there that shows you how to do bi-di traffic.  It's not too difficult.

Content for Community-Ad
Cisco Community October 2020 Spotlight Award Winners
This widget could not be displayed.