aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-08net: dsa: tag_dsa: Fix tx from VLAN uppers on non-filtering bridgesTobias Waldekranz1-3/+12
In this situation (VLAN filtering disabled on br0): br0.10 / br0 / \ swp0 swp1 When a frame is transmitted from the VLAN upper, the bridge will send it down to one of the switch ports with forward offloading enabled. This will cause tag_dsa to generate a FORWARD tag. Before this change, that tag would have it's VID set to 10, even though VID 10 is not loaded in the VTU. Before the blamed commit, the frame would trigger a VTU miss and be forwarded according to the PVT configuration. Now that all fabric ports are in 802.1Q secure mode, the frame is dropped instead. Therefore, restrict the condition under which we rewrite an 802.1Q tag to a DSA tag. On standalone port's, reuse is always safe since we will always generate FROM_CPU tags in that case. For bridged ports though, we must ensure that VLAN filtering is enabled, which in turn guarantees that the VID in question is loaded into the VTU. Fixes: d352b20f4174 ("net: dsa: mv88e6xxx: Improve multichip isolation of standalone ports") Signed-off-by: Tobias Waldekranz <[email protected]> Tested-by: Andrew Lunn <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
2022-03-08net: lan966x: allow offloading timestamp operations to the PHYHoratiu Vultur1-1/+3
In case the MAC is using 'netif_rx()' to deliver the skb up the network stack, it needs to check whether 'skb_defer_rx_timestmap()' is necessary or not. In case is needed then don't call 'netif_rx()' Signed-off-by: Horatiu Vultur <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
2022-03-08net: mdio-mux: add bus name to bus idHeiner Kallweit1-2/+2
In case of DT-configured systems it may be hard to identify the PHY interrupt in the /proc/interrupts output. Therefore add the name to the id to make clearer that it's about a device on a muxed mdio bus. In my case: Now: mdio_mux-0.e40908ff:08 Before: 0.e40908ff:08 Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
2022-03-07net: cxgb3: Fix an error code when probing the driverZheyu Ma1-0/+1
During the process of driver probing, probe function should return < 0 for failure, otherwise kernel will treat value >= 0 as success. Therefore, the driver should set 'err' to -ENODEV when 'adapter->registered_device_map' is NULL. Otherwise kernel will assume that the driver has been successfully probed and will cause unexpected errors. Signed-off-by: Zheyu Ma <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2022-03-07ice: xsk: fix GCC version checking against pragma unroll presenceMaciej Fijalkowski1-1/+1
Pragma unroll was introduced around GCC 8, whereas current xsk code in ice that prepares loop_unrolled_for macro that is based on mentioned pragma, compares GCC version against 4, which is wrong and Stephen found this out by compiling kernel with GCC 5.4 [0]. Fix this mistake and check if GCC version is >= 8. [0]: https://lore.kernel.org/netdev/[email protected]/ Fixes: 126cdfe1007a ("ice: xsk: Improve AF_XDP ZC Tx and use batching API") Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Maciej Fijalkowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2022-03-07vxlan_core: delete unnecessary conditionDan Carpenter1-28/+26
The previous check handled the "if (!nh)" condition so we know "nh" is non-NULL here. Delete the check and pull the code in one tab. Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Nikolay Aleksandrov <[email protected]> Reviewed-by: Roopa Prabhu <[email protected]> Link: https://lore.kernel.org/r/20220307125735.GC16710@kili Signed-off-by: Jakub Kicinski <[email protected]>
2022-03-07ptp: ocp: off by in in ptp_ocp_tod_gnss_name()Dan Carpenter1-1/+1
The > ARRAY_SIZE() needs to be >= ARRAY_SIZE() to prevent an out of bounds access. Fixes: 9f492c4cb235 ("ptp: ocp: add TOD debug information") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Richard Cochran <[email protected]> Acked-by: Jonathan Lemon <[email protected]> Link: https://lore.kernel.org/r/20220307141318.GA18867@kili Signed-off-by: Jakub Kicinski <[email protected]>
2022-03-07net: rtnetlink: fix error handling in rtnl_fill_statsinfo()Tom Rix1-1/+1
The clang static analyzer reports this issue rtnetlink.c:5481:2: warning: Undefined or garbage value returned to caller return err; ^~~~~~~~~~ There is a function level err variable, in the list_for_each_entry_rcu block there is a shadow err. Remove the shadow. In the same block, the call to nla_nest_start_noflag() can fail without setting an err. Set the err to -EMSGSIZE. Fixes: 216e690631f5 ("net: rtnetlink: rtnl_fill_statsinfo(): Permit non-EMSGSIZE error returns") Signed-off-by: Tom Rix <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Reviewed-by: Petr Machata <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07net: dsa: return success if there was nothing to doTom Rix1-2/+2
Clang static analysis reports this representative issue dsa.c:486:2: warning: Undefined or garbage value returned to caller return err; ^~~~~~~~~~ err is only set in the loop. If the loop is empty, garbage will be returned. So initialize err to 0 to handle this noop case. Signed-off-by: Tom Rix <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07selftests: net: fix array_size.cocci warningGuo Zhengkui1-1/+1
Fit the following coccicheck warning: tools/testing/selftests/net/reuseport_bpf_numa.c:89:28-29: WARNING: Use ARRAY_SIZE. It has been tested with gcc (Debian 8.3.0-6) 8.3.0 on x86_64. Signed-off-by: Guo Zhengkui <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07nfp: xsk: avoid newline at the end of message in NL_SET_ERR_MSG_MODGuo Zhengkui1-1/+1
Fix the following coccicheck warning: drivers/net/ethernet/netronome/nfp/nfp_net_common.c:3434:8-48: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD Signed-off-by: Guo Zhengkui <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07net/smc: fix compile warning for smc_sysctlDust Li4-31/+15
kernel test robot reports multiple warning for smc_sysctl: In file included from net/smc/smc_sysctl.c:17: >> net/smc/smc_sysctl.h:23:5: warning: no previous prototype \ for function 'smc_sysctl_init' [-Wmissing-prototypes] int smc_sysctl_init(void) ^ and >> WARNING: modpost: vmlinux.o(.text+0x12ced2d): Section mismatch \ in reference from the function smc_sysctl_exit() to the variable .init.data:smc_sysctl_ops The function smc_sysctl_exit() references the variable __initdata smc_sysctl_ops. This is often because smc_sysctl_exit lacks a __initdata annotation or the annotation of smc_sysctl_ops is wrong. and net/smc/smc_sysctl.c: In function 'smc_sysctl_init_net': net/smc/smc_sysctl.c:47:17: error: 'struct netns_smc' has no member named 'smc_hdr' 47 | net->smc.smc_hdr = register_net_sysctl(net, "net/smc", table); Since we don't need global sysctl initialization. To make things clean and simple, remove the global pernet_operations and smc_sysctl_{init|exit}. Call smc_sysctl_net_{init|exit} directly from smc_net_{init|exit}. Also initialized sysctl_autocorking_size if CONFIG_SYSCTL it not set, this make sure SMC autocorking is enabled by default if CONFIG_SYSCTL is not set. Fixes: 462791bbfa35 ("net/smc: add sysctl interface for SMC") Reported-by: kernel test robot <[email protected]> Signed-off-by: Dust Li <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: David S. Miller <[email protected]>
2022-03-07Merge branch 'netif_rx-part3'David S. Miller13-33/+19
Sebastian Andrzej Siewior says: ==================== net: Convert user to netif_rx(), part 3. This is the third and last batch of converting netif_rx_ni() caller to netif_rx(). The change making this possible is net-next and netif_rx_ni() is a wrapper around netif_rx(). This is a clean up in order to remove netif_rx_ni(). The micrel phy driver is patched twice within this series: the first is is to replace netif_rx_ni() and second to move netif_rx() outside of the IRQ-off section. It is probably simpler to keep it within this series. ==================== Signed-off-by: David S. Miller <[email protected]>
2022-03-07net: phy: micrel: Move netif_rx() outside of IRQ-off section.Sebastian Andrzej Siewior1-2/+2
lan8814_match_rx_ts() invokes netif_rx() with disables interrupts outside which will create a warning. Invoking netif_rx_ni() with disabled interrupts is wrong even without the recent rework because netif_rx_ni() would enable interrupts while processing the softirq. This in turn can lead to dead lock if an interrupts triggers and attempts to acquire kszphy_ptp_priv::rx_ts_lock. Move netif_rx() outside the IRQ-off section. Cc: Andrew Lunn <[email protected]> Cc: Heiner Kallweit <[email protected]> Cc: Russell King <[email protected]> Cc: Divya Koppera <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07net: Remove netif_rx_any_context() and netif_rx_ni().Sebastian Andrzej Siewior1-10/+0
Remove netif_rx_any_context and netif_rx_ni() because there are no more users in tree. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07net: phy: micrel: Use netif_rx().Sebastian Andrzej Siewior1-2/+2
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Andrew Lunn <[email protected]> Cc: Heiner Kallweit <[email protected]> Cc: Russell King <[email protected]> Cc: Divya Koppera <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07phonet: Use netif_rx().Sebastian Andrzej Siewior1-4/+4
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Remi Denis-Courmont <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07bluetooth: Use netif_rx().Sebastian Andrzej Siewior2-2/+2
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Marcel Holtmann <[email protected]> Cc: Johan Hedberg <[email protected]> Cc: Luiz Augusto von Dentz <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07batman-adv: Use netif_rx().Sebastian Andrzej Siewior1-1/+1
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Antonio Quartulli <[email protected]> Cc: Marek Lindner <[email protected]> Cc: Simon Wunderlich <[email protected]> Cc: Sven Eckelmann <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Acked-by: Sven Eckelmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07tipc: Use netif_rx().Sebastian Andrzej Siewior1-1/+1
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Jon Maloy <[email protected]> Cc: Ying Xue <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07tun: vxlan: Use netif_rx().Sebastian Andrzej Siewior2-3/+3
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07staging: Use netif_rx().Sebastian Andrzej Siewior2-3/+3
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07s390: net: Use netif_rx().Sebastian Andrzej Siewior2-6/+2
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Alexander Gordeev <[email protected]> Cc: Alexandra Winter <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Wenjia Zhang <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07Merge branch 'ptp-is_sync'David S. Miller4-24/+29
Kurt Kanzenbach says: ==================== ptp: Add generic is_sync() function as multiple PHY drivers such as micrel or TI dp83640 need to inspect whether a given skb represents a PTP Sync message, provide a generic function for it. This avoids code duplication and can be reused by future PHY IEEE 1588 implementations. ==================== Signed-off-by: David S. Miller <[email protected]>
2022-03-07micrel: Use generic ptp_msg_is_sync() functionKurt Kanzenbach1-12/+1
Use generic ptp_msg_is_sync() function to avoid code duplication. Signed-off-by: Kurt Kanzenbach <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07dp83640: Use generic ptp_msg_is_sync() functionKurt Kanzenbach1-12/+1
Use generic ptp_msg_is_sync() function to avoid code duplication. Signed-off-by: Kurt Kanzenbach <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-07ptp: Add generic PTP is_sync() functionKurt Kanzenbach2-0/+27
PHY drivers such as micrel or dp83640 need to analyze whether a given skb is a PTP sync message for one step functionality. In order to avoid code duplication introduce a generic function and move it to ptp classify. Signed-off-by: Kurt Kanzenbach <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06bonding: helper macro __ATTR_RO to make code more clearLianjie Zhang1-7/+1
Signed-off-by: Lianjie Zhang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06Merge branch 'netif_rx-conversions-part2'David S. Miller27-54/+45
Sebastian Andrzej Siewior says: ==================== net: Convert user to netif_rx(), part 2. This is the second batch of converting netif_rx_ni() caller to netif_rx(). The change making this possible is net-next and netif_rx_ni() is a wrapper around netif_rx(). This is a clean up in order to remove netif_rx_ni(). The brcmfmac changes are slilghtly larger because the inirq parameter can be removed. ==================== Signed-off-by: David S. Miller <[email protected]>
2022-03-06wireless: Use netif_rx().Sebastian Andrzej Siewior1-1/+1
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Johannes Berg <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06wireless: Marvell: Use netif_rx().Sebastian Andrzej Siewior3-4/+4
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Amitkumar Karwar <[email protected]> Cc: Ganapathi Bhat <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Sharvari Harisangam <[email protected]> Cc: Xinming Hu <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06wireless: brcmfmac: Use netif_rx().Sebastian Andrzej Siewior7-28/+19
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Arend van Spriel <[email protected]> Cc: Chi-hsien Lin <[email protected]> Cc: Chung-hsien Hsu <[email protected]> Cc: Franky Lin <[email protected]> Cc: Hante Meuleman <[email protected]> Cc: Kalle Valo <[email protected]> Cc: [email protected] Cc: Wright Feng <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06wireless: Atheros: Use netif_rx().Sebastian Andrzej Siewior3-3/+3
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Kalle Valo <[email protected]> Cc: Maya Erez <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06slip/plip: Use netif_rx().Sebastian Andrzej Siewior2-2/+2
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Acked-by: Oliver Hartkopp <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06mctp: serial: Use netif_rx().Sebastian Andrzej Siewior1-1/+1
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Jeremy Kerr <[email protected]> Cc: Matt Johnston <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06can: Use netif_rx().Sebastian Andrzej Siewior7-10/+10
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Marc Kleine-Budde <[email protected]> Cc: Oliver Hartkopp <[email protected]> Cc: Wolfgang Grandegger <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Acked-by: Oliver Hartkopp <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06net: phy: Use netif_rx().Sebastian Andrzej Siewior3-5/+5
Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Andrew Lunn <[email protected]> Cc: Heiner Kallweit <[email protected]> Cc: Radu Pirea <[email protected]> Cc: Richard Cochran <[email protected]> Cc: Russell King <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06Merge branch 'tuntap-kfree_skb_reason'David S. Miller4-18/+96
Dongli Zhang says: ==================== tun/tap: use kfree_skb_reason() to trace dropped skb The commit c504e5c2f964 ("net: skb: introduce kfree_skb_reason()") has introduced the kfree_skb_reason() to help track the reason. The tun and tap are commonly used as virtio-net/vhost-net backend. This is to use kfree_skb_reason() to trace the dropped skb for those two drivers. Changed since v1: - I have renamed many of the reasons since v1. I make them as generic as possible so that they can be re-used by core networking and drivers. Changed since v2: - declare drop_reason as type "enum skb_drop_reason" - handle the drop in skb_list_walk_safe() case for tap driver, and kfree_skb_list_reason() is introduced Changed since v3 (only for PATCH 4/4): - rename to TAP_FILTER and TAP_TXFILTER - honor reverse xmas tree style declaration for 'drop_reason' in tun_net_xmit() Changed since v4: - make kfree_skb_list() static inline - add 'computation' to SKB_CSUM comment - change COPY_DATA to UCOPY_FAULT - add 'metadata' to DEV_HDR comment - expand comment on DEV_READY - change SKB_TRIM to NOMEM - chnage SKB_PULL to HDR_TRUNC Changed since v5: - rebase to net-next The following reasons are introduced. - SKB_DROP_REASON_SKB_CSUM - SKB_DROP_REASON_SKB_GSO_SEG - SKB_DROP_REASON_SKB_UCOPY_FAULT - SKB_DROP_REASON_DEV_HDR - SKB_DROP_REASON_FULL_RING - SKB_DROP_REASON_DEV_READY - SKB_DROP_REASON_NOMEM - SKB_DROP_REASON_HDR_TRUNC - SKB_DROP_REASON_TAP_FILTER - SKB_DROP_REASON_TAP_TXFILTER This is the output for TUN device. <idle>-0 [029] ..s1. 450.727651: kfree_skb: skbaddr=0000000023d235cc protocol=0 location=00000000a6748854 reason: NOT_SPECIFIED <idle>-0 [000] b.s3. 451.165671: kfree_skb: skbaddr=000000006b5de7cc protocol=4 location=000000007c2b9eae reason: FULL_RING <idle>-0 [000] b.s3. 453.149650: kfree_skb: skbaddr=000000006b5de7cc protocol=4 location=000000007c2b9eae reason: FULL_RING <idle>-0 [000] b.s3. 455.133576: kfree_skb: skbaddr=000000006b5de7cc protocol=4 location=000000007c2b9eae reason: FULL_RING <idle>-0 [000] b.s3. 457.117566: kfree_skb: skbaddr=000000006b5de7cc protocol=4 location=000000007c2b9eae reason: FULL_RING This is the output for TAP device. arping-7053 [006] ..s1. 1000.047753: kfree_skb: skbaddr=000000008618a587 protocol=2054 location=00000000743ad4a7 reason: FULL_RING <idle>-0 [022] ..s1. 1000.778514: kfree_skb: skbaddr=000000002c1e706c protocol=0 location=00000000a6748854 reason: NOT_SPECIFIED arping-7053 [006] ..s1. 1001.047830: kfree_skb: skbaddr=000000008618a587 protocol=2054 location=00000000743ad4a7 reason: FULL_RING arping-7053 [006] ..s1. 1002.047918: kfree_skb: skbaddr=000000008618a587 protocol=2054 location=00000000743ad4a7 reason: FULL_RING arping-7053 [006] ..s1. 1003.048017: kfree_skb: skbaddr=000000008618a587 protocol=2054 location=00000000743ad4a7 reason: FULL_RING ==================== Signed-off-by: David S. Miller <[email protected]>
2022-03-06net: tun: track dropped skb via kfree_skb_reason()Dongli Zhang3-9/+51
The TUN can be used as vhost-net backend. E.g, the tun_net_xmit() is the interface to forward the skb from TUN to vhost-net/virtio-net. However, there are many "goto drop" in the TUN driver. Therefore, the kfree_skb_reason() is involved at each "goto drop" to help userspace ftrace/ebpf to track the reason for the loss of packets. The below reasons are introduced: - SKB_DROP_REASON_DEV_READY - SKB_DROP_REASON_NOMEM - SKB_DROP_REASON_HDR_TRUNC - SKB_DROP_REASON_TAP_FILTER - SKB_DROP_REASON_TAP_TXFILTER Cc: Joao Martins <[email protected]> Cc: Joe Jin <[email protected]> Signed-off-by: Dongli Zhang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06net: tun: split run_ebpf_filter() and pskb_trim() into different "if statement"Dongli Zhang1-1/+4
No functional change. Just to split the if statement into different conditions to use kfree_skb_reason() to trace the reason later. Cc: Joao Martins <[email protected]> Cc: Joe Jin <[email protected]> Signed-off-by: Dongli Zhang <[email protected]> Reviewed-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06net: tap: track dropped skb via kfree_skb_reason()Dongli Zhang3-10/+43
The TAP can be used as vhost-net backend. E.g., the tap_handle_frame() is the interface to forward the skb from TAP to vhost-net/virtio-net. However, there are many "goto drop" in the TAP driver. Therefore, the kfree_skb_reason() is involved at each "goto drop" to help userspace ftrace/ebpf to track the reason for the loss of packets. The below reasons are introduced: - SKB_DROP_REASON_SKB_CSUM - SKB_DROP_REASON_SKB_GSO_SEG - SKB_DROP_REASON_SKB_UCOPY_FAULT - SKB_DROP_REASON_DEV_HDR - SKB_DROP_REASON_FULL_RING Cc: Joao Martins <[email protected]> Cc: Joe Jin <[email protected]> Signed-off-by: Dongli Zhang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-06Revert "net/smc: don't req_notify until all CQEs drained"Dust Li1-28/+21
This reverts commit a505cce6f7cfaf2aa2385aab7286063c96444526. Leon says: We already discussed that. SMC should be changed to use RDMA CQ pool API drivers/infiniband/core/cq.c. ib_poll_handler() has much better implementation (tracing, IRQ rescheduling, proper error handling) than this SMC variant. Since we will switch to ib_poll_handler() in the future, revert this patch. Link: https://lore.kernel.org/netdev/[email protected]/ Suggested-by: Leon Romanovsky <[email protected]> Suggested-by: Karsten Graul <[email protected]> Signed-off-by: Dust Li <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-05Merge branch 'bnxt_en-updates'David S. Miller7-74/+367
Michael Chan says: ==================== bnxt_en: Updates. This patch series contains mainly NVRAM related features. More NVRAM error checking and logging are added when installing firmware packages. A new devlink hw health report is now added to report and diagnose NVRAM issues. Other miscellaneous patches include reporting correctly cards that don't support link pause, adding an internal unknown link state, and avoiding unnecessary link toggle during firmware reset. ==================== Signed-off-by: David S. Miller <[email protected]>
2022-03-05bnxt_en: add an nvm test for hw diagnoseVikas Gupta4-18/+113
Add an NVM test function for devlink hw reporter. In this function an NVM VPD area is read followed by a write. Test result is cached and if it is successful then the next test can be conducted only after HW_RETEST_MIN_TIME to avoid frequent writes to the NVM. Reviewed-by: Edwin Peer <[email protected]> Signed-off-by: Vikas Gupta <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-05bnxt_en: implement hw health reporterKalesh AP4-0/+126
This reporter will report NVM errors which are non-fatal. When we receive these NVM error events, we'll report it through this new hw health reporter. Reviewed-by: Edwin Peer <[email protected]> Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-05bnxt_en: Do not destroy health reporters during resetEdwin Peer3-29/+24
Health reporter state should be maintained over resets. Previously reporters were destroyed if the device capabilities changed, but since none of the reporters depend on capabilities anymore, this logic should be removed. Signed-off-by: Edwin Peer <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-05bnxt_en: Eliminate unintended link toggle during FW resetMichael Chan1-3/+1
If the flow control settings have been changed, a subsequent FW reset may cause the ethernet link to toggle unnecessarily. This link toggle will increase the down time by a few seconds. The problem is caused by bnxt_update_phy_setting() detecting a false mismatch in the flow control settings between the stored software settings and the current FW settings after the FW reset. This mismatch is caused by the AUTONEG bit added to link_info->req_flow_ctrl in an inconsistent way in bnxt_set_pauseparam() in autoneg mode. The AUTONEG bit should not be added to link_info->req_flow_ctrl. Reviewed-by: Colin Winegarden <[email protected]> Reviewed-by: Pavan Chebbi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-05bnxt_en: Properly report no pause support on some cardsMichael Chan4-9/+17
Some cards are configured to never support link pause or PFC. Discover these cards and properly report no pause support to ethtool. Disable PFC settings from DCBNL if PFC is unsupported. Reviewed-by: Pavan Chebbi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-05bnxt_en: introduce initial link state of unknownEdwin Peer3-14/+29
This will force link state to always be logged for initial NIC open. Signed-off-by: Edwin Peer <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-03-05bnxt_en: parse result field when NVRAM package install failsKalesh AP1-1/+43
Instead of always returning -ENOPKG, decode the firmware error code further when the HWRM_NVM_INSTALL_UPDATE firmware call fails. Return a more suitable error code to userspace and log an error in dmesg. Reviewed-by: Somnath Kotur <[email protected]> Reviewed-by: Pavan Chebbi <[email protected]> Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>