Hi Ben,

Thanks for your reply!
Seems the action "write_metadata" is not allowed to set before "Controller", so 
I tried to use " load:****->NXM_NX_REG*" instead, to pass any data to 
controller and it worked.
I think the usage of metadata is very limited if so. 
Pls correct me.

Thanks
Chao

-----Original Message-----
From: Ben Pfaff [mailto:b...@nicira.com] 
Sent: Tuesday, August 25, 2015 1:37 AM
To: Chao Hu
Cc: discuss@openvswitch.org
Subject: Re: [ovs-discuss] a problem about passing metadata in packet-in

On Fri, Aug 21, 2015 at 07:51:15PM +0000, Chao Hu wrote:
> I'm trying to pass metadata from OVS switch to controller but always get 0. 
> Anything wrong with my steps?
> My test environment is:
> OVS: 2.0.2
> OVS-controller: 2.3.1
> OF: OpenFlow1.3
> 
> My test steps are:
> 
> 1.  Make OVS-controller to send a OFPRAW_NXT_SET_PACKET_IN_FORMAT 
> message to OVS switch, to set the packet-in-format to NXM (Nicira 
> Extended). As I captured, it's a OFPT_EXPERIMENTER packet and the 
> content is exactly the same with the packet of running "ovs-ofctl 
> monitor -P nxm tcp:myip:6653 -O OpenFlow13". Seems Switch do nothing 
> after received this packet.

This is a bad idea.  The OpenFlow 1.3 packet-in format is already extensible so 
there should be no need to change it.

> 2.        Add a flow to OVS switch:
> cookie=0x0, duration=28.019s, table=0, n_packets=0, n_bytes=0, 
> in_port=2 actions=CONTROLLER:65535,write_metadata:0x11/0xffff
> 
> 3.       OVS switch send the packet-in traffic to controller when it matches 
> above flow, but metadata is 0.

The actions above set the metadata after sending the packet to the controller.
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to