- 31 May, 2024 17 commits
-
-
Serge Semin authored
First of all the flags are never set by any of the driver parts. If nobody have them set then the respective statements will always have the same result. Thus the statements can be simplified or even dropped with no risk to break things. Secondly shall any of the TBI or RTBI flag is set the MDIO-bus registration will be bypassed. Why? It really seems weird. It's perfectly fine to have a TBI/RTBI-capable PHY configured over the MDIO bus interface. Based on the notes above the TBI/RTBI PCS flags can be freely dropped thus simplifying the driver code. Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Link: https://lore.kernel.org/r/E1sCErK-00EOPf-EP@rmk-PC.armlinux.org.ukSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Hangbin Liu authored
There are too many ifdef in IPv6 segment routing code that may cause logic problems. like commit 160e9d27 ("ipv6: sr: fix invalid unregister error path"). To avoid this, the init functions are redefined for both cases. The code could be more clear after all fidefs are removed. Suggested-by: Simon Horman <horms@kernel.org> Suggested-by: David Ahern <dsahern@kernel.org> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Reviewed-by: Sabrina Dubroca <sd@queasysnail.net> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20240529040908.3472952-1-liuhangbin@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
A comment in define_trace.h clearly states: TRACE_INCLUDE_PATH if the path is something other than core kernel vvvvvvvvvvvvvv include/trace then this macro can define the path to use. Note, the path is relative to define_trace.h, not the file including it. Full path names ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ for out of tree modules must be used. fjes uses path relative to itself. Which (somehow) works most of the time. Except when the kernel tree is "nested" in another kernel tree, and ../drivers/net/fjes actually exists. In which case build will use the header file from the wrong directory. I've been trying to figure out why net NIPA builder is constantly failing for the last 5 days, with: include/trace/../../../drivers/net/fjes/fjes_trace.h:88:17: error: ‘__assign_str’ undeclared (first use in this function) 88 | __assign_str(err, err); | ^~~~~~~~~~~~ when the line in the tree clearly has only one "err". NIPA does indeed have "nested" trees, because it uses git work-trees and the tree on the "outside" is not very up to date. Link: https://lore.kernel.org/r/20240529023322.3467755-1-kuba@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Shannon Nelson says: ==================== ionic: updates for v6.11 These are a few minor fixes for the ionic driver to clean up a some little things that have been waiting for attention. These were originally sent for net, but now respun for net-next. v1: https://lore.kernel.org/netdev/20240521013715.12098-1-shannon.nelson@amd.com/ ==================== Link: https://lore.kernel.org/r/20240529000259.25775-1-shannon.nelson@amd.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Shannon Nelson authored
All the changes here are whitespace and comments, no code or definitions changed. Not all issues were addressed, but it is much better than it was. Mostly fixed was a lot of "Excess union member" and ''rsvd' not described' warnings. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://lore.kernel.org/r/20240529000259.25775-8-shannon.nelson@amd.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Shannon Nelson authored
We don't want to try to sync more length than might be in the first frag of an Rx skb, so make sure to use the frag_len rather than the full len. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://lore.kernel.org/r/20240529000259.25775-7-shannon.nelson@amd.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Brett Creeley authored
There is no reason not to use netdev_name() in these places, so do just as the title states. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://lore.kernel.org/r/20240529000259.25775-6-shannon.nelson@amd.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Brett Creeley authored
As the title states, mark unlikely error paths in the data path as unlikely. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://lore.kernel.org/r/20240529000259.25775-5-shannon.nelson@amd.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Brett Creeley authored
Pass the ionic_txq_desc instead of re-referencing it from the q->txq array since the caller to ionic_tx_tso_post will always have the current ionic_txq_desc pointer already. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://lore.kernel.org/r/20240529000259.25775-4-shannon.nelson@amd.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Shannon Nelson authored
Recovery from broken states can be hard. If the LIF reset in the fw_down path didn't work because the PCI link was broken, the FW won't be in the right state for proper restart. We can fire another LIF reset in the fw_up path to be sure things are clean on restart. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://lore.kernel.org/r/20240529000259.25775-3-shannon.nelson@amd.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Shannon Nelson authored
Address a warning about potential string truncation based on the string buffer sizes. We can add some hints to the string format specifier to set limits on the resulting possible string to squelch the complaints. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://lore.kernel.org/r/20240529000259.25775-2-shannon.nelson@amd.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Arnd Bergmann authored
Each object file contains information about which module it gets linked into, so linking the same file into multiple modules now causes a warning: scripts/Makefile.build:254: drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_cmd.o is added to multiple modules: hclge hclgevf scripts/Makefile.build:254: drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_rss.o is added to multiple modules: hclge hclgevf scripts/Makefile.build:254: drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_tqp_stats.o is added to multiple modules: hclge hclgevf Change the way that hns3 is built by moving the three common files into a separate module with exported symbols instead. Fixes: 5f20be4e ("net: hns3: refactor hns3 makefile to support hns3_common module") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20240528161603.2443125-1-arnd@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Arnd Bergmann authored
Each object file contains information about which module it gets linked into, so linking the same file into multiple modules now causes a warning: scripts/Makefile.build:254: drivers/net/ethernet/marvell/octeontx2/nic/Makefile: otx2_devlink.o is added to multiple modules: rvu_nicpf rvu_nicvf Change the way that octeontx2 ethernet is built by moving the common file into a separate module with exported symbols instead. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20240528152527.2148092-1-arnd@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Joe Damato says: ==================== mlx4: Add support for netdev-genl API There are no functional changes from v5, which I mistakenly sent right after net-next was closed (oops). This revision, however, includes Tariq's Reviewed-by tags of the v5 in each commit message. See the changelog below. This series adds support to mlx4 for the netdev-genl API which makes it much easier for users and user programs to map NAPI IDs back to ifindexes, queues, and IRQs. This is extremely useful for a number of use cases, including epoll-based busy poll. In addition, this series includes a patch to generate per-queue statistics using the netlink API, as well. To facilitate the stats, patch 1/3 adds a field "alloc_fail" to the ring structure. This is incremented by the driver in an appropriate place and used in patch 3/3 as alloc_fail. Please note: I do not have access to mlx4 hardware, but I've been working closely with Martin Karsten from University of Waterloo (CC'd) who has very graciously tested my patches on their mlx4 hardware (hence his Tested-by attribution in each commit). His latest research work is particularly interesting [1] and this series helps to support that (and future) work. Martin re-test v4 using Jakub's suggested tool [2] and the stats.pkt_byte_sum and stats.qstat_by_ifindex tests passed. He also adjusted the queue count and re-ran test to confirm it still passed even if the queue count was modified. [1]: https://dl.acm.org/doi/pdf/10.1145/3626780 [2]: https://lore.kernel.org/lkml/20240423175718.4ad4dc5a@kernel.org/ ==================== Link: https://lore.kernel.org/r/20240528181139.515070-1-jdamato@fastly.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Joe Damato authored
Make mlx4 compatible with the newly added netlink queue stats API. Signed-off-by: Joe Damato <jdamato@fastly.com> Tested-by: Martin Karsten <mkarsten@uwaterloo.ca> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20240528181139.515070-4-jdamato@fastly.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Joe Damato authored
Make mlx4 compatible with the newly added netlink queue GET APIs. Signed-off-by: Joe Damato <jdamato@fastly.com> Tested-by: Martin Karsten <mkarsten@uwaterloo.ca> Acked-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20240528181139.515070-3-jdamato@fastly.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Joe Damato authored
mlx4_en_alloc_frags currently returns -ENOMEM when mlx4_alloc_page fails but does not increment a stat field when this occurs. A new field called alloc_fail has been added to struct mlx4_en_rx_ring which is now incremented in mlx4_en_rx_ring when -ENOMEM occurs. Signed-off-by: Joe Damato <jdamato@fastly.com> Tested-by: Martin Karsten <mkarsten@uwaterloo.ca> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20240528181139.515070-2-jdamato@fastly.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
- 30 May, 2024 23 commits
-
-
Paolo Abeni authored
MD Danish Anwar says: ==================== Introduce switch mode support for ICSSG driver This series adds support for switch-mode for ICSSG driver. This series also introduces helper APIs to configure firmware maintained FDB (Forwarding Database) and VLAN tables. These APIs are later used by ICSSG driver in switch mode. Now the driver will boot by default in dual EMAC mode. When first ICSSG interface is added to bridge driver will still be in EMAC mode. As soon as second ICSSG interface is added to same bridge, switch-mode will be enabled and switch firmwares will be loaded to PRU cores. The driver will remain in dual EMAC mode if ICSSG interfaces are added to two different bridges or if two different interfaces (One ICSSG, one other) is added to the same bridge. We'll only enable is_switch_mode flag when two ICSSG interfaces are added to same bridge. We start in dual MAC mode. Let's say lan0 and lan1 are ICSSG interfaces ip link add name br0 type bridge ip link set lan0 master br0 At this point, we get a CHANGEUPPER event. Only one port is a member of the bridge, so we will still be in dual MAC mode. ip link set lan1 master br0 We get a second CHANGEUPPER event, the second interface lan1 is also ICSSG interface so we will set the is_switch_mode flag and when interfaces are brought up again, ICSSG switch firmwares will be loaded to PRU Cores. There are some other cases to consider as well. ip link add name br0 type bridge ip link add name br1 type bridge ip link set lan0 master br0 ip link set ppp0 master br0 Here we are adding lan0 (ICSSG) and ppp0 (non ICSSG) to same bridge, as they both are not ICSSG, we will still be running in dual EMAC mode. ip link set lan1 master br1 ip link set vpn0 master br1 Here we are adding lan1 (ICSSG) and vpn0 (non ICSSG) to same bridge, as they both are not ICSSG, we will still be running in dual EMAC mode. This is v6 of the series. Changes from v5 to v6: *) Removed __packed from structures in icssg_config.h file. *) Added RB tags of Andrew Lunn <andrew@lunn.ch> to patch 2/3 and patch 3/3 of this series. Changes from v4 to v5: *) Rebased on 6.10-rc1. *) Dropped the RFC tag. Changes from v3 to v4: *) Added RFC tag as net-next is closed now. *) Modified the driver to remove the need of bringing interfaces up / down for enabling / disabling switch mode. Now switch mode can be enabled without bringig interfaces up / down as requested by Andrew Lunn <andrew@lunn.ch> *) Modified commit message of patch 3/3. Changes from v2 to v3: *) Dropped RFC tag. *) Used ether_addr_copy() instead of manually copying mac address using for loop in patch 1/3 as suggested by Andrew Lunn <andrew@lunn.ch> *) Added helper API icssg_fdb_setup() in patch 1/3 to reduce code duplication as suggested by Andrew Lunn <andrew@lunn.ch> *) In prueth_switchdev_stp_state_set() removed BR_STATE_LEARNING as learning without forwarding is not supported by ICSSG firmware. *) Used ether_addr_equal() wherever possible in patch 2/3 as suggested by Andrew Lunn <andrew@lunn.ch> *) Fixed typo "nit: s/prueth_switchdevice_nb/prueth_switchdev_nb/" in patch 2/3 as suggested by Simon Horman <horms@kernel.org> *) Squashed "#include "icssg_mii_rt.h" to patch 2/3 from patch 3/3 as suggested by Simon Horman <horms@kernel.org> *) Rebased on latest net-next/main. Changes from v1 to v2: *) Removed TAPRIO support patch from this series. *) Stopped using devlink for enabling switch-mode as suggested by Andrew L *) Added read_poll_timeout() in patch 1 / 3 as suggested by Andrew L. v1 https://lore.kernel.org/all/20230830110847.1219515-4-danishanwar@ti.com/ v2 https://lore.kernel.org/all/20240118071005.1514498-1-danishanwar@ti.com/ v3 https://lore.kernel.org/all/20240327114054.1907278-1-danishanwar@ti.com/ v4 https://lore.kernel.org/all/20240515060320.2783244-1-danishanwar@ti.com/ v5 https://lore.kernel.org/all/20240527052738.152821-1-danishanwar@ti.com/ Thanks and Regards, Md Danish Anwar ==================== Link: https://lore.kernel.org/r/20240528113734.379422-1-danishanwar@ti.comSigned-off-by: Paolo Abeni <pabeni@redhat.com>
-
MD Danish Anwar authored
Add support for ICSSG switch firmware using existing Dual EMAC driver with switchdev. Limitations: VLAN offloading is limited to 0-256 IDs. MDB/FDB static entries are limited to 511 entries and different FDBs can hash to same bucket and thus may not completely offloaded Example assuming ETH1 and ETH2 as ICSSG2 interfaces: Switch to ICSSG Switch mode: ip link add name br0 type bridge ip link set dev eth1 master br0 ip link set dev eth2 master br0 ip link set dev br0 up bridge vlan add dev br0 vid 1 pvid untagged self Going back to Dual EMAC mode: ip link set dev br0 down ip link set dev eth1 nomaster ip link set dev eth2 nomaster ip link del name br0 type bridge By default, Dual EMAC firmware is loaded, and can be changed to switch mode by above steps Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-
MD Danish Anwar authored
ICSSG can operating in switch mode with 2 ext port and 1 host port with VLAN/FDB/MDB and STP offloading. Add switchdev based driver to support the same. Driver itself will be integrated with icssg_prueth in future commits Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-
MD Danish Anwar authored
Introduce helper functions to configure firmware FDB tables, VLAN tables and Port VLAN ID settings to aid adding Switch mode support. Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-
Thorsten Blum authored
Remove commented out code Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Link: https://lore.kernel.org/r/20240528160036.404946-2-thorsten.blum@toblux.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Russell King (Oracle) authored
Convert felix to provide its own phylink MAC operations, thus avoiding the shim layer in DSA's port.c. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/r/E1sByYA-00EM0y-Jn@rmk-PC.armlinux.org.ukSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Russell King (Oracle) authored
No DSA driver makes use of the mac_prepare()/mac_finish() shimmed operations anymore, so we can remove these. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/E1sByNx-00ELW1-Vp@rmk-PC.armlinux.org.ukSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Donald Hunter says: ==================== doc: netlink: Fixes for ynl doc generator Several fixes to ynl-gen-rst to resolve issues that can be seen in: https://docs.kernel.org/6.10-rc1/networking/netlink_spec/dpll.html#device-id-get https://docs.kernel.org/6.10-rc1/networking/netlink_spec/dpll.html#lock-status In patch 2, by not using 'sanitize' for op docs, any formatting in the .yaml gets passed straight through to the generated .rst which means that basic rst (also markdown compatible) list formatting can be used in the .yaml ==================== Link: https://lore.kernel.org/r/20240528140652.9445-1-donald.hunter@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Donald Hunter authored
The generated .rst has pre and post headings without any values, e.g. here: https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#device-id-get Emit keys and values in the generated .rst Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20240528140652.9445-5-donald.hunter@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Donald Hunter authored
Generate op flags as an inline list instead of a stringified python value. Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20240528140652.9445-4-donald.hunter@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Donald Hunter authored
The doc strings for do/dump ops are emitted as toplevel .rst constructs so they can be multi-line. Pass multi-line text straight through to the .rst to retain any simple formatting from the .yaml This fixes e.g. list formatting for the pin-get docs in dpll.yaml: https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#pin-getSigned-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20240528140652.9445-3-donald.hunter@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Donald Hunter authored
Fix the newline replacement in ynl-gen-rst.py to put spaces between concatenated lines. This fixes the broken doc string formatting. See the dpll docs for an example of broken concatenation: https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#lock-statusSigned-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20240528140652.9445-2-donald.hunter@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Alexander Sverdlin says: ==================== net: ethernet: ti: am65-cpsw-nuss: support stacked switches Currently an external Ethernet switch connected to a am65-cpsw-nuss CPU port will not be probed successfully because of_find_net_device_by_node() will not be able to find the netdev of the CPU port. It's necessary to populate of_node of the struct device for the am65-cpsw-nuss ports. DT nodes of the ports are already stored in per-port private data, but because of some legacy reasons the naming ("phy_node") was misleading. ==================== Link: https://lore.kernel.org/r/20240528075954.3608118-1-alexander.sverdlin@siemens.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alexander Sverdlin authored
So that of_find_net_device_by_node() can find cpsw-nuss ports and other DSA switches can be stacked downstream. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Link: https://lore.kernel.org/r/20240528075954.3608118-3-alexander.sverdlin@siemens.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alexander Sverdlin authored
Rename phy_node to port_np to better reflect what it actually is, because the new phylink API takes netdev node (or DSA port node), and resolves the phandle internally. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Link: https://lore.kernel.org/r/20240528075954.3608118-2-alexander.sverdlin@siemens.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Eric Dumazet says: ==================== tcp: fix tcp_poll() races Flakes in packetdrill tests stressing epoll_wait() were root caused to bad ordering in tcp_write_err() Precisely, we have to call sk_error_report() after tcp_done(). When fixing this issue, we discovered tcp_abort(), tcp_v4_err() and tcp_v6_err() had similar issues. Since tcp_reset() has the correct ordering, first patch takes part of it and creates tcp_done_with_error() helper. ==================== Link: https://lore.kernel.org/r/20240528125253.1966136-1-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Eric Dumazet authored
These functions have races when they: 1) Write sk->sk_err 2) call sk_error_report(sk) 3) call tcp_done(sk) As described in prior patches in this series: An smp_wmb() is missing. We should call tcp_done() before sk_error_report(sk) to have consistent tcp_poll() results on SMP hosts. Use tcp_done_with_error() where we centralized the correct sequence. Fixes: 1da177e4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Link: https://lore.kernel.org/r/20240528125253.1966136-5-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Eric Dumazet authored
tcp_abort() has the same issue than the one fixed in the prior patch in tcp_write_err(). In order to get consistent results from tcp_poll(), we must call sk_error_report() after tcp_done(). We can use tcp_done_with_error() to centralize this logic. Fixes: c1e64e29 ("net: diag: Support destroying TCP sockets.") Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Link: https://lore.kernel.org/r/20240528125253.1966136-4-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Eric Dumazet authored
I noticed flakes in a packetdrill test, expecting an epoll_wait() to return EPOLLERR | EPOLLHUP on a failed connect() attempt, after multiple SYN retransmits. It sometimes return EPOLLERR only. The issue is that tcp_write_err(): 1) writes an error in sk->sk_err, 2) calls sk_error_report(), 3) then calls tcp_done(). tcp_done() is writing SHUTDOWN_MASK into sk->sk_shutdown, among other things. Problem is that the awaken user thread (from 2) sk_error_report()) might call tcp_poll() before tcp_done() has written sk->sk_shutdown. tcp_poll() only sees a non zero sk->sk_err and returns EPOLLERR. This patch fixes the issue by making sure to call sk_error_report() after tcp_done(). tcp_write_err() also lacks an smp_wmb(). We can reuse tcp_done_with_error() to factor out the details, as Neal suggested. Fixes: 1da177e4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Link: https://lore.kernel.org/r/20240528125253.1966136-3-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Eric Dumazet authored
tcp_reset() ends with a sequence that is carefuly ordered. We need to fix [e]poll bugs in the following patches, it makes sense to use a common helper. Suggested-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Link: https://lore.kernel.org/r/20240528125253.1966136-2-edumazet@google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Breno Leitao authored
If a user provides an invalid netconsole configuration during boot time (e.g., specifying an invalid ethX interface), netconsole will be entirely disabled. Consequently, the user won't be able to create new entries in /sys/kernel/config/netconsole/ as that directory does not exist. Apart from misconfiguration, another issue arises when ethX is loaded as a module and the netconsole= line in the command line points to ethX, resulting in an obvious failure. This renders netconsole unusable, as /sys/kernel/config/netconsole/ will never appear. This is more annoying since users reconfigure (or just toggle) the configuratin later (see commit 5fbd6cdb ("netconsole: Attach cmdline target to dynamic target")) Create /sys/kernel/config/netconsole/ even if the command line arguments are invalid, so, users can create dynamic entries in netconsole. Reported-by: Aijay Adams <aijay@meta.com> Signed-off-by: Breno Leitao <leitao@debian.org> Link: https://lore.kernel.org/r/20240528084225.3215853-1-leitao@debian.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jonas Karlman authored
Schema validation using rockchip,rk3308-gmac compatible fails with: ethernet@ff4e0000: compatible: ['rockchip,rk3308-gmac'] does not contain items matching the given schema from schema $id: http://devicetree.org/schemas/net/rockchip-dwmac.yaml# ethernet@ff4e0000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts', 'phy-mode', 'reg', 'reset-names', 'resets', 'snps,reset-active-low', 'snps,reset-delays-us', 'snps,reset-gpio' were unexpected) from schema $id: http://devicetree.org/schemas/net/rockchip-dwmac.yaml# Add rockchip,rk3308-gmac to snps,dwmac.yaml to fix DT schema validation. Fixes: 2cc8c910 ("dt-bindings: net: rockchip-dwmac: add rk3308 gmac compatible") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240528093751.3690231-1-jonas@kwiboo.seSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alexander Sverdlin authored
Both LAN9303 and LAN9354 have internal PHYs on both external ports. Therefore a configuration without SMSC PHY support is non-practical at least and leads to: LAN9303_MDIO 8000f00.mdio:00: Found LAN9303 rev. 1 mdio_bus 8000f00.mdio:00: deferred probe pending: (reason unknown) Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20240528073147.3604083-1-alexander.sverdlin@siemens.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-