Skip to contentSkip to conversation

net: dsa: bcm_sf2: Check egress tagging of CFP rule with proper accessor

PATCH Florian Fainelli 1 participant 1 message Feb 3, 2021 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Florian Fainelli

author Acked-by
#1 lore raw
In reply to a message not in the archive
Quoted 18 lines · Vladimir Oltean

The flow steering struct ethtool_flow_ext::data field is __be32, so when the CFP code needs to check the VLAN egress tagging attribute in bit 0, it does this in CPU native endianness. So logically, the endianness conversion is set up the other way around, although in practice the same result is produced.

Gets rid of build warning:

warning: cast from restricted __be32
warning: incorrect type in argument 1 (different base types)
expected unsigned int [usertype] val
got restricted __be32
warning: cast from restricted __be32
warning: cast from restricted __be32
warning: cast from restricted __be32
warning: cast from restricted __be32
warning: restricted __be32 degrades to integer

Quoted 1 line
Signature · 1 line
Florian