mirror of
https://github.com/vishvananda/netlink.git
synced 2026-04-22 23:27:13 +08:00
netlink: skip VLAN proto byte swap on s390x (big-endian)
s390x is a big-endian architecture, so VLAN protocol values are already in network byte order. The existing unconditional byte swap performed when setting IFLA_VF_VLAN_INFO corrupts the VLAN protocol field on s390x, causing drivers to reject the request with protocol not supported. Signed-off-by: Ashok Pariya <ashok.pariya@ibm.com>
This commit is contained in:
committed by
Alessandro Boch
parent
c6faf428e8
commit
e79c63fbd0
+1
-1
@@ -699,7 +699,7 @@ func (h *Handle) LinkSetVfVlanQosProto(link Link, vf, vlan, qos, proto int) erro
|
||||
Vlan: uint32(vlan),
|
||||
Qos: uint32(qos),
|
||||
},
|
||||
VlanProto: (uint16(proto)>>8)&0xFF | (uint16(proto)&0xFF)<<8,
|
||||
VlanProto: nl.Swap16(uint16(proto)),
|
||||
}
|
||||
|
||||
vfVlanList.AddRtAttr(nl.IFLA_VF_VLAN_INFO, vfmsg.Serialize())
|
||||
|
||||
Reference in New Issue
Block a user