- 30 3月, 2021 9 次提交
-
-
由 Yunsheng Lin 提交于
Currently hns3 driver only handle the xmit skb with one level of fraglist skb, add handling for multi level by calling hns3_tx_bd_num() recursively when calculating bd num and calling hns3_fill_skb_to_desc() recursively when filling tx desc. When the skb has a fraglist level of 24, the skb is simply dropped and stats.max_recursion_level is added to record the error. Move the stat handling from hns3_nic_net_xmit() to hns3_nic_maybe_stop_tx() in order to handle different error stat and add the 'max_recursion_level' and 'hw_limitation' stat. Note that the max recursive level as 24 is chose according to below: commit 48a1df65 ("skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow"). And that we are not able to find a testcase to verify the recursive fraglist case, so Fixes tag is not provided. Reported-by: NBarry Song <song.bao.hua@hisilicon.com> Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yufeng Mo 提交于
Currently, the queue reset process needs to be performed one by one, which is inefficient. However, the queue reset of the same function is always performed at the same time. Therefore, according to the UM, command HCLGE_OPC_CFG_RST_TRIGGER can be used to reset all queues of the same function at a time, in order to optimize the queue reset process. Signed-off-by: NYufeng Mo <moyufeng@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jian Shen 提交于
Currently, if user hasn't change channel number, the rss_size is limited to be no more than the vector number, in order to keep one vector only being mapped to one queue. But the queue number of each tc can be different, and one vector also can be mapped by multiple queues. So remove this limitation. Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guangbin Huang 提交于
The array size of bd_num_list is a fixed value, it may have potential overflow risk when array size of hclge_dfx_bd_offset_list is greater than that fixed value. So modify bd_num_list as a pointer and allocate memory for it according to array size of hclge_dfx_bd_offset_list. Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jian Shen 提交于
When new rule state is TO_ADD or ACTIVE, and there is already a rule with same location in the fd_rule_list, the new rule will be freed after modifying the old rule. It may cause user-after-free issue when access rule again in hclge_add_fd_entry_common(). Fixes: fc4243b8 ("net: hns3: refactor flow director configuration") Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jian Shen 提交于
Currently, when adding flow director rule, it missed to set rule state. Which may cause the rule state in software is unconsistent with hardware. Fixes: fc4243b8 ("net: hns3: refactor flow director configuration") Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Colin Ian King 提交于
The pointers adapter and phydev are being initialized with values that are never read and are being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 29 3月, 2021 5 次提交
-
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yang Yingliang 提交于
Add the missing unlock before return from stmmac_suspend() in the error handling case. Fixes: 5ec55823 ("net: stmmac: add clocks management for gmac driver") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Liu Jian 提交于
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_clear_arfs_rules': drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:7173:1: error: no return statement in function returning non-void [-Werror=return-type] 7173 | } | ^ cc1: some warnings being treated as errors make[6]: *** [scripts/Makefile.build:273: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.o] Error 1 make[5]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon/hns3/hns3pf] Error 2 make[4]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon/hns3] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon] Error 2 make[2]: *** [scripts/Makefile.build:534: drivers/net/ethernet] Error 2 make[1]: *** [scripts/Makefile.build:534: drivers/net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1980: drivers] Error 2 Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NLiu Jian <liujian56@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Colin Ian King 提交于
The pointer gpio is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 27 3月, 2021 12 次提交
-
-
In this patch, "net: stmmac: support FPE link partner hand-shaking procedure", priv->plat->fpe_cfg wouldn`t be "devm_kzalloc"ed if dma_cap->frpsel is 0 (Flexible Rx Parser is not supported in SoC) in tc_init(). So, fpe_cfg will be remain as NULL and accessing it will cause kernel panic. To fix this, move the "devm_kzalloc"ing of priv->plat->fpe_cfg before dma_cap->frpsel checking in tc_init(). Additionally, checking of priv->dma_cap.fpesel is added before calling stmmac_fpe_link_state_handle() as only FPE supported SoC is allowed to call the function. Below is the kernel panic dump reported by Marek Szyprowski <m.szyprowski@samsung.com>: meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=35) meson8b-dwmac ff3f0000.ethernet eth0: No Safety Features support found meson8b-dwmac ff3f0000.ethernet eth0: PTP not supported by HW meson8b-dwmac ff3f0000.ethernet eth0: configuring for phy/rgmii link mode Unable to handle kernel NULL pointer dereference at virtual address 0000000000000001 Mem abort info: ... user pgtable: 4k pages, 48-bit VAs, pgdp=00000000044eb000 [0000000000000001] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 96000004 [#1] PREEMPT SMP Modules linked in: dw_hdmi_i2s_audio dw_hdmi_cec meson_gxl realtek meson_gxbb_wdt snd_soc_meson_axg_sound_card dwmac_generic axg_audio meson_dw_hdmi crct10dif_ce snd_soc_meson_card_utils snd_soc_meson_axg_tdmout panfrost rc_odroid gpu_sched reset_meson_audio_arb meson_ir snd_soc_meson_g12a_tohdmitx snd_soc_meson_axg_frddr sclk_div clk_phase snd_soc_meson_codec_glue dwmac_meson8b snd_soc_meson_axg_fifo stmmac_platform meson_rng meson_drm stmmac rtc_meson_vrtc rng_core meson_canvas pwm_meson dw_hdmi mdio_mux_meson_g12a pcs_xpcs snd_soc_meson_axg_tdm_interface snd_soc_meson_axg_tdm_formatter nvmem_meson_efuse display_connector CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 5.12.0-rc4-next-20210325+ Hardware name: Hardkernel ODROID-C4 (DT) Workqueue: events_power_efficient phylink_resolve pstate: 20400009 (nzCv daif +PAN -UAO -TCO BTYPE=--) pc : stmmac_mac_link_up+0x14c/0x348 [stmmac] lr : stmmac_mac_link_up+0x284/0x348 [stmmac] ... Call trace: stmmac_mac_link_up+0x14c/0x348 [stmmac] phylink_resolve+0x104/0x420 process_one_work+0x2a8/0x718 worker_thread+0x48/0x460 kthread+0x134/0x160 ret_from_fork+0x10/0x18 Code: b971ba60 350007c0 f958c260 f9402000 (39400401) ---[ end trace 0c9deb6c510228aa ]--- Fixes: 5a558611 ("net: stmmac: support FPE link partner hand-shaking procedure") Reported-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NMohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com> Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xu Jia 提交于
Remove duplicated include from mtk_ppe_offload.c. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXu Jia <xujia39@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Robert Hancock 提交于
This driver was only enabling the first clock on the device, regardless of its name. However, this controller logic can have multiple clocks which should all be enabled. Add support for enabling additional clocks. The clock names used are matching those used in the Xilinx version of this driver as well as the Xilinx device tree generator, except for mgt_clk which is not present there. For backward compatibility, if no named clocks are present, the first clock present is used for determining the MDIO bus clock divider. Reviewed-by: NRadhey Shyam Pandey <radhey.shyam.pandey@xilinx.com> Signed-off-by: NRobert Hancock <robert.hancock@calian.com> Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guojia Liao 提交于
hclge_tm_vport_tc_info_update() is bloated, so split it into separate functions for readability and maintainability. Signed-off-by: NGuojia Liao <liaoguojia@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yufeng Mo 提交于
hclge_reset_rebuild() is a bit too long. So add a new function hclge_update_reset_level() to improve readability. Signed-off-by: NYufeng Mo <moyufeng@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Huazhong Tan 提交于
s/sucessful/successful/ s/serivce/service/ and remove a redundant new. Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Huazhong Tan 提交于
Correct a report warning in hns3_ethtool.c Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Huazhong Tan 提交于
Parameter cm_buf is never used, so remove it. Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Peng Li 提交于
Parameter vf in hclge_set_vf_vlan_common() is unused now, so remove it. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jiaran Zhang 提交于
According to the HW manual, the query operation is unnecessary when the TM QCN error event is enabled, so remove it. Signed-off-by: Jiaran Zhang <zhangjiaran@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Peng Li 提交于
Remove some redundant blank lines. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jian Shen 提交于
Vmdq is not supported yet, the num_vmdq_vport is always 0, it's a bit confusing when using the num_vport, so remove these unused codes of vmdq. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 26 3月, 2021 14 次提交
-
-
由 Colin Ian King 提交于
There are two spelling mistakes in a mlx5_core_info message. Fix them. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Aya Levin 提交于
Reduce scope of mlx5e_ptp_params, move to its c file. Remove unneeded variables from mlx5e_ptp_open and state bitmap from PTP channel. In addition, remove channel index from PTP channel since it is set to a hard coded value, use define instead. Signed-off-by: NAya Levin <ayal@nvidia.com> Reviewed-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Aya Levin 提交于
Following patches in the set add support for RX PTP. Rename PTP prefix from %s/port_ptp/ptp/g to include RX PTP too. In addition rename indication (used in statistics context) that PTP-SQ was opened: %s/port_ptp_opened/tx_ptp_opened/g. This will simplify adding indication that PTP-RQ was opened. Signed-off-by: NAya Levin <ayal@nvidia.com> Signed-off-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Aya Levin 提交于
Add input parameter indicating the size of direct-TIRs/direct-RQTs array to be created/destroyed. This allows next patches in the patch-set to handle a single direct-TIR pointing to a direct-RQT with a single entry. Signed-off-by: NAya Levin <ayal@nvidia.com> Reviewed-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Aya Levin 提交于
Allow different flavours of RQ to use the same close flow. Add validity checks to support different RQ types which not necessarily initialize all the RQ's functionality. Signed-off-by: NAya Levin <ayal@nvidia.com> Reviewed-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Aya Levin 提交于
Support RQ activation for RQs without an ICOSQ in the main flow, like existing trap-RQ and like PTP-RQ that will be introduced in the coming patches in the patchset. With this patch, remove the wrapper in traps to deactivate the trap-RQ. Signed-off-by: NAya Levin <ayal@nvidia.com> Reviewed-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Aya Levin 提交于
Unify RQ creation for different RQ types. For each RQ type add a separate open helper which initializes the RQ specific values and trigger a call for generic open RQ function. Avoid passing the mlx5e_channel pointer to the generic open RQ as a container, since the RQ may reside under a different type of channel. Signed-off-by: NAya Levin <ayal@nvidia.com> Signed-off-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Aya Levin 提交于
Translation method on the time-stamp is set by the capabilities. Avoid code duplication by using a helper to set ptp_cyc2time callback on a queue. Signed-off-by: NAya Levin <ayal@nvidia.com> Reviewed-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Aya Levin 提交于
Change the signature of mlx5e_rq_alloc_mpwqe_info from receiving channel pointer to receive the NUMA node. This allows creating mpwqe_info in context of different channels types. Signed-off-by: NAya Levin <ayal@nvidia.com> Reviewed-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Tariq Toukan 提交于
Do not use generic struct mlx5e_priv as a parameter to param functions, as it is too generic. All calculations of the channel's param should be mainly based on struct mlx5_core_dev and struct mlx5e_params. Additional info can be explicitly passed. Signed-off-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NAya Levin <ayal@nvidia.com> Reviewed-by: NMaxim Mikityanskiy <maximmi@mellanox.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Tariq Toukan 提交于
Take params logic out of en_main.c, into the dedicated params.c. Some functions are now hidden and become static. No functional change here. Signed-off-by: NTariq Toukan <tariqt@nvidia.com> Reviewed-by: NMaxim Mikityanskiy <maximmi@mellanox.com> Reviewed-by: NAya Levin <ayal@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Tariq Toukan 提交于
Pass q_counter idintifier, instead of reading it from mlx5e_priv parameter. This is a step towards removing the mlx5e_priv parameter from all params function and logic in the next patches of the series. Signed-off-by: NTariq Toukan <tariqt@nvidia.com> Reviewed-by: NAya Levin <ayal@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Saeed Mahameed 提交于
The cited patch allocated the wrong size for the indirection_rqt table, fix that. Fixes: 2119bda6 ("net/mlx5e: allocate 'indirection_rqt' buffer dynamically") CC: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
-
由 Wong, Vee Khee 提交于
For interrupt mode INTM=0, TX/RX transfer complete will trigger signal not only on sbd_perch_[tx|rx]_intr_o (Transmit/Receive Per Channel) but also on the sbd_intr_o (Common). As for multi-MSI implementation, setting interrupt mode INTM=1 is more efficient as each TX intr and RX intr (TI/RI) will be handled by TX/RX ISR without the need of calling the common MAC ISR. Updated the TX/RX NORMAL interrupts status checking process as the NIS status bit is not asserted for any RI/TI events for INTM=1. Signed-off-by: NWong, Vee Khee <vee.khee.wong@intel.com> Co-developed-by: NVoon Weifeng <weifeng.voon@intel.com> Signed-off-by: NVoon Weifeng <weifeng.voon@intel.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-