unknown message: sw_interface_set_flags_f5aec1b8 #52
-
hi, I write a SetInterfaceState fuction to call SwInterfaceSetFlags, but respone that func (v *VppLink) SetInterfaceState(swIndex uint32, state int) error {
klog.Infof("set interface %d state %d ", swIndex, state)
v.lock.Lock()
defer v.lock.Unlock()
response := &interfaces.SwInterfaceSetFlagsReply{}
request := &interfaces.SwInterfaceSetFlags{
SwIfIndex: interface_types.InterfaceIndex(swIndex),
Flags: interface_types.IfStatusFlags(state),
}
err := v.ch.SendRequest(request).ReceiveReply(response)
if err != nil {
return errors.Wrapf(err, "SetInterfaceState failed: req %+v reply %+v", request, response)
}
klog.Infof("set interface %d state %d success ", swIndex, state)
return nil
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
My guess is that [version of VPP you are running] is INCOMPATIBLE with the [VPP version used to generate the binapi] code you are using. If you are using the generated binapi code from the GoVPP repo then your VPP version must match the one specified at the top of the file (see package doc comment). Try running if err := ch.CheckCompatiblity(interfaces.AllMessages()...); err != nil {
log.Fatal(err)
}
The error that is returned should tell you which messages are incompatible. |
Beta Was this translation helpful? Give feedback.
My guess is that [version of VPP you are running] is INCOMPATIBLE with the [VPP version used to generate the binapi] code you are using. If you are using the generated binapi code from the GoVPP repo then your VPP version must match the one specified at the top of the file (see package doc comment).
Try running
CheckCompatibility
method for the generated messages in a specific binapi package you are trying to use.The error that is returned should tell you which messages are incompatible.