Conversation
It also fixes function getMaskBytes. Signed-off-by: Quan Tian <qtian@vmware.com>
antoninbas
left a comment
There was a problem hiding this comment.
LGTM, but someone else more familiar with the code should review
| @@ -450,8 +451,17 @@ func (self *Flow) xlateMatch() openflow15.Match { | |||
| if self.Match.XxRegs != nil { | |||
There was a problem hiding this comment.
I wonder why this case (xxreg) is so different from the one above (reg). In the above case, I don't even see a reference to reg.Range.
There was a problem hiding this comment.
reg.Range is used in "merge" function which is called if the caller uses more than one match fields in the same reg. In ofnet, we would merge the these fields into a final data/mask, and then send to OVS.
|
|
||
| type XXRegister struct { | ||
| ID int // ID of NXM_NX_XXREG, value should be from 0 to 3 | ||
| Data []byte // Data to cache in xxreg |
There was a problem hiding this comment.
Do you mean we only supporting setting mask via range for xxreg ?
| @@ -450,8 +451,17 @@ func (self *Flow) xlateMatch() openflow15.Match { | |||
| if self.Match.XxRegs != nil { | |||
There was a problem hiding this comment.
reg.Range is used in "merge" function which is called if the caller uses more than one match fields in the same reg. In ofnet, we would merge the these fields into a final data/mask, and then send to OVS.
It also fixes function getMaskBytes.