2acf960e | 03-Nov-2022 |
Cai Huoqing <cai.huoqing@linux.dev> |
net: hinic: Add support for configuration of rx-vlan-filter by ethtool
When ethtool config rx-vlan-filter, the driver will send control command to firmware, then set to hardware in this patch.
Sign
net: hinic: Add support for configuration of rx-vlan-filter by ethtool
When ethtool config rx-vlan-filter, the driver will send control command to firmware, then set to hardware in this patch.
Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
13265568 | 03-Nov-2022 |
Cai Huoqing <cai.huoqing@linux.dev> |
net: hinic: Add control command support for VF PMD driver in DPDK
HINIC has a mailbox for PF-VF communication and the VF driver could send port control command to PF driver via mailbox.
The control
net: hinic: Add control command support for VF PMD driver in DPDK
HINIC has a mailbox for PF-VF communication and the VF driver could send port control command to PF driver via mailbox.
The control command only can be set to register in PF, so add support in PF driver for VF PMD driver control command when VF PMD driver work with linux PF driver.
Then, no need to add handlers to nic_vf_cmd_msg_handler[], because the host driver just forwards it to the firmware. Actually the firmware works on a coprocessor MGMT_CPU(inside the NIC) which will recv and deal with these commands.
Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
8ec2f4c6 | 19-Oct-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
net: hinic: fix the issue of double release MBOX callback of VF
In hinic_vf_func_init(), if VF fails to register information with PF through the MBOX, the MBOX callback function of VF is released on
net: hinic: fix the issue of double release MBOX callback of VF
In hinic_vf_func_init(), if VF fails to register information with PF through the MBOX, the MBOX callback function of VF is released once. But it is released again in hinic_init_hwdev(). Remove one.
Fixes: 7dd29ee12865 ("hinic: add sriov feature support") Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
363cc877 | 19-Oct-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
net: hinic: fix the issue of CMDQ memory leaks
When hinic_set_cmdq_depth() fails in hinic_init_cmdqs(), the cmdq memory is not released correctly. Fix it.
Fixes: 72ef908bb3ff ("hinic: add three net
net: hinic: fix the issue of CMDQ memory leaks
When hinic_set_cmdq_depth() fails in hinic_init_cmdqs(), the cmdq memory is not released correctly. Fix it.
Fixes: 72ef908bb3ff ("hinic: add three net_device_ops of vf") Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
4c1f602d | 19-Oct-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
net: hinic: fix memory leak when reading function table
When the input parameter idx meets the expected case option in hinic_dbg_get_func_table(), read_data is not released. Fix it.
Fixes: 5215e162
net: hinic: fix memory leak when reading function table
When the input parameter idx meets the expected case option in hinic_dbg_get_func_table(), read_data is not released. Fix it.
Fixes: 5215e16244ee ("hinic: add support to query function table") Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
c706df6d | 21-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
net: hinic: remove the unused input parameter prod_idx in sq_prepare_ctrl()
The input parameter prod_idx is not used in sq_prepare_ctrl(), remove it.
Signed-off-by: Zhengchao Shao <shaozhengchao@hu
net: hinic: remove the unused input parameter prod_idx in sq_prepare_ctrl()
The input parameter prod_idx is not used in sq_prepare_ctrl(), remove it.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
dcbe72d2 | 21-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
net: hinic: change hinic_deinit_vf_hw() to void
When hinic_pci_sriov_disable() calls hinic_deinit_vf_hw(), it doesn't care about the return value of hinic_deinit_vf_hw(). Also hinic_deinit_vf_hw() i
net: hinic: change hinic_deinit_vf_hw() to void
When hinic_pci_sriov_disable() calls hinic_deinit_vf_hw(), it doesn't care about the return value of hinic_deinit_vf_hw(). Also hinic_deinit_vf_hw() is return 0, so change it to void.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
4f304250 | 21-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
net: hinic: simplify code logic
simplify code logic in hinic_ndo_set_vf_trust() and hinic_ndo_set_vf_spoofchk().
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicins
net: hinic: simplify code logic
simplify code logic in hinic_ndo_set_vf_trust() and hinic_ndo_set_vf_spoofchk().
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
97d6a3e6 | 21-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
net: hinic: remove duplicate macro definition
The macro HINIC_WAIT_SRIOV_CFG_TIMEOUT is defined twice, remove one.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kici
net: hinic: remove duplicate macro definition
The macro HINIC_WAIT_SRIOV_CFG_TIMEOUT is defined twice, remove one.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
2b291ee6 | 21-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
net: hinic: remove unused functions
hinic_hwdev_max_num_qpas() and hinic_msix_attr_get() are no longer called, remove them. Also the macro HINIC_MSIX_ATTR_GET is also not called, remove it.
Signed-
net: hinic: remove unused functions
hinic_hwdev_max_num_qpas() and hinic_msix_attr_get() are no longer called, remove them. Also the macro HINIC_MSIX_ATTR_GET is also not called, remove it.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
73f25f16 | 21-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
net: hinic: change type of function to be static
Functions are called only in one file, change their type to static.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Ki
net: hinic: change type of function to be static
Functions are called only in one file, change their type to static.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
98f9fcde | 05-Jul-2022 |
Qiao Ma <mqaio@linux.alibaba.com> |
net: hinic: avoid kernel hung in hinic_get_stats64()
When using hinic device as a bond slave device, and reading device stats of master bond device, the kernel may hung.
The kernel panic calltrace
net: hinic: avoid kernel hung in hinic_get_stats64()
When using hinic device as a bond slave device, and reading device stats of master bond device, the kernel may hung.
The kernel panic calltrace as follows: Kernel panic - not syncing: softlockup: hung tasks Call trace: native_queued_spin_lock_slowpath+0x1ec/0x31c dev_get_stats+0x60/0xcc dev_seq_printf_stats+0x40/0x120 dev_seq_show+0x1c/0x40 seq_read_iter+0x3c8/0x4dc seq_read+0xe0/0x130 proc_reg_read+0xa8/0xe0 vfs_read+0xb0/0x1d4 ksys_read+0x70/0xfc __arm64_sys_read+0x20/0x30 el0_svc_common+0x88/0x234 do_el0_svc+0x2c/0x90 el0_svc+0x1c/0x30 el0_sync_handler+0xa8/0xb0 el0_sync+0x148/0x180
And the calltrace of task that actually caused kernel hungs as follows: __switch_to+124 __schedule+548 schedule+72 schedule_timeout+348 __down_common+188 __down+24 down+104 hinic_get_stats64+44 [hinic] dev_get_stats+92 bond_get_stats+172 [bonding] dev_get_stats+92 dev_seq_printf_stats+60 dev_seq_show+24 seq_read_iter+964 seq_read+220 proc_reg_read+164 vfs_read+172 ksys_read+108 __arm64_sys_read+28 el0_svc_common+132 do_el0_svc+40 el0_svc+24 el0_sync_handler+164 el0_sync+324
When getting device stats from bond, kernel will call bond_get_stats(). It first holds the spinlock bond->stats_lock, and then call hinic_get_stats64() to collect hinic device's stats. However, hinic_get_stats64() calls `down(&nic_dev->mgmt_lock)` to protect its critical section, which may schedule current task out. And if system is under high pressure, the task cannot be woken up immediately, which eventually triggers kernel hung panic.
Since previous patch has replaced hinic_dev.tx_stats/rx_stats with local variable in hinic_get_stats64(), there is nothing need to be protected by lock, so just removing down()/up() is ok.
Fixes: edd384f682cc ("net-next/hinic: Add ethtool and stats") Signed-off-by: Qiao Ma <mqaio@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|