<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/dsa/slave.c, branch linux-5.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-12-08T19:24:07Z</updated>
<entry>
<title>net: dsa: print the MTU value that could not be set</title>
<updated>2020-12-08T19:24:07Z</updated>
<author>
<name>Rasmus Villemoes</name>
</author>
<published>2020-12-05T13:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bdc40a3f4b4f967e6411ee389f062d52a2686eca'/>
<id>urn:sha1:bdc40a3f4b4f967e6411ee389f062d52a2686eca</id>
<content type='text'>
These warnings become somewhat more informative when they include the
MTU value that could not be set and not just the errno.

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
Link: https://lore.kernel.org/r/20201205133944.10182-1-rasmus.villemoes@prevas.dk
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: avoid potential use-after-free error</title>
<updated>2020-11-20T23:02:50Z</updated>
<author>
<name>Christian Eggers</name>
</author>
<published>2020-11-19T11:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=30abc9cd9c6bdd44d23fc49a9c2526a86fba4305'/>
<id>urn:sha1:30abc9cd9c6bdd44d23fc49a9c2526a86fba4305</id>
<content type='text'>
If dsa_switch_ops::port_txtstamp() returns false, clone will be freed
immediately. Shouldn't store a pointer to freed memory.

Signed-off-by: Christian Eggers &lt;ceggers@arri.de&gt;
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Tested-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Link: https://lore.kernel.org/r/20201119110906.25558-1-ceggers@arri.de
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: use net core stats64 handling</title>
<updated>2020-11-10T01:50:27Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2020-11-07T20:49:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6a9006287959ef69556d612dcbde9e68bf16a42b'/>
<id>urn:sha1:6a9006287959ef69556d612dcbde9e68bf16a42b</id>
<content type='text'>
Use netdev-&gt;tstats instead of a member of dsa_slave_priv for storing
a pointer to the per-cpu counters. This allows us to use core
functionality for statistics handling.

Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Tested-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: Give drivers the chance to veto certain upper devices</title>
<updated>2020-11-05T22:04:49Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2020-11-03T07:10:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e358bef7c392b6a29381b9b8fbf646a88d5968f3'/>
<id>urn:sha1:e358bef7c392b6a29381b9b8fbf646a88d5968f3</id>
<content type='text'>
Some switches rely on unique pvids to ensure port separation in
standalone mode, because they don't have a port forwarding matrix
configurable in hardware. So, setups like a group of 2 uppers with the
same VLAN, swp0.100 and swp1.100, will cause traffic tagged with VLAN
100 to be autonomously forwarded between these switch ports, in spite
of there being no bridge between swp0 and swp1.

These drivers need to prevent this from happening. They need to have
VLAN filtering enabled in standalone mode (so they'll drop frames tagged
with unknown VLANs) and they can only accept an 8021q upper on a port as
long as it isn't installed on any other port too. So give them the
chance to veto bad user requests.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
[Kurt: Pass info instead of ptr]
Signed-off-by: Kurt Kanzenbach &lt;kurt@linutronix.de&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: implement a central TX reallocation procedure</title>
<updated>2020-11-03T01:41:15Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2020-11-01T19:16:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3b0b6479700a5b0af2c631cb2ec0fb7a0d978f2'/>
<id>urn:sha1:a3b0b6479700a5b0af2c631cb2ec0fb7a0d978f2</id>
<content type='text'>
At the moment, taggers are left with the task of ensuring that the skb
headers are writable (which they aren't, if the frames were cloned for
TX timestamping, for flooding by the bridge, etc), and that there is
enough space in the skb data area for the DSA tag to be pushed.

Moreover, the life of tail taggers is even harder, because they need to
ensure that short frames have enough padding, a problem that normal
taggers don't have.

The principle of the DSA framework is that everything except for the
most intimate hardware specifics (like in this case, the actual packing
of the DSA tag bits) should be done inside the core, to avoid having
code paths that are very rarely tested.

So provide a TX reallocation procedure that should cover the known needs
of DSA today.

Note that this patch also gives the network stack a good hint about the
headroom/tailroom it's going to need. Up till now it wasn't doing that.
So the reallocation procedure should really be there only for the
exceptional cases, and for cloned packets which need to be unshared.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Tested-by: Christian Eggers &lt;ceggers@arri.de&gt; # For tail taggers only
Tested-by: Kurt Kanzenbach &lt;kurt@linutronix.de&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: use new function dev_fetch_sw_netstats</title>
<updated>2020-10-14T00:33:49Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2020-10-12T08:16:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0d269810185b427feb1ba671cffeac0be17fa27'/>
<id>urn:sha1:a0d269810185b427feb1ba671cffeac0be17fa27</id>
<content type='text'>
Simplify the code by using new function dev_fetch_sw_netstats().

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Tested-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Link: https://lore.kernel.org/r/b6047017-8226-6b7e-a3cd-064e69fdfa27@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2020-09-22T23:45:34Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2020-09-22T23:45:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ab0a7a0c349a1d7beb2bb371a62669d1528269d'/>
<id>urn:sha1:3ab0a7a0c349a1d7beb2bb371a62669d1528269d</id>
<content type='text'>
Two minor conflicts:

1) net/ipv4/route.c, adding a new local variable while
   moving another local variable and removing it's
   initial assignment.

2) drivers/net/dsa/microchip/ksz9477.c, overlapping changes.
   One pretty prints the port mode differently, whilst another
   changes the driver to try and obtain the port mode from
   the port node rather than the switch node.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dsa: install VLANs into the master's RX filter too</title>
<updated>2020-09-21T02:01:34Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2020-09-21T00:10:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2209158c9055dbc937673ec09c032505667d839e'/>
<id>urn:sha1:2209158c9055dbc937673ec09c032505667d839e</id>
<content type='text'>
Most DSA switch tags shift the EtherType to the right, causing the
master to not parse the VLAN as VLAN.
However, not all switches do that (example: tail tags, tag_8021q etc),
and if the DSA master has "rx-vlan-filter: on" in ethtool -k, then we
have a problem.

Therefore, we could populate the VLAN table of the master, just in case
(for some switches it will not make a difference), so that network I/O
can work even with a VLAN filtering master.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dsa: allow 8021q uppers while the bridge has vlan_filtering=0</title>
<updated>2020-09-21T02:01:34Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2020-09-21T00:10:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adb256eb1769dec74b809690f418e8e46bee62a7'/>
<id>urn:sha1:adb256eb1769dec74b809690f418e8e46bee62a7</id>
<content type='text'>
When the bridge has VLAN awareness disabled there isn't any duplication
of functionality, since the bridge does not process VLAN. Don't deny
adding 8021q uppers to DSA switch ports in that case. The switch is
supposed to simply pass traffic leaving the VLAN tag as-is, and the
stack will happily strip the VLAN tag for all 8021q uppers that exist.

We need to ensure that there are no 8021q uppers when the user attempts
to enable bridge vlan_filtering.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dsa: convert denying bridge VLAN with existing 8021q upper to PRECHANGEUPPER</title>
<updated>2020-09-21T02:01:33Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2020-09-21T00:10:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ce39f0ee8da0b2d8b5f30bcc9180b8f0148353f'/>
<id>urn:sha1:1ce39f0ee8da0b2d8b5f30bcc9180b8f0148353f</id>
<content type='text'>
This is checking for the following order of operations, and makes sure
to deny that configuration:

ip link add link swp2 name swp2.100 type vlan id 100
ip link add br0 type bridge vlan_filtering 1
ip link set swp2 master br0
bridge vlan add dev swp2 vid 100

Instead of using vlan_for_each(), which looks at the VLAN filters
installed with vlan_vid_add(), just track the 8021q uppers. This has the
advantage of freeing up the vlan_vid_add() call for actual VLAN
filtering.

There is another change in this patch. The check is moved in slave.c,
from switch.c. I don't think it makes sense to have this 8021q upper
check for each switch port that gets notified of that VLAN addition
(these include DSA links and CPU ports, we know those can't have 8021q
uppers because they don't have a net_device registered for them), so
just do it in slave.c, for that one slave interface.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
