Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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 <[email protected]>
@tnqn tnqn requested review from wenyingd and hongliangl 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.

@@ -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

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