On 11/5/22 02:39, Ilya Maximets wrote: > On 11/4/22 04:01, Thomas Lee via discuss wrote: >> I'm using OVS 2.17.2, I added a flow: >> >> ovs-ofctl add-flow -OOpenflow13 OLT >> table=22,NXM_NX_REG3[0..16]=65537,reg4=12,actions=learn(table=7,idle_timeout=300,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],NXM_NX_REG3[0..16]=65537,load:0x0->NXM_NX_REG0[0..15],load:12->NXM_NX_REG4[]),resubmit(,7) >> >> Yet the dump-flows show the flow as: >> cookie=0x0, duration=1468.404s, table=22, n_packets=188, n_bytes=21809, >> reg3=0x10001/0x1ffff,reg4=0xd >> actions=learn(table=7,idle_timeout=300,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],NXM_NX_REG3[0..16]=0x100,load:0->NXM_NX_REG0[0..15],load:0xd->NXM_NX_REG4[]),resubmit(,7) >> >> As you can see the match: NXM_NX_REG3[0..16]=65537 is right outside of >> learn() which is reg3=0x10001/0x1ffff, but in learn() is wrong: >> NXM_NX_REG3[0..16]=0x100. >> >> Is that a bug? > > Yes. It is a bug. OVS doesn't seem to parse the value correctly. > > I'll send a patch to fix that. Thanks for the report!
I posted a fix for review: https://patchwork.ozlabs.org/project/openvswitch/patch/[email protected]/ In the meantime, the workaround is to use the whole register instead of only 17 bits, i.e. NXM_NX_REG3[]=65537. Bit ranges that rounds up to the number of bytes equal to the size of a register will also work, e.g. NXM_NX_REG3[0..24]=65537. In this case we use 25 bits that require 4 bytes to store in memory and reg3 is a 4-byte register. Though you can't really utilize remaining bits, so that might not be very useful. Best regards, Ilya Maximets. > > > P.S. please, send plain text emails instead of html. Mail-list > doesn't lake them: > > https://mail.openvswitch.org/pipermail/ovs-discuss/2022-November/052099.html > > Best regards, Ilya Maximets. _______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
