mbox series

[v2,net-next,00/10] DSA tagging driver for NXP SJA1110

Message ID 20210610232629.1948053-1-olteanv@gmail.com (mailing list archive)
Headers show
Series DSA tagging driver for NXP SJA1110 | expand

Message

Vladimir Oltean June 10, 2021, 11:26 p.m. UTC
From: Vladimir Oltean <vladimir.oltean@nxp.com>

This series adds support for tagging data and control packets on the new
NXP SJA1110 switch (supported by the sja1105 driver). Up to this point
it used the sja1105 driver, which allowed it to send data packets, but
not PDUs as those required by STP and PTP.

To accommodate this new tagger which has both a header and a trailer, we
need to refactor the entire DSA tagging scheme, to replace the "overhead"
concept with separate "needed_headroom" and "needed_tailroom" concepts,
so that SJA1110 can declare its need for both.

There is also some consolidation work for the receive path of tag_8021q
and its callers (sja1105 and ocelot-8021q).

Changes in v2:
Export the dsa_8021q_rcv and sja1110_process_meta_tstamp symbols to
avoid build errors as modules.

Vladimir Oltean (10):
  net: dsa: sja1105: enable the TTEthernet engine on SJA1110
  net: dsa: sja1105: allow RX timestamps to be taken on all ports for
    SJA1110
  net: dsa: generalize overhead for taggers that use both headers and
    trailers
  net: dsa: tag_sja1105: stop resetting network and transport headers
  net: dsa: tag_8021q: remove shim declarations
  net: dsa: tag_8021q: refactor RX VLAN parsing into a dedicated
    function
  net: dsa: sja1105: make SJA1105_SKB_CB fit a full timestamp
  net: dsa: add support for the SJA1110 native tagging protocol
  net: dsa: sja1105: add the RX timestamping procedure for SJA1110
  net: dsa: sja1105: implement TX timestamping for SJA1110

 Documentation/networking/dsa/dsa.rst          |  21 +-
 drivers/net/dsa/sja1105/sja1105.h             |   4 +
 drivers/net/dsa/sja1105/sja1105_main.c        |  35 +-
 drivers/net/dsa/sja1105/sja1105_ptp.c         |  97 +++++-
 drivers/net/dsa/sja1105/sja1105_ptp.h         |  13 +
 drivers/net/dsa/sja1105/sja1105_spi.c         |  28 ++
 .../net/dsa/sja1105/sja1105_static_config.c   |   1 +
 .../net/dsa/sja1105/sja1105_static_config.h   |   1 +
 include/linux/dsa/8021q.h                     |  79 +----
 include/linux/dsa/sja1105.h                   |  26 +-
 include/net/dsa.h                             |   8 +-
 net/core/flow_dissector.c                     |   2 +-
 net/dsa/dsa_priv.h                            |   5 +
 net/dsa/master.c                              |   6 +-
 net/dsa/slave.c                               |  10 +-
 net/dsa/tag_8021q.c                           |  23 ++
 net/dsa/tag_ar9331.c                          |   2 +-
 net/dsa/tag_brcm.c                            |   6 +-
 net/dsa/tag_dsa.c                             |   4 +-
 net/dsa/tag_gswip.c                           |   2 +-
 net/dsa/tag_hellcreek.c                       |   3 +-
 net/dsa/tag_ksz.c                             |   9 +-
 net/dsa/tag_lan9303.c                         |   2 +-
 net/dsa/tag_mtk.c                             |   2 +-
 net/dsa/tag_ocelot.c                          |   4 +-
 net/dsa/tag_ocelot_8021q.c                    |  20 +-
 net/dsa/tag_qca.c                             |   2 +-
 net/dsa/tag_rtl4_a.c                          |   2 +-
 net/dsa/tag_sja1105.c                         | 312 ++++++++++++++++--
 net/dsa/tag_trailer.c                         |   3 +-
 net/dsa/tag_xrs700x.c                         |   3 +-
 31 files changed, 551 insertions(+), 184 deletions(-)

Comments

David Miller June 10, 2021, 11:50 p.m. UTC | #1
Patch 9 no longer applies cleanly.

Thank you.
Vladimir Oltean June 11, 2021, 12:09 a.m. UTC | #2
On Thu, Jun 10, 2021 at 04:50:50PM -0700, David Miller wrote:
> 
> Patch 9 no longer applies cleanly.
> 
> Thank you.

Ah, that is because I also have the "Port the SJA1105 DSA driver to XPCS"
patches in my tree, and they are photobombing this series. With git rebase -i
they apply both ways, but git rebase has more context when applying than
git am, so I'm not in fact surprised that it fails, now that you mention it.

I could probably dodge that by moving some lines of code here and there
so they aren't near the XPCS changes, but I think I'll choose to not do
that, and instead let the people breathe a little, maybe take a look at
the patches as they are - if they want to apply them to a tree, that's
possible as well, sure, just apply the other series first - and then
resend tomorrow, or after the other patches are accepted.

Thanks and sorry for the trouble.
Andrew Lunn June 11, 2021, 3:26 a.m. UTC | #3
On Fri, Jun 11, 2021 at 03:09:15AM +0300, Vladimir Oltean wrote:
> On Thu, Jun 10, 2021 at 04:50:50PM -0700, David Miller wrote:
> > 
> > Patch 9 no longer applies cleanly.
> > 
> > Thank you.
> 
> Ah, that is because I also have the "Port the SJA1105 DSA driver to XPCS"
> patches in my tree, and they are photobombing this series. With git rebase -i
> they apply both ways, but git rebase has more context when applying than
> git am, so I'm not in fact surprised that it fails, now that you mention it.
> 
> I could probably dodge that by moving some lines of code here and there
> so they aren't near the XPCS changes

Hi Vladimir

git am is very pedantic. It does not use fuzz. So just moving lines
within the same line is unlikely to work, you need to make the changes
in non intersecting sets of files.

Your best bet is to be patient and wait for one patchset to get
merged, and then submit the second patchset.

	Andrew
David Miller June 11, 2021, 5:37 p.m. UTC | #4
From: Andrew Lunn <andrew@lunn.ch>
Date: Fri, 11 Jun 2021 05:26:01 +0200

> git am is very pedantic. It does not use fuzz. So just moving lines
> within the same line is unlikely to work, you need to make the changes
> in non intersecting sets of files.
> 
> Your best bet is to be patient and wait for one patchset to get
> merged, and then submit the second patchset.

Indeed.