- 07 2月, 2021 2 次提交
-
-
由 Lorenzo Bianconi 提交于
Align netdevice statistics when the device is running in XDP mode to other upstream drivers. In particular report to user-space rx packets even if they are not forwarded to the networking stack (XDP_PASS) but if they are redirected (XDP_REDIRECT), dropped (XDP_DROP) or sent back using the same interface (XDP_TX). This patch allows the system administrator to verify the device is receiving data correctly. Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/a457cb17dd9c58c116d64ee34c354b2e89c0ff8f.1612375372.git.lorenzo@kernel.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Jiapeng Chong 提交于
Fix the following coccicheck warnings: ./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1651:36-38: WARNING !A || A && B is equivalent to !A || B. Reported-by: NAbaci Robot <abaci@linux.alibaba.com> Signed-off-by: NJiapeng Chong <jiapeng.chong@linux.alibaba.com> Acked-by: NIoana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1612260157-128026-1-git-send-email-jiapeng.chong@linux.alibaba.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 05 2月, 2021 3 次提交
-
-
由 Bhaskar Chowdhury 提交于
s/initialsation/initialisation/ s/specifiing/specifying/ Signed-off-by: NBhaskar Chowdhury <unixbhaskar@gmail.com> Acked-by: NRandy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20210204031648.27300-1-unixbhaskar@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Colin Ian King 提交于
The null check of filp->f_path.dentry->d_iname is redundant because it is an array of DNAME_INLINE_LEN chars and cannot be a null. Fix this by removing the null check. Addresses-Coverity: ("Array compared against 0") Fixes: 04987ca1 ("net: hns3: add debugfs support for tm nodes, priority and qset info") Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NJesse Brandeburg <jesse.brandeburg@intel.com> Link: https://lore.kernel.org/r/20210203131040.21656-1-colin.king@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Alexander Lobakin 提交于
Now we can remove a bunch of identical functions from the drivers and make them use common dev_page_is_reusable(). All {,un}likely() checks are omitted since it's already present in this helper. Also update some comments near the call sites. Suggested-by: NDavid Rientjes <rientjes@google.com> Suggested-by: NJakub Kicinski <kuba@kernel.org> Cc: John Hubbard <jhubbard@nvidia.com> Signed-off-by: NAlexander Lobakin <alobakin@pm.me> Reviewed-by: NJesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 04 2月, 2021 25 次提交
-
-
由 Danielle Ratson 提交于
Currently, when user space queries the link's parameters, as speed and duplex, each parameter is passed from the driver to ethtool. Instead, pass the link mode bit in use. In Spectrum-1, simply pass the bit that is set to '1' from PTYS register. In Spectrum-2, pass the first link mode bit in the mask of the used link mode. Signed-off-by: NDanielle Ratson <danieller@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Danielle Ratson 提交于
Currently, when auto negotiation is set to off, the user can force a specific speed or both speed and duplex. The user cannot influence the number of lanes that will be forced. Add support for setting speed along with lanes so one would be able to choose how many lanes will be forced. When lanes parameter is passed from user space, choose the link mode that its actual width equals to it. Otherwise, the default link mode will be the one that supports the width of the port. Signed-off-by: NDanielle Ratson <danieller@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Danielle Ratson 提交于
Currently, when a speed can be supported by different number of lanes, the supported link modes bitmask contains only link modes with a single number of lanes. This was done in order to prevent auto negotiation on number of lanes after 50G-1-lane and 100G-2-lanes link modes were introduced. For example, if a port's max width is 4, only link modes with 4 lanes will be presented as supported by that port, so 100G is always achieved by 4 lanes of 25G. After the previous patches that allow selection of the number of lanes, auto negotiation on number of lanes becomes practical. Remove that filtering of the maximum number of lanes supported link modes, so indeed all the supported and advertised link modes will be shown. Signed-off-by: NDanielle Ratson <danieller@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
t1_fatal_err() is invoked from the interrupt handler. The bad part is that it invokes (via t1_sge_stop()) del_timer_sync() and tasklet_kill(). Both functions must not be called from an interrupt because it is possible that it will wait for the completion of the timer/tasklet it just interrupted. In case of a fatal error, use t1_interrupts_disable() to disable all interrupt sources and then wake the interrupt thread with F_PL_INTR_SGE_ERR as pending flag. The threaded-interrupt will stop the card via t1_sge_stop() and not re-enable the interrupts again. Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
The external interrupt (F_PL_INTR_EXT) needs to be handled in a process context and this is accomplished by utilizing a workqueue. The process context can also be provided by a threaded interrupt instead of a workqueue. The threaded interrupt can be used later for other interrupt related processing which require non-atomic context without using yet another workqueue. free_irq() also ensures that the thread is done which is currently missing (the worker could continue after the module has been removed). Save pending flags in pending_thread_intr. Use the same mechanism to disable F_PL_INTR_EXT as interrupt source like it is used before the worker is scheduled. Enable the interrupt again once t1_elmer0_ext_intr_handler() is done. Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Srujana Challa 提交于
When FLR is initiated for a VF (PCI function level reset), the parent PF gets a interrupt. PF then sends a message to admin function (AF), which then cleans up all resources attached to that VF. This patch adds support to handle CPT FLR. Signed-off-by: NNarayana Prasad Raju Atherya <pathreya@marvell.com> Signed-off-by: NSuheil Chandran <schandran@marvell.com> Signed-off-by: NSunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: NSrujana Challa <schalla@marvell.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Srujana Challa 提交于
Adds support to display block CPT1 stats at "/sys/kernel/debug/octeontx2/cpt1". Signed-off-by: NMahipal Challa <mchalla@marvell.com> Signed-off-by: NSrujana Challa <schalla@marvell.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Srujana Challa 提交于
This patch changes CPT mailbox message format to support new block CPT1 in 98xx silicon. cpt_rd_wr_reg -> Modify cpt_rd_wr_reg mailbox and its handler to accommodate new block CPT1. cpt_lf_alloc -> Modify cpt_lf_alloc mailbox and its handler to configure LFs from a block address out of multiple blocks of same type. If a PF/VF needs to configure LFs from both the blocks then this mbox should be called twice. Signed-off-by: NMahipal Challa <mchalla@marvell.com> Signed-off-by: NSrujana Challa <schalla@marvell.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Sudip Mukherjee 提交于
The variable 'current_itr' is assigned to 0 before jumping to 'set_itr_now' but it has not been used after the jump. So, remove the unneeded assignment. Signed-off-by: NSudip Mukherjee <sudipm.mukherjee@gmail.com> Reviewed-by: NLukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Kaixu Xia 提交于
Both of the statements are value assignment of the variable act_offset. The first value assignment is overwritten by the second and is useless. Remove it. Reported-by: NTosk Robot <tencent_os_robot@tencent.com> Signed-off-by: NKaixu Xia <kaixuxia@tencent.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Tom Rix 提交于
This change fixes the checkpatch warning described in this commit cbacb5ab ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]") Standard integer promotion is already done and %hx and %hhx is useless so do not encourage the use of %hh[xudi] or %h[xudi]. Signed-off-by: NTom Rix <trix@redhat.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Nick Lowe 提交于
The Intel I211 Ethernet Controller supports 2 Receive Side Scaling (RSS) queues. It should not be excluded from having this feature enabled. Via commit c883de9f ("igb: rename igb define to be more generic") E1000_MRQC_ENABLE_RSS_4Q was renamed to E1000_MRQC_ENABLE_RSS_MQ to indicate that this is a generic bit flag to enable queues and not a flag that is specific to devices that support 4 queues The bit flag enables 2, 4 or 8 queues appropriately depending on the part. Tested with a multicore CPU and frames were then distributed as expected. This issue appears to have been introduced because of confusion caused by the prior name. Signed-off-by: NNick Lowe <nick.lowe@gmail.com> Tested-by: NDavid Switzer <david.switzer@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Gal Hammer 提交于
Fixed a typo which caused the registers dump function to read the RDBAL register when printing TDBAL register values. Signed-off-by: NGal Hammer <ghammer@redhat.com> Tested-by: NDavid Switzer <david.switzer@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Sasha Neftin 提交于
Fixed a typo which caused the registers dump function to read the RDBAL register when printing TDBAL register values. _reg_dump method has been partially derived from i210 and have same typo. Suggested-by: NGal Hammer <ghammer@redhat.com> Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Dan Carpenter 提交于
Probe should return an error code if platform_get_irq_byname() fails but it returns success instead. Fixes: 6c30384e ("net: mscc: ocelot: register devlink ports") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NVladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/r/YBkXyFIl4V9hgxYM@mwandaSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Dan Carpenter 提交于
There are several error handling bugs in mscc_ocelot_init_ports(). I went through the code, and carefully audited it and made fixes and cleanups. 1) The ocelot_probe_port() function didn't have a mirror release function so it was hard to follow. I created the ocelot_release_port() function. 2) In the ocelot_probe_port() function, if the register_netdev() call failed, then it lead to a double free_netdev(dev) bug. Fix this by setting "ocelot->ports[port] = NULL" on the error path. 3) I was concerned that the "port" which comes from of_property_read_u32() might be out of bounds so I added a check for that. 4) In the original code if ocelot_regmap_init() failed then the driver tried to continue but I think that should be a fatal error. 5) If ocelot_probe_port() failed then the most recent devlink was leaked. The fix for mostly came Vladimir Oltean. Get rid of "registered_ports" and just set a bit in "devlink_ports_registered" to say when the devlink port has been registered (and needs to be unregistered on error). There are fewer than 32 ports so a u32 is large enough for this purpose. 6) The error handling if the final ocelot_port_devlink_init() failed had two problems. The "while (port-- >= 0)" loop should have been "--port" pre-op instead of a post-op to avoid a buffer underflow. The "if (!registered_ports[port])" condition was reversed leading to resource leaks and double frees. Fixes: 6c30384e ("net: mscc: ocelot: register devlink ports") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NVladimir Oltean <vladimir.oltean@nxp.com> Tested-by: NVladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/r/YBkXhqRxHtRGzSnJ@mwandaSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Sasha Neftin 提交于
FUNC_1 mask not in use in i225 device and could be removed Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Sasha Neftin 提交于
Local receiver mask SR_1000T_LOCAL_RX_STATUS not in use in i225 device and could be removed Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Sasha Neftin 提交于
Use the strscpy method instead of strlcpy method. See: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr _i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Sasha Neftin 提交于
Extend reporting of NVM image version to include the gPHY (i225 PHY) firmware version. Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Sasha Neftin 提交于
Expose the NVM map version via drvinfo in ethtool NVM image version is reported as firmware version for i225 device Minor typo fix - remove space Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Sasha Neftin 提交于
This counter counts the number of good (non-erred) packets transmitted sent by the host. A good transmit packet is considered one that is 64 or more bytes in length (from <Destination Address> through <CRC>, inclusively) in length Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Sasha Neftin 提交于
Multiple Tx Data Read Requests is hardware pipeline feature and is not controlled by software Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Sasha Neftin 提交于
i225 device not supported and do not plan to support configuration of fw version string for ethtool Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
由 Sasha Neftin 提交于
valid_led_default function pointer not in use and can be removed from nvm_operations structure. Signed-off-by: NSasha Neftin <sasha.neftin@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
-
- 03 2月, 2021 6 次提交
-
-
由 Geert Uytterhoeven 提交于
If CONFIG_M5272=y: drivers/net/ethernet/freescale/fec_main.c: In function ‘fec_restart’: drivers/net/ethernet/freescale/fec_main.c:948:6: warning: unused variable ‘val’ [-Wunused-variable] 948 | u32 val; | ^~~ drivers/net/ethernet/freescale/fec_main.c: In function ‘fec_get_mac’: drivers/net/ethernet/freescale/fec_main.c:1667:28: warning: unused variable ‘pdata’ [-Wunused-variable] 1667 | struct fec_platform_data *pdata = dev_get_platdata(&fep->pdev->dev); | ^~~~~ Fix this by moving the variable declarations inside the existing #ifdef blocks. Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210202130650.865023-1-geert@linux-m68k.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Kai-Heng Feng 提交于
According to the vendor driver, the new chip with XID 0x54b is essentially the same as the one with XID 0x54a, but it doesn't need the firmware. So add support accordingly. Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com> Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/20210202044813.1304266-1-kai.heng.feng@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Amit Cohen 提交于
With the next patch mlxsw and netdevsim will fail in compilation if CONFIG_IPV6 is disabled. Do not call fib6_info_hw_flags_set() when IPv6 is disabled. Signed-off-by: NAmit Cohen <amcohen@nvidia.com> Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Amit Cohen 提交于
The next patch will emit notification when hardware flags are changed, in case that fib_notify_on_flag_change sysctl is set to 1. To know sysctl values, net struct is needed. This change is consistent with the IPv4 version, which gets 'net' struct as its first argument. Currently, the only callers of this function are mlxsw and netdevsim. Patch the callers to pass net. Signed-off-by: NAmit Cohen <amcohen@nvidia.com> Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NDavid Ahern <dsahern@kernel.org> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Heiner Kallweit 提交于
So far phy_disconnect() is called before free_irq(). If CONFIG_DEBUG_SHIRQ is set and interrupt is shared, then free_irq() creates an "artificial" interrupt by calling the interrupt handler. The "link change" flag is set in the interrupt status register, causing phylib to eventually call phy_suspend(). Because the net_device is detached from the PHY already, the PHY driver can't recognize that WoL is configured and powers down the PHY. Fixes: f1e911d5 ("r8169: add basic phylib support") Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/fe732c2c-a473-9088-3974-df83cfbd6efd@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Stefan Chulski 提交于
Last TCAM data contains TCAM enable bit. It should be written after SRAM data before entry enabled. Fixes: 3f518509 ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: NStefan Chulski <stefanc@marvell.com> Link: https://lore.kernel.org/r/1612172139-28343-1-git-send-email-stefanc@marvell.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 02 2月, 2021 4 次提交
-
-
由 Maor Dickman 提交于
In case of failure in tc update skb the packet is dropped without freeing the skb. Fixed by freeing the skb in case failure in tc update skb. Fixes: d6d27782 ("net/mlx5: E-Switch, Restore chain id on miss") Fixes: c7569097 ("net/mlx5e: Add tc chains offload support for nic flows") Signed-off-by: NMaor Dickman <maord@nvidia.com> Reviewed-by: NRoi Dayan <roid@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Maxim Mikityanskiy 提交于
max_opened_tc is used for stats, so that potentially non-zero stats won't disappear when num_tc decreases. However, mlx5e_setup_tc_mqprio fails to update it in the flow where channels are closed. This commit fixes it. The new value of priv->channels.params.num_tc is always checked on exit. In case of errors it will just be the old value, and in case of success it will be the updated value. Fixes: 05909bab ("net/mlx5e: Avoid reset netdev stats on configuration changes") Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com> Reviewed-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Maor Gottlieb 提交于
When creation of a new rule that requires allocation of an FTE fails, need to call to tree_put_node on the FTE in order to release its' resource. Fixes: cefc2355 ("net/mlx5: Fix FTE cleanup") Signed-off-by: NMaor Gottlieb <maorg@nvidia.com> Reviewed-by: NAlaa Hleihel <alaa@nvidia.com> Reviewed-by: NMark Bloch <mbloch@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Daniel Jurgens 提交于
The function calculation always results in a value of 0. This works generally, but when the release all pages feature is enabled it will result in crashes. Fixes: 0aa12847 ("net/mlx5: Maintain separate page trees for ECPF and PF functions") Signed-off-by: NDaniel Jurgens <danielj@nvidia.com> Reported-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-