-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support bitwise match for xxreg #68
base: main
Are you sure you want to change the base?
Conversation
It also fixes function getMaskBytes. Signed-off-by: Quan Tian <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -165,8 +165,9 @@ type NXRegister struct { | |||
} | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It also fixes function getMaskBytes.