#
682a8c63 |
| 23-May-2022 |
David S. Miller <davem@davemloft.net> |
Merge branch 'dsa-multi-cpu-port-part-two'
Vladimir Oltean says:
==================== DSA changes for multiple CPU ports (part 2)
As explained in part 1: https://patchwork.kernel.org/project/netde
Merge branch 'dsa-multi-cpu-port-part-two'
Vladimir Oltean says:
==================== DSA changes for multiple CPU ports (part 2)
As explained in part 1: https://patchwork.kernel.org/project/netdevbpf/cover/20220511095020.562461-1-vladimir.oltean@nxp.com/ I am trying to enable the second internal port pair from the NXP LS1028A Felix switch for DSA-tagged traffic via "ocelot-8021q". This series represents part 2 (of an unknown number) of that effort.
This series deals only with a minor bug fix (first patch) and with code reorganization in the Felix DSA driver and in the Ocelot switch library. Hopefully this will lay the ground for a clean introduction of new UAPI for changing the DSA master of a user port in part 3. ====================
Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
c295f983 |
| 21-May-2022 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: mscc: ocelot: switch from {,un}set to {,un}assign for tag_8021q CPU ports
There is a desire for the felix driver to gain support for multiple tag_8021q CPU ports, but the current model prevents
net: mscc: ocelot: switch from {,un}set to {,un}assign for tag_8021q CPU ports
There is a desire for the felix driver to gain support for multiple tag_8021q CPU ports, but the current model prevents it.
This is because ocelot_apply_bridge_fwd_mask() only takes into consideration whether a port is a tag_8021q CPU port, but not whose CPU port it is.
We need a model where we can have a direct affinity between an ocelot port and a tag_8021q CPU port. This serves as the basis for multiple CPU ports.
Declare a "dsa_8021q_cpu" backpointer in struct ocelot_port which encodes that affinity. Repurpose the "ocelot_set_dsa_8021q_cpu" API to "ocelot_assign_dsa_8021q_cpu" to express the change of paradigm.
Note that this change makes the first practical use of the new ocelot_port->index field in ocelot_port_unassign_dsa_8021q_cpu(), where we need to remove the old tag_8021q CPU port from the reserved VLAN range.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
8c166acb |
| 21-May-2022 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: felix: directly call ocelot_port_{set,unset}_dsa_8021q_cpu
Absorb the final details of calling ocelot_port_{,un}set_dsa_8021q_cpu(), i.e. the need to lock &ocelot->fwd_domain_lock, into th
net: dsa: felix: directly call ocelot_port_{set,unset}_dsa_8021q_cpu
Absorb the final details of calling ocelot_port_{,un}set_dsa_8021q_cpu(), i.e. the need to lock &ocelot->fwd_domain_lock, into the callee, to simplify the caller and permit easier code reuse later.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
a72e23dd |
| 21-May-2022 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: felix: update bridge fwd mask from ocelot lib when changing tag_8021q CPU
Add more logic to ocelot_port_{,un}set_dsa_8021q_cpu() from the ocelot switch lib by encapsulating the ocelot_appl
net: dsa: felix: update bridge fwd mask from ocelot lib when changing tag_8021q CPU
Add more logic to ocelot_port_{,un}set_dsa_8021q_cpu() from the ocelot switch lib by encapsulating the ocelot_apply_bridge_fwd_mask() call that felix used to have.
This is necessary because the CPU port change procedure will also need to do this, and it's good to reduce code duplication by having an entry point in the ocelot switch lib that does all that is needed.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
61be79ba |
| 21-May-2022 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: felix: move the updating of PGID_CPU to the ocelot lib
PGID_CPU must be updated every time a port is configured or unconfigured as a tag_8021q CPU port. The ocelot switch lib already has a
net: dsa: felix: move the updating of PGID_CPU to the ocelot lib
PGID_CPU must be updated every time a port is configured or unconfigured as a tag_8021q CPU port. The ocelot switch lib already has a hook for that operation, so move the updating of PGID_CPU to those hooks.
These bits are pretty specific to DSA, so normally I would keep them out of the common switch lib, but when tag_8021q is in use, this has implications upon the forwarding mask determined by ocelot_apply_bridge_fwd_mask() and called extensively by the switch lib.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
da50aad6 |
| 22-May-2022 |
Sebastian Reichel <sebastian.reichel@collabora.com> |
Merge power-supply 'fixes' branch
Merge power-supply fixes, that missed the v5.18 merge window into power-supply's for-next branch.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
b0dacee2 |
| 20-May-2022 |
Joerg Roedel <jroedel@suse.de> |
Merge branches 'apple/dart', 'arm/mediatek', 'arm/msm', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'vfio-notifier-fix' into next
|
#
b11deb2f |
| 20-May-2022 |
Joerg Roedel <jroedel@suse.de> |
Merge tag 'v5.18-rc7' into arm/smmu
Linux 5.18-rc7
|
Revision tags: v5.15.41 |
|
#
d6da35e0 |
| 16-May-2022 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
Merge 5.18-rc7 into usb-next
We need the tty fixes in here as well, as we need to revert one of them :(
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
c5468a28 |
| 16-May-2022 |
Arnaldo Carvalho de Melo <acme@redhat.com> |
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes from perf/urgent.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
Revision tags: v5.15.40 |
|
#
879c610c |
| 12-May-2022 |
Jakub Kicinski <kuba@kernel.org> |
Merge branch 'dsa-changes-for-multiple-cpu-ports-part-1'
Vladimir Oltean says:
==================== DSA changes for multiple CPU ports (part 1)
I am trying to enable the second internal port pair
Merge branch 'dsa-changes-for-multiple-cpu-ports-part-1'
Vladimir Oltean says:
==================== DSA changes for multiple CPU ports (part 1)
I am trying to enable the second internal port pair from the NXP LS1028A Felix switch for DSA-tagged traffic via "ocelot-8021q". This series represents part 1 (of an unknown number) of that effort.
It does some preparation work, like managing host flooding in DSA via a dedicated method, and removing the CPU port as argument from the tagging protocol change procedure.
In terms of driver-specific changes, it reworks the 2 tag protocol implementations in the Felix driver to have a structured data format. It enables host flooding towards all tag_8021q CPU ports. It dynamically updates the tag_8021q CPU port used for traps. It also fixes a bug introduced by a previous refactoring/oversimplification commit in net-next. ====================
Link: https://lore.kernel.org/r/20220511095020.562461-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
Revision tags: v5.15.39 |
|
#
910ee6cc |
| 11-May-2022 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: felix: bring the NPI port indirection for host flooding to surface
For symmetry with host FDBs and MDBs where the indirection is now handled outside the ocelot switch lib, do the same for
net: dsa: felix: bring the NPI port indirection for host flooding to surface
For symmetry with host FDBs and MDBs where the indirection is now handled outside the ocelot switch lib, do the same for bridge port flags (unicast/multicast/broadcast flooding).
The only caller of the ocelot switch lib which uses the NPI port is the Felix DSA driver.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
0ddf83cd |
| 11-May-2022 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: felix: bring the NPI port indirection for host MDBs to surface
For symmetry with host FDBs where the indirection is now handled outside the ocelot switch lib, do the same for host MDB entr
net: dsa: felix: bring the NPI port indirection for host MDBs to surface
For symmetry with host FDBs where the indirection is now handled outside the ocelot switch lib, do the same for host MDB entries. The only caller of the ocelot switch lib which uses the NPI port is the Felix DSA driver.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
e9b3ba43 |
| 11-May-2022 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: felix: program host FDB entries towards PGID_CPU for tag_8021q too
I remembered why we had the host FDB migration procedure in place.
It is true that host FDB entry migration can be done
net: dsa: felix: program host FDB entries towards PGID_CPU for tag_8021q too
I remembered why we had the host FDB migration procedure in place.
It is true that host FDB entry migration can be done by changing the value of PGID_CPU, but the problem is that only host FDB entries learned while operating in NPI mode go to PGID_CPU. When the CPU port operates in tag_8021q mode, the FDB entries are learned towards the unicast PGID equal to the physical port number of this CPU port, bypassing the PGID_CPU indirection.
So host FDB entries learned in tag_8021q mode are not migrated any longer towards the NPI port.
Fix this by extracting the NPI port -> PGID_CPU redirection from the ocelot switch lib, moving it to the Felix DSA driver, and applying it for any CPU port regardless of its kind (NPI or tag_8021q).
Fixes: a51c1c3f3218 ("net: dsa: felix: stop migrating FDBs back and forth on tag proto change") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
9b19e57a |
| 12-May-2022 |
Jakub Kicinski <kuba@kernel.org> |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Build issue in drivers/net/ethernet/sfc/ptp.c 54fccfdd7c66 ("sfc: efx_default_channel_type APIs can be static") 49e6
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Build issue in drivers/net/ethernet/sfc/ptp.c 54fccfdd7c66 ("sfc: efx_default_channel_type APIs can be static") 49e6123c65da ("net: sfc: fix memory leak due to ptp channel") https://lore.kernel.org/all/20220510130556.52598fe2@canb.auug.org.au/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
f3f19f93 |
| 12-May-2022 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge tag 'net-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from wireless, and bluetooth.
No outstanding fire
Merge tag 'net-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from wireless, and bluetooth.
No outstanding fires.
Current release - regressions:
- eth: atlantic: always deep reset on pm op, fix null-deref
Current release - new code bugs:
- rds: use maybe_get_net() when acquiring refcount on TCP sockets [refinement of a previous fix]
- eth: ocelot: mark traps with a bool instead of guessing type based on list membership
Previous releases - regressions:
- net: fix skipping features in for_each_netdev_feature()
- phy: micrel: fix null-derefs on suspend/resume and probe
- bcmgenet: check for Wake-on-LAN interrupt probe deferral
Previous releases - always broken:
- ipv4: drop dst in multicast routing path, prevent leaks
- ping: fix address binding wrt vrf
- net: fix wrong network header length when BPF protocol translation is used on skbs with a fraglist
- bluetooth: fix the creation of hdev->name
- rfkill: uapi: fix RFKILL_IOCTL_MAX_SIZE ioctl request definition
- wifi: iwlwifi: iwl-dbg: use del_timer_sync() before freeing
- wifi: ath11k: reduce the wait time of 11d scan and hw scan while adding an interface
- mac80211: fix rx reordering with non explicit / psmp ack policy
- mac80211: reset MBSSID parameters upon connection
- nl80211: fix races in nl80211_set_tx_bitrate_mask()
- tls: fix context leak on tls_device_down
- sched: act_pedit: really ensure the skb is writable
- batman-adv: don't skb_split skbuffs with frag_list
- eth: ocelot: fix various issues with TC actions (null-deref; bad stats; ineffective drops; ineffective filter removal)"
* tag 'net-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (61 commits) tls: Fix context leak on tls_device_down net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe() net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending net: dsa: bcm_sf2: Fix Wake-on-LAN with mac_link_down() mlxsw: Avoid warning during ip6gre device removal net: bcmgenet: Check for Wake-on-LAN interrupt probe deferral net: ethernet: mediatek: ppe: fix wrong size passed to memset() Bluetooth: Fix the creation of hdev->name i40e: i40e_main: fix a missing check on list iterator net/sched: act_pedit: really ensure the skb is writable s390/lcs: fix variable dereferenced before check s390/ctcm: fix potential memory leak s390/ctcm: fix variable dereferenced before check net: atlantic: verify hw_head_ lies within TX buffer ring net: atlantic: add check for MAX_SKB_FRAGS net: atlantic: reduce scope of is_rsc_complete net: atlantic: fix "frag[0] not initialized" net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe() net: phy: micrel: Fix incorrect variable type in micrel decnet: Use container_of() for struct dn_neigh casts ...
show more ...
|
#
b7c15a3c |
| 11-May-2022 |
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> |
Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixes
Requested by Zack for vmwgfx fixes.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
#
47319846 |
| 11-May-2022 |
Peter Zijlstra <peterz@infradead.org> |
Merge branch 'v5.18-rc5'
Obtain the new INTEL_FAM6 stuff required.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
|
Revision tags: v5.15.38 |
|
#
8fc0b699 |
| 06-May-2022 |
Jakub Kicinski <kuba@kernel.org> |
Merge branch 'simplify-migration-of-host-filtered-addresses-in-felix-driver'
Vladimir Oltean says:
==================== Simplify migration of host filtered addresses in Felix driver
The purpose of
Merge branch 'simplify-migration-of-host-filtered-addresses-in-felix-driver'
Vladimir Oltean says:
==================== Simplify migration of host filtered addresses in Felix driver
The purpose of this patch set is to remove the functions dsa_port_walk_fdbs() and dsa_port_walk_mdbs() from the DSA core, which were introduced when the Felix driver gained support for unicast filtering on standalone ports. They get called when changing the tagging protocol back and forth between "ocelot" and "ocelot-8021q". I did not realize we could get away without having them.
The patch set was regression-tested using the local_termination.sh selftest using both tagging protocols. ====================
Link: https://lore.kernel.org/r/20220505162213.307684-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
28de0f9f |
| 05-May-2022 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: felix: perform MDB migration based on ocelot->multicast list
The felix driver is the only user of dsa_port_walk_mdbs(), and there isn't even a good reason for it, considering that the host
net: dsa: felix: perform MDB migration based on ocelot->multicast list
The felix driver is the only user of dsa_port_walk_mdbs(), and there isn't even a good reason for it, considering that the host MDB entries are already saved by the ocelot switch lib in the ocelot->multicast list.
Rewrite the multicast entry migration procedure around the ocelot->multicast list so we can delete dsa_port_walk_mdbs().
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
d70522fc |
| 06-May-2022 |
Ingo Molnar <mingo@kernel.org> |
Merge tag 'v5.18-rc5' into sched/core to pull in fixes & to resolve a conflict
- sched/core is on a pretty old -rc1 base - refresh it to include recent fixes. - this also allows up to resolve a (t
Merge tag 'v5.18-rc5' into sched/core to pull in fixes & to resolve a conflict
- sched/core is on a pretty old -rc1 base - refresh it to include recent fixes. - this also allows up to resolve a (trivial) .mailmap conflict
Conflicts: .mailmap
Signed-off-by: Ingo Molnar <mingo@kernel.org>
show more ...
|
#
c88d3908 |
| 05-May-2022 |
Jakub Kicinski <kuba@kernel.org> |
Merge branch 'ocelot-vcap-fixes'
Vladimir Oltean says:
==================== Ocelot VCAP fixes
Changes in v2: fix the NPDs and UAFs caused by filter->trap_list in a more robust way that actually do
Merge branch 'ocelot-vcap-fixes'
Vladimir Oltean says:
==================== Ocelot VCAP fixes
Changes in v2: fix the NPDs and UAFs caused by filter->trap_list in a more robust way that actually does not introduce bugs of its own (1/5)
This series fixes issues found while running tools/testing/selftests/net/forwarding/tc_actions.sh on the ocelot switch:
- NULL pointer dereference when failing to offload a filter - NULL pointer dereference after deleting a trap - filters still having effect after being deleted - dropped packets still being seen by software - statistics counters showing double the amount of hits - statistics counters showing inexistent hits - invalid configurations not rejected ====================
Link: https://lore.kernel.org/r/20220504235503.4161890-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
e1846cff |
| 04-May-2022 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: mscc: ocelot: mark traps with a bool instead of keeping them in a list
Since the blamed commit, VCAP filters can appear on more than one list. If their action is "trap", they are chained on oce
net: mscc: ocelot: mark traps with a bool instead of keeping them in a list
Since the blamed commit, VCAP filters can appear on more than one list. If their action is "trap", they are chained on ocelot->traps via filter->trap_list. This is in addition to their normal placement on the VCAP block->rules list head.
Therefore, when we free a VCAP filter, we must remove it from all lists it is a member of, including ocelot->traps.
There are at least 2 bugs which are direct consequences of this design decision.
First is the incorrect usage of list_empty(), meant to denote whether "filter" is chained into ocelot->traps via filter->trap_list. This does not do the correct thing, because list_empty() checks whether "head->next == head", but in our case, head->next == head->prev == NULL. So we dereference NULL pointers and die when we call list_del().
Second is the fact that not all places that should remove the filter from ocelot->traps do so. One example is ocelot_vcap_block_remove_filter(), which is where we have the main kfree(filter). By keeping freed filters in ocelot->traps we end up in a use-after-free in felix_update_trapping_destinations().
Attempting to fix all the buggy patterns is a whack-a-mole game which makes the driver unmaintainable. Actually this is what the previous patch version attempted to do: https://patchwork.kernel.org/project/netdevbpf/patch/20220503115728.834457-3-vladimir.oltean@nxp.com/
but it introduced another set of bugs, because there are other places in which create VCAP filters, not just ocelot_vcap_filter_create():
- ocelot_trap_add() - felix_tag_8021q_vlan_add_rx() - felix_tag_8021q_vlan_add_tx()
Relying on the convention that all those code paths must call INIT_LIST_HEAD(&filter->trap_list) is not going to scale.
So let's do what should have been done in the first place and keep a bool in struct ocelot_vcap_filter which denotes whether we are looking at a trapping rule or not. Iterating now happens over the main VCAP IS2 block->rules. The advantage is that we no longer risk having stale references to a freed filter, since it is only present in that list.
Fixes: e42bd4ed09aa ("net: mscc: ocelot: keep traps in a list") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
d0a31acc |
| 05-May-2022 |
Michael Ellerman <mpe@ellerman.id.au> |
Merge tag 'v5.18-rc4' into next
Merge master into next, to bring in commit 5f24d5a579d1 ("mm, hugetlb: allow for "high" userspace addresses"), which is needed as a prerequisite for the series conver
Merge tag 'v5.18-rc4' into next
Merge master into next, to bring in commit 5f24d5a579d1 ("mm, hugetlb: allow for "high" userspace addresses"), which is needed as a prerequisite for the series converting powerpc to the generic mmap logic.
show more ...
|
#
b9c92fb4 |
| 03-May-2022 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
Merge 5.18-rc5 into usb-next
We need the USB fixes in here, and this resolves a merge issue in drivers/usb/dwc3/drd.c
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-
Merge 5.18-rc5 into usb-next
We need the USB fixes in here, and this resolves a merge issue in drivers/usb/dwc3/drd.c
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|