Hello everyone,

For some implementation of ours, we need to mark the socket
buffer(sk_buff->skb_mark) using flows in an openvswitch (v 2.0) before
sending it through an egress vxlan port on the OVS, for setting ToS and CoS
values using iptables command later.

VXLAN offload is not enabled on the host, so we believe that the packet
should travel through the host UDP/IP stack after VXLAN encapsulation.

In this link below, I read that pkt_mark is supported as a MATCH field.
Does OVS support pkt_mark as a SET action? the man page does not talk about
the SET part.
https://www.mail-archive.com/dev@openvswitch.org/msg36020.html

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?
Any thoughts on this would help

Regards,
Nirmal
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to