diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2020-03-27 21:55:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-27 16:07:25 -0700 |
commit | 0b912fc93a680ab6105a63c36222923fbe09065e (patch) | |
tree | 3ae828b214df599a0f3f2b463acbb23c9ebfea45 /include/soc | |
parent | fb77ffc6ec866b41aba5a31b38eacd8829fd2eb0 (diff) |
net: dsa: felix: support changing the MTU
Changing the MTU for this switch means altering the
DEV_GMII:MAC_CFG_STATUS:MAC_MAXLEN_CFG field MAX_LEN, which in turn
limits the size of frames that can be received.
Special accounting needs to be done for the DSA CPU port (NPI port in
hardware terms). The NPI port configuration needs to be held inside the
private ocelot structure, since it is now accessed from multiple places.
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 'include/soc')
-rw-r--r-- | include/soc/mscc/ocelot.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h index 007b584cc431..eadbc2ddfcb5 100644 --- a/include/soc/mscc/ocelot.h +++ b/include/soc/mscc/ocelot.h @@ -517,6 +517,11 @@ struct ocelot { */ u8 num_phys_ports; + int npi; + + enum ocelot_tag_prefix inj_prefix; + enum ocelot_tag_prefix xtr_prefix; + u32 *lags; struct list_head multicast; @@ -611,6 +616,8 @@ int ocelot_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts); int ocelot_port_add_txtstamp_skb(struct ocelot_port *ocelot_port, struct sk_buff *skb); void ocelot_get_txtstamp(struct ocelot *ocelot); +void ocelot_port_set_maxlen(struct ocelot *ocelot, int port, size_t sdu); +int ocelot_get_max_mtu(struct ocelot *ocelot, int port); int ocelot_cls_flower_replace(struct ocelot *ocelot, int port, struct flow_cls_offload *f, bool ingress); int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port, |