Currently, the OVS_CB(skb)->vport member is never initialized for packets coming from userspace. This means that they can never be sampled by sFlow and generally violates our principle that userspace packets should be made to look the same as others.
Signed-off-by: Jesse Gross <[email protected]> --- datapath/datapath.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 79df5f8..15f6b11 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -687,6 +687,11 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) err = -ENODEV; if (!dp) goto err_unlock; + + if (flow->key.eth.in_port != USHRT_MAX) + OVS_CB(packet)->vport = get_vport_protected(dp, + flow->key.eth.in_port); + err = execute_actions(dp, packet); rcu_read_unlock(); -- 1.7.4.1 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
