[ovs-discuss] nx_reg_move and ofpat_set_field on arp op

Saul St. John sstjohn at cs.wisc.edu
Fri Mar 8 03:00:49 UTC 2013


Hello!

I was trying to bit-twiddle ARP packets with NXAST_REG_MOVE actions,
when I found that NXM_OF_ARP_OP fields aren't writable. nicira-ext.h
doesn't explicitly call out unacceptable destinations, although
NXM_OF_ARP_OP isn't included on the list of acceptable dst. I am curious:

1) Is there a reason for not allowing this field as the target of
mangling actions?

2) The load/set_field syntax in the ovs-ofctl manpage doesn't describe
unacceptable targets at all, although it also has them. (See below.)
Shouldn't it?

3) I don't have a OF1.2-speaking controller at-hand to test this, but it
looks like the OFPAT_SET_FIELD action calls the same implementation as
the NXM actions. Does OVS enforce the same restrictions on this action?
If so, is that correct behavior? (I can't tell from the spec if a switch
implementation supporting set_field needs to support setting all fields
it supports matching (except those excluded in A.2.5).)

Thanks!

----

 # ovs-ofctl add-flow test_br
'dl_type=0x806,nw_proto=1,action=load:2->NXM_OF_ARP_OP[]'
 OFPT_ERROR (xid=0x2): OFPBAC_BAD_ARGUMENT
 OFPT_FLOW_MOD (xid=0x2):
 (***truncated to 64 bytes from 96***)
 00000000  01 0e 00 60 00 00 00 02-00 38 20 cf 00 00 00 00 |...`.....8
.....|
 00000010  00 00 00 00 00 00 00 00-00 00 00 00 00 00 08 06
|................|
 00000020  00 01 00 00 00 00 00 00-00 00 00 00 00 00 00 00
|................|
 00000030  00 00 00 00 00 00 00 00-00 00 00 00 00 00 80 00
|................|

 # ovs-ofctl add-flow test_br
'dl_type=0x806,nw_proto=1,action=set_field:2->nw_proto'
 ovs-ofctl: nw_proto is not allowed to set

 # tail -5 /var/log/openvswitch/ovs-vswitchd.log
 2013-03-08T02:50:11Z|10431|meta_flow|WARN|destination field arp_op is
not writable
 2013-03-08T02:50:11Z|10432|ofp_actions|WARN|bad action at offset 0
(OFPBAC_BAD_ARGUMENT):
 00000000  ff ff 00 18 00 00 23 20-00 07 00 0f 00 00 1e 02
 00000010  00 00 00 00 00 00 00 02-
 2013-03-08T02:50:11Z|10433|connmgr|INFO|test_br<->unix: sending
OFPBAC_BAD_ARGUMENT error reply to OFPT_FLOW_MOD message





More information about the discuss mailing list