summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-13octeontx2-pf: Add flow classification using IP next level protocolNaveen Mamindlapalli
This patch adds support to install flow rules using ipv4 proto or ipv6 next header field to distinguish between tcp/udp/sctp/esp/ah flows when user doesn't specify the other match creteria related to the flow such as tcp/udp/sctp source port and destination port, ah/esp spi value. This is achieved by matching the layer type extracted by NPC HW into the search key. Modified the driver to use Ethertype as match criteria when user doesn't specify source IP address and dest IP address. The esp/ah flow rule matching using security parameter index (spi) is not supported as of now since the field is not extracted into MCAM search key. Modified npc_check_field function to return bool. Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Link: https://lore.kernel.org/r/20210111112537.3277-1-naveenm@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net: core: use eth_type_vlan in __netif_receive_skb_coreMenglong Dong
Replace the check for ETH_P_8021Q and ETH_P_8021AD in __netif_receive_skb_core with eth_type_vlan. Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Link: https://lore.kernel.org/r/20210111104221.3451-1-dong.menglong@zte.com.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13Merge branch 'mlx5-updates-2021-01-07'Jakub Kicinski
Saeed Mahameed says: ==================== mlx5 updates 2021-01-07 Misc updates series for mlx5 driver: 1) From Eli and Jianbo, E-Switch cleanups and usage of new FW capability for mpls over udp 2) Paul Blakey, Adds support for mirroring with Connection tracking by splitting rules to pre and post Connection tracking to perform the mirroring. 3) Roi Dayan, cleanups for connection tracking 4) From Tariq, Cleanups and improvements to IPSec ==================== Link: https://lore.kernel.org/r/20210112070534.136841-1-saeed@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5e: IPsec, Remove unnecessary config flag usageTariq Toukan
MLX5_IPSEC_DEV() is always defined, no need to protect it under config flag CONFIG_MLX5_EN_IPSEC, especially in slow path. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Raed Salem <raeds@nvidia.com> Reviewed-by: Huy Nguyen <huyn@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5e: IPsec, Inline feature_check fast-path functionTariq Toukan
Feature check functions are in the TX fast-path of all SKBs, not only IPsec traffic. Move the IPsec feature check function into a header and turn it inline. Use a stub and clean the config flag condition in Eth main driver file. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Raed Salem <raeds@nvidia.com> Reviewed-by: Huy Nguyen <huyn@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5e: IPsec, Avoid unreachable returnTariq Toukan
Simple code improvement, move default return operation under the #else block. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Huy Nguyen <huyn@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5e: IPsec, Enclose csum logic under ipsec configTariq Toukan
All IPsec logic should be wrapped under the compile flag, including its checksum logic. Introduce an inline function in ipsec datapath header, with a corresponding stub. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Raed Salem <raeds@nvidia.com> Reviewed-by: Huy Nguyen <huyn@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5e: CT: Remove redundant usage of zone maskRoi Dayan
The zone member is of type u16 so there is no reason to apply the zone mask on it. This is also matching the call to set a match in other places which don't need and don't apply the mask. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Paul Blakey <paulb@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5e: Remove redundant initialization to nullRoi Dayan
miss_rule and prio_s args are not being referenced before assigned so there is no need to init them. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Paul Blakey <paulb@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5e: CT: Pass null instead of zero specRoi Dayan
No need to pass zero spec to mlx5_add_flow_rules() as the function can handle null spec. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Paul Blakey <paulb@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5e: E-Switch, Offload all chain 0 priorities when modify header and ↵Jianbo Liu
forward action is not supported Miss path handling of tc multi chain filters (i.e. filters that are defined on chain > 0) requires the hardware to communicate to the driver the last chain that was processed. This is possible only when the hardware is capable of performing the combination of modify header and forward to table actions. Currently, if the hardware is missing this capability then the driver only offloads rules that are defined on tc chain 0 prio 1. However, this restriction can be relaxed because packets that miss from chain 0 are processed through all the priorities by tc software. Allow the offload of all the supported priorities for chain 0 even when the hardware is not capable to perform modify header and goto table actions. Signed-off-by: Jianbo Liu <jianbol@mellanox.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5: E-Switch, use new cap as condition for mpls over udpEli Cohen
Use tunnel_stateless_mpls_over_udp instead of MLX5_FLEX_PROTO_CW_MPLS_UDP since new devices have native support for mpls over udp and do not rely on flex parser. Signed-off-by: Eli Cohen <elic@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5e: Simplify condition on esw_vport_enable_qos()Eli Cohen
esw->qos.enabled will only be true if both MLX5_CAP_GEN(dev, qos) and MLX5_CAP_QOS(dev, esw_scheduling) are true. Therefore, remove them from the condition in and rely only on esw->qos.enabled. Signed-off-by: Eli Cohen <elic@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-13net/mlx5: Add HW definition of reg_c_preservePaul Blakey
Add capability bit to test whether reg_c value is preserved on recirculation. Signed-off-by: Paul Blakey <paulb@mellanox.com> Signed-off-by: Maor Dickman <maord@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12hci: llc_shdlc: style: Simplify bool comparisonYANG LI
Fix the following coccicheck warning: ./net/nfc/hci/llc_shdlc.c:239:5-21: WARNING: Comparison to bool Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com> Reported-by: Abaci Robot<abaci@linux.alibaba.com> Link: https://lore.kernel.org/r/1610357063-57705-1-git-send-email-abaci-bugfix@linux.alibaba.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12Merge branch 'net-dsa-add-stats64-support'Jakub Kicinski
Oleksij Rempel says: ==================== net: dsa: add stats64 support changes v8: - stats.no_handler should not be assigned from HW stats changes v7: - move raw.filtered from rx_errors to rx_dropped counter changes v6: - move stats64 callback to ethtool section - ar9331: diff. fixes - ar9331: move stats calculation to the worker - ar9331: extend rx/tx error counters - use spin lock instead of u64_stats* changes v5: - read all stats in one regmap_bulk_read() request - protect stats with u64_stats* helpers. changes v4: - do no read MIBs withing stats64 call - change polling frequency to 0.3Hz changes v3: - fix wrong multiplication - cancel port workers on remove changes v2: - use stats64 instead of get_ethtool_stats - add worked to poll for the stats ==================== Link: https://lore.kernel.org/r/20210111104658.21930-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12net: dsa: qca: ar9331: export stats64Oleksij Rempel
Add stats support for the ar9331 switch. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12net: dsa: add optional stats64 supportOleksij Rempel
Allow DSA drivers to export stats64 Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12net: ipa: add config dependency on QCOM_SMEMAlex Elder
The IPA driver depends on some SMEM functionality (qcom_smem_init(), qcom_smem_alloc(), and qcom_smem_virt_to_phys()), but this is not reflected in the configuration dependencies. Add a dependency on QCOM_SMEM to avoid attempts to build the IPA driver without SMEM. This avoids a link error for certain configurations. Reported-by: Randy Dunlap <rdunlap@infradead.org> Fixes: 38a4066f593c5 ("net: ipa: support COMPILE_TEST") Signed-off-by: Alex Elder <elder@linaro.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210112192134.493-1-elder@linaro.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12fsl/fman: Add MII mode support.Maxim Kochetkov
Set proper value to IF_MODE register for MII mode. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> Link: https://lore.kernel.org/r/20210111043903.8044-1-fido_max@inbox.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12net: sfp: add debugfs supportRussell King
Add debugfs support to SFP so that the internal state of the SFP state machines and hardware signal state can be viewed from userspace, rather than having to compile a debug kernel to view state transitions in the kernel log. The 'state' output looks like: Module state: empty Module probe attempts: 0 0 Device state: up Main state: down Fault recovery remaining retries: 5 PHY probe remaining retries: 12 moddef0: 0 rx_los: 1 tx_fault: 1 tx_disable: 1 Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Link: https://lore.kernel.org/r/E1kyYRe-0004kN-3F@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12Merge branch 'hv_netvsc-prevent-packet-loss-during-vf-add-remove'Jakub Kicinski
Long Li says: ==================== hv_netvsc: Prevent packet loss during VF add/remove This patch set fixes issues with packet loss on VF add/remove. ==================== Link: https://lore.kernel.org/r/1610153623-17500-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12hv_netvsc: Process NETDEV_GOING_DOWN on VF hot removeLong Li
On VF hot remove, NETDEV_GOING_DOWN is sent to notify the VF is about to go down. At this time, the VF is still sending/receiving traffic and we request the VSP to switch datapath. On completion, the datapath is switched to synthetic and we can proceed with VF hot remove. Signed-off-by: Long Li <longli@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12hv_netvsc: Wait for completion on request SWITCH_DATA_PATHLong Li
The completion indicates if NVSP_MSG4_TYPE_SWITCH_DATA_PATH has been processed by the VSP. The traffic is steered to VF or synthetic after we receive this completion. Signed-off-by: Long Li <longli@microsoft.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12hv_netvsc: Check VF datapath when sending traffic to VFLong Li
The driver needs to check if the datapath has been switched to VF before sending traffic to VF. Signed-off-by: Long Li <longli@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12net: marvell: Fixed two spellings,controling to controlling and oen to oneBhaskar Chowdhury
s/oen/one/ s/controling/controlling/ Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20210112103152.13222-1-unixbhaskar@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12Merge branch 'r8169-further-improvements'Jakub Kicinski
Heiner Kallweit says: ==================== r8169: further improvements Series includes further smaller improvements. ==================== Link: https://lore.kernel.org/r/1bc3b7ef-b54a-d517-df54-27d61ca7ba94@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12r8169: improve DASH supportHeiner Kallweit
Instead of doing the full DASH check each time r8168_check_dash() is called, let's do it once in probe and store DASH capabilities in a new rtl8169_private member. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12r8169: improve rtl8169_rx_csumHeiner Kallweit
Extend the mask to include the checksum failure bits. This allows to simplify the condition in rtl8169_rx_csum(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12r8169: align rtl_wol_suspend_quirk with vendor driver and rename itHeiner Kallweit
At least from chip version 25 the vendor driver sets these rx flags for all chip versions if WOL is enabled. Therefore I wouldn't consider it a quirk, so let's rename the function. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-12net: ks8851: Select PHYLIB and MICREL_PHY in KconfigMarek Vasut
The PHYLIB must be selected to provide mdiobus_*() functions, and the MICREL_PHY is necessary too, as that is the only possible PHY attached to the KS8851 (it is the internal PHY). Fixes: ef3631220d2b ("net: ks8851: Register MDIO bus and the internal PHY") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Heiner Kallweit <hkallweit1@gmail.com> Cc: Lukas Wunner <lukas@wunner.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20210111125046.36326-1-marex@denx.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11net: mvpp2: prs: improve ipv4 parse flowStefan Chulski
Patch didn't fix any issue, just improve parse flow and align ipv4 parse flow with ipv6 parse flow. Currently ipv4 kenguru parser first check IP protocol(TCP/UDP) and then destination IP address. Patch introduce reverse ipv4 parse, first destination IP address parsed and only then IP protocol. This would allow extend capability for packet L4 parsing and align ipv4 parsing flow with ipv6. Suggested-by: Liron Himi <liron@marvell.com> Signed-off-by: Stefan Chulski <stefanc@marvell.com> Link: https://lore.kernel.org/r/1610289059-14962-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11Fix whitespace in uapi/linux/tcp.h.Danilo Carvalho
List of things fixed: - Two of the socket options were idented with spaces instead of tabs. - Trailing whitespace in some lines. - Improper spacing around parenthesis caught by checkpatch.pl. - Mix of space and tabs in tcp_word_hdr union. Signed-off-by: Danilo Carvalho <doak@google.com> Link: https://lore.kernel.org/r/20210108222104.2079472-1-doak@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11net: bareudp: simplify error paths calling dellinkJakub Kicinski
bareudp_dellink() only needs the device list to hand it to unregister_netdevice_queue(). We can pass NULL in, and unregister_netdevice_queue() will do the unregistering. There is no chance for batching on the error path, anyway. Suggested-by: Cong Wang <xiyou.wangcong@gmail.com> Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com> Link: https://lore.kernel.org/r/20210111052922.2145003-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11Merge branch 'r8169-improve-pll-power-down-handling'Jakub Kicinski
Heiner Kallweit says: ==================== r8169: improve PLL power-down handling This series includes improvements to handling of PLL power-down. ==================== Link: https://lore.kernel.org/r/1608dfa3-c4a5-0e92-31f7-76674b3c173a@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11r8169: clean up rtl_pll_power_down/up functionsHeiner Kallweit
Clean up the remainings of rtl_pll_power_down/up and rename rtl_pll_power_down() to rtl_prepare_power_down(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11r8169: improve handling D3 PLL power-downHeiner Kallweit
Realtek provided a description of bits 6 and 7 in register PMCH. They configure whether the chip powers down certain PLL in D3hot and D3cold respectively. They do not actually power down the PLL. Reflect this in the code and configure D3 PLL powerdown based on whether WOL is enabled. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11r8169: enable PLL power-down for chip versions 34, 35, 36, 42Heiner Kallweit
There's no known reason why PLL powerdown on D3 shouldn't be enabled on chip versions 34, 35, 36, and 42. At least the vendor driver doesn't exclude any of these chip versions. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11r8169: make use of the unaligned access helpersHeiner Kallweit
Instead of open-coding unaligned access let's use the predefined unaligned access helpers. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/cfaf9176-e4f9-c32d-4d4d-e8fb52009f35@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11Merge branch 'r8169-improve-jumbo-configuration'Jakub Kicinski
Heiner Kallweit says: ==================== r8169: improve jumbo configuration Small improvements to jumbo configuration. ==================== Link: https://lore.kernel.org/r/1dd337a0-ff5a-3fa0-91f5-45e86c0fce58@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11r8169: tweak max read request size for newer chips also in jumbo mtu modeHeiner Kallweit
So far we don't increase the max read request size if we switch to jumbo mode before bringing up the interface for the first time. Let's change this. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11r8169: align RTL8168e jumbo pcie read request size with vendor driverHeiner Kallweit
Align behavior with r8168 vendor driver and don't reduce max read request size for RTL8168e in jumbo mode. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11net: marvell: prestera: Correct typoFlorian Fainelli
The function was incorrectly named with a trailing 'r' at the end of prestera. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20210109050622.8081-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11net: phy: at803x: use phy_modify_mmd()Russell King
Convert at803x_clk_out_config() to use phy_modify_mmd(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/E1kyc72-0008Pq-1x@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11net: sfp: extend bitrate-derived mode for 2500BASE-XRussell King
Extend the bitrate-derived support to include 2500BASE-X for modules that report a bitrate of 2500Mbaud. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/E1kyYQf-0004iY-Gh@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11net: sfp: cope with SFPs that set both LOS normal and LOS invertedRussell King
The SFP MSA defines two option bits in byte 65 to indicate how the Rx_LOS signal on SFP pin 8 behaves: bit 2 - Loss of Signal implemented, signal inverted from standard definition in SFP MSA (often called "Signal Detect"). bit 1 - Loss of Signal implemented, signal as defined in SFP MSA (often called "Rx_LOS"). Clearly, setting both bits results in a meaningless situation: it would mean that LOS is implemented in both the normal sense (1 = signal loss) and inverted sense (0 = signal loss). Unfortunately, there are modules out there which set both bits, which will be initially interpret as "inverted" sense, and then, if the LOS signal changes state, we will toggle between LINK_UP and WAIT_LOS states. Change our LOS handling to give well defined behaviour: only interpret these bits as meaningful if exactly one is set, otherwise treat it as if LOS is not implemented. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/E1kyYQa-0004iR-CU@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11net: dsa: felix: the switch does not support DMAVladimir Oltean
The code that sets the DMA mask to 64 bits is bogus, it is taken from the enetc driver together with the rest of the PCI probing boilerplate. Since this patch is touching the error path to delete err_dma, let's also change the err_alloc_felix label which was incorrect. The kzalloc failure does not need a kfree, but it doesn't hurt either, since kfree works with NULL pointers. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20210109203415.2120142-1-olteanv@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11Merge branch 'get-rid-of-the-switchdev-transactional-model'Jakub Kicinski
Vladimir Oltean says: ==================== Get rid of the switchdev transactional model Changes in v4: - Fixed build error in dsa_loop and build warning in hellcreek driver. - Scheduling the mlxsw SPAN work item regardless of the VLAN add return code, as per Ido's and Petr's request. Changes in v3: - Resolved a build warning in mv88e6xxx and tested that it actually works properly, which resulted in an extra patch (02/11). - Addressed Ido's minor feedback in commit 10/11 relating to a comment. Changes in v2: - Got rid of the vid_begin -> vid_end range too from the switchdev API. - Actually propagating errors from DSA MDB and VLAN notifiers. This series comes after the late realization that the prepare/commit separation imposed by switchdev does not help literally anybody: https://patchwork.kernel.org/project/netdevbpf/patch/20201212203901.351331-1-vladimir.oltean@nxp.com/ We should kill it before it inflicts even more damage to the error handling logic in drivers. Also remove the unused VLAN ranges feature from the switchdev VLAN objects, which simplifies all drivers by quite a bit. ==================== Link: https://lore.kernel.org/r/20210109000156.1246735-1-olteanv@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11net: switchdev: delete the transaction objectVladimir Oltean
Now that all users of struct switchdev_trans have been modified to do without it, we can remove this structure and the two helpers to determine the phase. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11mlxsw: spectrum_switchdev: remove transactional logic for VLAN objectsVladimir Oltean
As of commit 457e20d65924 ("mlxsw: spectrum_switchdev: Avoid returning errors in commit phase"), the mlxsw driver performs the VLAN object offloading during the prepare phase. So conversion just seems to be a matter of removing the code that was running in the commit phase. Ido Schimmel explains that the reason why mlxsw_sp_span_respin is called unconditionally is because the bridge driver will ignore -EOPNOTSUPP and actually add the VLAN on the bridge device - see commit 9c86ce2c1ae3 ("net: bridge: Notify about bridge VLANs") and commit ea4721751977 ("mlxsw: spectrum_switchdev: Ignore bridge VLAN events"). Since the VLAN was successfully added on the bridge device, mlxsw_sp_span_respin_work() should be able to resolve the egress port for a packet that is mirrored to a gre tap and passes through the bridge device. Therefore keep the logic as it is. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>