Skip to content

Support bitwise match for xxreg#68

Open
tnqn wants to merge 1 commit intoantrea-io:mainfrom
tnqn:xxreg_mask
Open

Support bitwise match for xxreg#68
tnqn wants to merge 1 commit intoantrea-io:mainfrom
tnqn:xxreg_mask

Conversation

@tnqn
Copy link
Member

@tnqn tnqn commented Jul 27, 2023

It also fixes function getMaskBytes.

It also fixes function getMaskBytes.

Signed-off-by: Quan Tian <qtian@vmware.com>
@tnqn tnqn requested review from hongliangl and wenyingd July 27, 2023 12:58
Copy link

@antoninbas antoninbas left a 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 {

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.

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.


type XXRegister struct {
ID int // ID of NXM_NX_XXREG, value should be from 0 to 3
Data []byte // Data to cache in xxreg

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 {

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.

Copy link

@wenyingd wenyingd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants