[ovs-discuss] sending dp_packet to OFPP_NORMAL

Luca Mancini luca.mancini at outlook.com
Fri Jun 12 19:40:37 UTC 2020


I’m trying to send a dp_packet from userspace to OFPP_NORMAL, however the ofproto_dpif_send_packet() function won’t do it.

For now I’m using this approach:

const struct ofproto_dpif *ofproto = ctx->xin->ofproto;
const struct ofport_dpif *portExit;
ofp_port_t out_port = 2;
portExit = ofp_port_to_ofport(ofproto, out_port);

ofproto_dpif_send_packet(portExit, false, packet);


This works fine, however if I set OFPP_NORMAL instead of 2, so:

const struct ofproto_dpif *ofproto = ctx->xin->ofproto;
const struct ofport_dpif *portExit;
ofp_port_t out_port =  OFPP_NORMAL;
portExit = ofp_port_to_ofport(ofproto, out_port);

ofproto_dpif_send_packet(portExit, false, packet);


gdb tells me that ofport=0x0 and gives me the good old Segmentation Fault.
Is it meant to be done in another way? What am I doing wrong?
Thanks!

Luca

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20200612/d34df0b3/attachment.html>


More information about the discuss mailing list