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

the NewNXActionRegMove problem #50

Open
yinglong33259 opened this issue Mar 27, 2023 · 1 comment
Open

the NewNXActionRegMove problem #50

yinglong33259 opened this issue Mar 27, 2023 · 1 comment

Comments

@yinglong33259
Copy link

yinglong33259 commented Mar 27, 2023

i want send a flow like this:
table=25, priority=100,arp,metadata=0x153,arp_tpa=100.64.2.60,arp_op=1 actions=move:NXM_OF_ETH_SRC[]->NXM_OF_ETH_DST[]

use openflow15 direct:

applyIns := of15.NewInstrApplyActions()
srcField, _ := of15.FindFieldHeaderByName("NXM_OF_ETH_SRC", false)
dstField, _ := of15.FindFieldHeaderByName("NXM_OF_ETH_DST", false)
applyIns.AddAction(
of15.NewNXActionRegMove(48, 0, 0,
srcField,
dstField,
), false)

or use ofctl:

srcTableT, err := a.app.NewTable(a.tableID)
if err != nil {
srcTableT = a.app.GetTable(a.tableID)
}
f, _ := srcTableT.NewFlow(ofctrl.FlowMatch{
Priority: a.priority,
Ethertype: consts.ETH_TYPE_ARP,
ArpTpa: &a.interfaceIP,
ArpOper: consts.ARP_REQUEST,
Metadata: &a.networkID,
})
//
var resubmitTable uint8 = a.goToTableID
moveAct, _ := ofctrl.NewNXMoveAction(
"OXM_OF_ETH_SRC",
"OXM_OF_ETH_DST", of15.NewNXRange(0, 47), of15.NewNXRange(0, 47))
f.ApplyActions([]ofctrl.OFAction{
ofctrl.NewResubmit(nil, &resubmitTable),
moveAct},
)
err = f.Send(of15.FC_ADD)

I got a same error:

ERROR [ofctrl/ofSwitch.go:264] Received OpenFlow1.5 error: OFPBAC_BAD_VENDOR_TYPE on message OFPT_FLOW_MOD

image

@yinglong33259
Copy link
Author

this is the answer:
image

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

No branches or pull requests

1 participant