[ovs-dev] set_field:222->pkt_mark does not take effect

Ben Pfaff blp at nicira.com
Wed Sep 17 17:20:53 UTC 2014


On Wed, Sep 17, 2014 at 05:12:20PM +0530, Nirmalanand Jebakumar wrote:
> In this link below, I read that pkt_mark is supported as a MATCH field.
> Does OVS support pkt_mark as a SET action? 

Yes.

> The command I ran is
> /usr/bin/ovs-ofctl add-flow -O Openflow13 br0 "
> hard_timeout=3600,idle_timeout=30,table=1,priority=10,cookie=2,in_port=3,
> dl_type=0x800,nw_dst=2.2.2.2,dl_dst=52:54:00:aa:93:9e,actions=set_tunnel:222,
> set_field:1.1.1.128->tun_dst,set_field:222->pkt_mark,output:1"
> 
> No errors were seen with the CLI and I see packet count getting incremented
> for the flow in the dump-flows output:
> cookie=2, duration=33.059s, table=1, n_packets=34, n_bytes=3332,
> idle_timeout=30, hard_timeout=3600,
> priority=10,ip,in_port=3,dl_dst=52:54:00:aa:93:9e,nw_dst=2.2.2.2
> actions=set_tunnel:0xde,load:0x1010180->NXM_NX_TUN_IPV4_DST[],
> load:0xde->NXM_NX_PKT_MARK[],output:1
> 
> Later, set the ToS & CoS using iptables command:
> iptables -I POSTROUTING -o eth1.1 -m mark --mark 222 -t mangle -j TOS
> --set-tos 104
> 
> iptables -I POSTROUTING -o eth1.1 -m mark --mark 222  -t mangle -j CLASSIFY
> --set-class 0:2
> 
> But in the final packet, I do not notice any ToS/CoS values set?

This is a situation where looking at the generated kernel datapath flows
would be helpful.  In your above setup, please run "ovs-dpctl
dump-flows" while packets are passing through the flow, and look for
datapath flows that correspond to the OpenFlow flows above.  Do the
datapath flows show pkt_mark (or skb_mark) being set?



More information about the dev mailing list