diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-02-13 23:37:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-15 02:31:44 +0100 |
commit | 40d3f295b5feda409784e569550057b5fbc2a295 (patch) | |
tree | 0ad0d7a8e34853fbc96d7c6e099c97385830e2c2 /drivers/net/ethernet/mscc/ocelot.h | |
parent | net: dsa: tag_ocelot: avoid accessing ds->priv in ocelot_rcv (diff) | |
download | linux-40d3f295b5feda409784e569550057b5fbc2a295.tar.xz linux-40d3f295b5feda409784e569550057b5fbc2a295.zip |
net: mscc: ocelot: use common tag parsing code with DSA
The Injection Frame Header and Extraction Frame Header that the switch
prepends to frames over the NPI port is also prepended to frames
delivered over the CPU port module's queues.
Let's unify the handling of the frame headers by making the ocelot
driver call some helpers exported by the DSA tagger. Among other things,
this allows us to get rid of the strange cpu_to_be32 when transmitting
the Injection Frame Header on ocelot, since the packing API uses
network byte order natively (when "quirks" is 0).
The comments above ocelot_gen_ifh talk about setting pop_cnt to 3, and
the cpu extraction queue mask to something, but the code doesn't do it,
so we don't do it either.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot.h')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot.h b/drivers/net/ethernet/mscc/ocelot.h index c485795c606b..db6b1a4c3926 100644 --- a/drivers/net/ethernet/mscc/ocelot.h +++ b/drivers/net/ethernet/mscc/ocelot.h @@ -32,15 +32,6 @@ #define OCELOT_PTP_QUEUE_SZ 128 -struct frame_info { - u32 len; - u16 port; - u16 vid; - u8 tag_type; - u16 rew_op; - u32 timestamp; /* rew_val */ -}; - struct ocelot_port_tc { bool block_shared; unsigned long offload_cnt; |