#
3b75c3df |
| 01-Jun-2018 |
Peng Li <lipeng321@huawei.com> |
net: hns3: Add support for IFF_ALLMULTI flag
This patch adds support for IFF_ALLMULTI flag to HNS3 PF and VF driver.
Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.
net: hns3: Add support for IFF_ALLMULTI flag
This patch adds support for IFF_ALLMULTI flag to HNS3 PF and VF driver.
Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
544a7bcd |
| 25-May-2018 |
Lijun Ou <oulijun@huawei.com> |
net: hns3: Fixes initalization of RoCE handle and makes it conditional
When register a RoCE client with hnae3vf device, it needs to judge the device whether support RoCE vf function. Otherwise, it w
net: hns3: Fixes initalization of RoCE handle and makes it conditional
When register a RoCE client with hnae3vf device, it needs to judge the device whether support RoCE vf function. Otherwise, it will lead to calltrace when RoCE is not support vf function and remove roce device.
The calltrace as follows: [ 93.156614] Unable to handle kernel NULL pointer dereference at virtual address 00000015 <SNIP> [ 93.278784] Call trace: [ 93.278788] hnae3_match_n_instantiate+0x24/0xd8 [hnae3] [ 93.278790] hnae3_register_client+0xcc/0x150 [hnae3] [ 93.278801] hns_roce_hw_v2_init+0x18/0x1000 [hns_roce_hw_v2] [ 93.278805] do_one_initcall+0x58/0x160 [ 93.278807] do_init_module+0x64/0x1d8 [ 93.278809] load_module+0x135c/0x15c8 [ 93.278811] SyS_finit_module+0x100/0x118 [ 93.278816] __sys_trace_return+0x0/0x4 [ 93.278827] Code: aa0003f5 12001c56 aa1e03e0 d503201f (b9402660)
Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Reported-by: Xinwei Kong <kong.kongxinwei@hisilicon.com> Reported-by: Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
eddf0462 |
| 19-May-2018 |
Yunsheng Lin <linyunsheng@huawei.com> |
net: hns3: Fix for CMDQ and Misc. interrupt init order problem
When vf module is loading, the cmd queue initialization should happen before misc interrupt initialization, otherwise the misc interrup
net: hns3: Fix for CMDQ and Misc. interrupt init order problem
When vf module is loading, the cmd queue initialization should happen before misc interrupt initialization, otherwise the misc interrupt handle will cause using uninitialized cmd queue problem. There is also the same issue when vf module is unloading.
This patch fixes it by adjusting the location of some function.
Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
854cf33a |
| 15-May-2018 |
Fuyun Liang <liangfuyun1@huawei.com> |
net: hns3: Change return type of hnae3_register_ae_algo
The ae_algo is used by many ae_devs. It is not only belong to just a ae_dev. Initializing ae_dev failed does not represent registering ae_algo
net: hns3: Change return type of hnae3_register_ae_algo
The ae_algo is used by many ae_devs. It is not only belong to just a ae_dev. Initializing ae_dev failed does not represent registering ae_algo failed. Because the action of registering ae_algo just is adding ae_algo to the ae_algo list and it is always is true, it make no sense to define return type as int.
This patch changes the return type of hnae3_register_ae_algo from int to void.
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
3e249d3b |
| 15-May-2018 |
Fuyun Liang <liangfuyun1@huawei.com> |
net: hns3: Fix for the null pointer problem occurring when initializing ae_dev failed
When initializing ae_dev failed during loading hclge.ko, the drvdata will be set to null. When removing hns3.ko,
net: hns3: Fix for the null pointer problem occurring when initializing ae_dev failed
When initializing ae_dev failed during loading hclge.ko, the drvdata will be set to null. When removing hns3.ko, we get a null ae_dev. It causes the null pointer problem.
This patch removes pci_set_drvdata from error handle of hclge_init_ae_dev to fix the bug, since pci_set_drvdata has been called in hns3_remove. Also, we do not need to uninit the ae_dev which is not initialized. And it may be the one which is initialized failed.
Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
b2641e2a |
| 03-May-2018 |
Yunsheng Lin <linyunsheng@huawei.com> |
net: hns3: Add support of hardware rx-vlan-offload to HNS3 VF driver
This patch adds support of hardware rx-vlan-offload to VF driver. VF uses mailbox to convey PF to configure the hardware.
Signed
net: hns3: Add support of hardware rx-vlan-offload to HNS3 VF driver
This patch adds support of hardware rx-vlan-offload to VF driver. VF uses mailbox to convey PF to configure the hardware.
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v4.16 |
|
#
07a0556a |
| 22-Mar-2018 |
Salil Mehta <salil.mehta@huawei.com> |
net: hns3: Changes to support ARQ(Asynchronous Receive Queue)
Current mailbox CRQ could consists of both synchronous and async responses from the PF. Synchronous responses are time critical and shou
net: hns3: Changes to support ARQ(Asynchronous Receive Queue)
Current mailbox CRQ could consists of both synchronous and async responses from the PF. Synchronous responses are time critical and should be handed over to the waiting tasks/context as quickly as possible otherwise timeout occurs.
Above problem gets accentuated if CRQ consists of even single async message. Hence, it is important to have quick handling of synchronous messages and maybe deferred handling of async messages This patch introduces separate ARQ(async receive queues) for the async messages. These messages are processed later with repsect to mailbox task while synchronous messages still gets processed in context to mailbox interrupt.
ARQ is important as VF reset introduces some new async messages like MBX_ASSERTING_RESET which adds up to the presssure on the responses for synchronousmessages and they timeout even more quickly.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
7a01c897 |
| 22-Mar-2018 |
Salil Mehta <salil.mehta@huawei.com> |
net: hns3: Add support to re-initialize the hclge device
After the hardware reset we should re-fetch the configuration from PF like queue info and tc info. This might have impact on allocations made
net: hns3: Add support to re-initialize the hclge device
After the hardware reset we should re-fetch the configuration from PF like queue info and tc info. This might have impact on allocations made like that of TQPs. Hence, we should release all such allocations and re-allocate fresh according to new fetched configuration after reset.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
6988eb2a |
| 22-Mar-2018 |
Salil Mehta <salil.mehta@huawei.com> |
net: hns3: Add support to reset the enet/ring mgmt layer
After VF driver knows that hardware reset has been performed successfully, it should proceed ahead and reset the enet layer. This primarily c
net: hns3: Add support to reset the enet/ring mgmt layer
After VF driver knows that hardware reset has been performed successfully, it should proceed ahead and reset the enet layer. This primarily consists of bringing down interface, clearing TX/RX rings, disassociating vectors from ring etc.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
a8dedb65 |
| 22-Mar-2018 |
Salil Mehta <salil.mehta@huawei.com> |
net: hns3: Add support to request VF Reset to PF
VF driver depends upon PF to eventually reset the hardware. This request is made using the mailbox command. This patch adds the required function to
net: hns3: Add support to request VF Reset to PF
VF driver depends upon PF to eventually reset the hardware. This request is made using the mailbox command. This patch adds the required function to acheive above.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
436667d2 |
| 22-Mar-2018 |
Salil Mehta <salil.mehta@huawei.com> |
net: hns3: Add VF Reset device state and its handling
This introduces the hclge device reset states of "requested" and "pending" and also its handling in context to Reset Service Task.
Device gets
net: hns3: Add VF Reset device state and its handling
This introduces the hclge device reset states of "requested" and "pending" and also its handling in context to Reset Service Task.
Device gets into requested state because of any VF reset request asserted from upper layers, for example due to watchdog timeout expiration. Requested state would result in eventually forwarding the VF reset request to PF which would actually reset the VF.
Device will get into pending state if: 1. VF receives the acknowledgement from PF for the VF reset request it originally sent to PF. 2. Reset Service Task detects that after asserting VF reset for certain times the data-path is not working and device then decides to assert full VF reset(this means also resetting the PCIe interface). 3. PF intimates the VF that it has undergone reset. Pending state would result in VF to poll for hardware reset completion status and then resetting the stack/enet layer, which in turn means reinitializing the ring management/enet layer.
Note: we would be adding support of 3. later as a separate patch. This decision should not affect VF reset as its event handling is generic in nature.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
35a1e503 |
| 22-Mar-2018 |
Salil Mehta <salil.mehta@huawei.com> |
net: hns3: Add VF Reset Service Task to support event handling
VF reset would involve handling of different reset related events from the stack, physical function, mailbox etc. Reset service task wo
net: hns3: Add VF Reset Service Task to support event handling
VF reset would involve handling of different reset related events from the stack, physical function, mailbox etc. Reset service task would be used in servicing such reset event requests and later handling the hardware completions waits and initiating the stack resets.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
6d4c3981 |
| 22-Mar-2018 |
Salil Mehta <salil.mehta@huawei.com> |
net: hns3: Changes to make enet watchdog timeout func common for PF/VF
HNS3 drivers enet layer, used for the ring management and stack interaction, is common to both VF and PF. PF already supports r
net: hns3: Changes to make enet watchdog timeout func common for PF/VF
HNS3 drivers enet layer, used for the ring management and stack interaction, is common to both VF and PF. PF already supports reset functionality to handle the network stack watchdog timeout trigger but the existing code is not generic enough to be used to support VF reset as well. This patch does following: 1. Makes the existing watchdog timeout handler in enet layer generic i.e. suitable for both VF and PF and 2. Introduces the new reset event handler for the VF code. 3. Changes existing reset event handler of PF code to initialize the reset level
Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
4a152de9 |
| 21-Mar-2018 |
Fuyun Liang <liangfuyun1@huawei.com> |
net: hns3: add querying speed and duplex support to VF
This patch adds support for querying speed and duplex by ethtool ethX to VF.
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by
net: hns3: add querying speed and duplex support to VF
This patch adds support for querying speed and duplex by ethtool ethX to VF.
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
175ec96b |
| 21-Mar-2018 |
Fuyun Liang <liangfuyun1@huawei.com> |
net: hns3: add get_link support to VF
This patch adds ethtool_ops.get_link support to VF.
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-of
net: hns3: add get_link support to VF
This patch adds ethtool_ops.get_link support to VF.
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
2f550a46 |
| 21-Mar-2018 |
Yunsheng Lin <linyunsheng@huawei.com> |
net: hns3: export pci table of hclge and hclgevf to userspace
There is no module that is dependent on hclge or hclgevf's symbol, but hns_enet need them to provide ops for it to run. When there is a
net: hns3: export pci table of hclge and hclgevf to userspace
There is no module that is dependent on hclge or hclgevf's symbol, but hns_enet need them to provide ops for it to run. When there is a need to auto load the hns3 driver, the auto load will fail because hclge or hclgevf is not loaded.
Hns_enet has already exported the pci table, so this patch exports the pci table for hclge and hclgevf module too.
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
1a426f8b |
| 21-Mar-2018 |
Peng Li <lipeng321@huawei.com> |
net: hns3: fix the VF queue reset flow error
VF queue reset flow is different from PF queue reset flow. VF driver should stop VF queue first, then send message to PF and PF do the reset. PF should s
net: hns3: fix the VF queue reset flow error
VF queue reset flow is different from PF queue reset flow. VF driver should stop VF queue first, then send message to PF and PF do the reset. PF should send a response to VF after PF complete the queue reset, VF can initialize the queue hw after get the response. This patch fixes the VF queue reset flow as the correct step.
Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
2097fdef |
| 09-Mar-2018 |
Jian Shen <shenjian15@huawei.com> |
net: hns3: add result checking for VF when modify unicast mac address
VF changes unicast mac address by sending mailbox msg to PF, then PF completes the mac address modification. It may fail when th
net: hns3: add result checking for VF when modify unicast mac address
VF changes unicast mac address by sending mailbox msg to PF, then PF completes the mac address modification. It may fail when the target uc mac address is already in the mac_vlan table. VF should be aware of it by reading the message result.
Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
5d02a58d |
| 09-Mar-2018 |
Yunsheng Lin <linyunsheng@huawei.com> |
net: hns3: fix for buffer overflow smatch warning
This patch fixes the buffer overflow warning by refactoring hclgevf_bind_ring_to_vector and hclge_get_ring_chain_from_mbx.
Fixes: e2cb1dec9779 ("ne
net: hns3: fix for buffer overflow smatch warning
This patch fixes the buffer overflow warning by refactoring hclgevf_bind_ring_to_vector and hclge_get_ring_chain_from_mbx.
Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Fixes: dde1a86e93ca ("net: hns3: Add mailbox support to PF driver") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
8cc6c1f7 |
| 09-Mar-2018 |
Fuyun Liang <liangfuyun1@huawei.com> |
net: hns3: fix for netdev not running problem after calling net_stop and net_open
The link status update function is called by timer every second. But net_stop and net_open may be called with very s
net: hns3: fix for netdev not running problem after calling net_stop and net_open
The link status update function is called by timer every second. But net_stop and net_open may be called with very short intervals. The link status update function can not detect the link state has changed. It causes the netdev not running problem.
This patch fixes it by updating the link state in ae_stop function.
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
59098055 |
| 09-Mar-2018 |
Fuyun Liang <liangfuyun1@huawei.com> |
net: hns3: add existence check when remove old uc mac address
When driver is in initial state, the mac_vlan table table is empty. So the delete operation for mac address must fail. Existence check i
net: hns3: add existence check when remove old uc mac address
When driver is in initial state, the mac_vlan table table is empty. So the delete operation for mac address must fail. Existence check is needed here. Otherwise, the error message will make user confused.
Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0d3e6631 |
| 08-Mar-2018 |
Yunsheng Lin <linyunsheng@huawei.com> |
net: hns3: refactor the get/put_vector function
There is a get_vector function, which allocate the vectors for a client, but there is not a put_vector to free the vector.
This patch introduces the
net: hns3: refactor the get/put_vector function
There is a get_vector function, which allocate the vectors for a client, but there is not a put_vector to free the vector.
This patch introduces the put_vector function in order to fix the coalesce configuration lost problem during reset process.
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
cc719218 |
| 08-Mar-2018 |
Peng Li <lipeng321@huawei.com> |
net: hns3: add support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info
This patch adds support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info. This interface will be
net: hns3: add support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info
This patch adds support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info. This interface will be used in the initialization process.
Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v4.15 |
|
#
79eee410 |
| 26-Jan-2018 |
Fuyun Liang <liangfuyun1@huawei.com> |
net: hns3: add int_gl_idx setup for VF
Just like PF, if the int_gl_idx of VF does not be set, the default interrupt coalesce index of VF is 0. But it should be GL1 for TX queues and GL0 for RX queue
net: hns3: add int_gl_idx setup for VF
Just like PF, if the int_gl_idx of VF does not be set, the default interrupt coalesce index of VF is 0. But it should be GL1 for TX queues and GL0 for RX queues.
This patch adds the int_gl_idx setup for VF.
Fixes: 200ecda42598 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
27cdfed0 |
| 12-Jan-2018 |
Peng Li <lipeng321@huawei.com> |
net: hns3: remove TSO config command from VF driver
Only main PF can config TSO MSS length according to hardware. This patch removes TSO config command from VF driver.
Signed-off-by: Peng Li <lipen
net: hns3: remove TSO config command from VF driver
Only main PF can config TSO MSS length according to hardware. This patch removes TSO config command from VF driver.
Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|