[PATCH net-next] net-next/hinic: Fix a case of Tx Queue is Stopped forever

2017-09-26 Thread Aviad Krawczyk
-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_tx.c b/drivers/net/ethernet/huawei/hinic/hinic_tx.c index abe3e38..9

[PATCH net-next] net-next/hinic: Fix a case of Tx Queue is Stopped forever

2017-09-26 Thread Aviad Krawczyk
-off-by: Aviad Krawczyk --- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_tx.c b/drivers/net/ethernet/huawei/hinic/hinic_tx.c index abe3e38..9128858 100644 --- a/drivers/net

[PATCH net-next] net-next/hinic: Set Rxq irq to specific cpu for NUMA

2017-09-26 Thread Aviad Krawczyk
Set Rxq irq to specific cpu for allocating and receiving the skb from the same node. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_rx.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drive

[PATCH net-next] net-next/hinic: Set Rxq irq to specific cpu for NUMA

2017-09-26 Thread Aviad Krawczyk
Set Rxq irq to specific cpu for allocating and receiving the skb from the same node. Signed-off-by: Aviad Krawczyk --- drivers/net/ethernet/huawei/hinic/hinic_rx.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_rx.c

[PATCH net-next] net-next/hinic: fix comparison of a uint16_t type with -1

2017-08-27 Thread Aviad Krawczyk
Remove the search for index of constant buffer size Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 37 +--- drivers/net/ethernet/huawei/hinic/hinic_h

[PATCH net-next] net-next/hinic: fix comparison of a uint16_t type with -1

2017-08-27 Thread Aviad Krawczyk
Remove the search for index of constant buffer size Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 37 +--- drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 21 ++ 2 files changed, 22 insertions

[PATCH V2 net-next] net-next/hinic: Fix MTU limitation

2017-08-27 Thread Aviad Krawczyk
Fix the hw MTU limitation by setting max_mtu Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/

[PATCH V2 net-next] net-next/hinic: Fix MTU limitation

2017-08-27 Thread Aviad Krawczyk
Fix the hw MTU limitation by setting max_mtu Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic

Re: [PATCH net-next] net-next/hinic: Fix MTU limitation

2017-08-24 Thread Aviad Krawczyk
On 8/24/2017 6:19 PM, Andrew Lunn wrote: > On Thu, Aug 24, 2017 at 09:21:25PM +0800, Aviad Krawczyk wrote: >> Fix the hw MTU limitation by setting min/max_mtu >> >> Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> >> Signed-off-by: Zhao Chen <zhaoch..

Re: [PATCH net-next] net-next/hinic: Fix MTU limitation

2017-08-24 Thread Aviad Krawczyk
On 8/24/2017 6:19 PM, Andrew Lunn wrote: > On Thu, Aug 24, 2017 at 09:21:25PM +0800, Aviad Krawczyk wrote: >> Fix the hw MTU limitation by setting min/max_mtu >> >> Signed-off-by: Aviad Krawczyk >> Signed-off-by: Zhao Chen >> --- >> drivers/net/ethernet/

[PATCH net-next] net-next/hinic: Fix MTU limitation

2017-08-24 Thread Aviad Krawczyk
Fix the hw MTU limitation by setting min/max_mtu Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/

[PATCH net-next] net-next/hinic: Fix MTU limitation

2017-08-24 Thread Aviad Krawczyk
Fix the hw MTU limitation by setting min/max_mtu Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic

Re: [PATCH][next] net: hinic: fix comparison of a uint16_t type with -1

2017-08-24 Thread Aviad Krawczyk
On 8/24/2017 12:29 PM, Dan Carpenter wrote: > On Thu, Aug 24, 2017 at 09:54:03AM +0100, Colin Ian King wrote: >> On 24/08/17 09:48, Aviad Krawczyk wrote: >>> On 8/23/2017 6:39 PM, Colin King wrote: >>>> From: Colin Ian King <colin.k...@canoni

Re: [PATCH][next] net: hinic: fix comparison of a uint16_t type with -1

2017-08-24 Thread Aviad Krawczyk
On 8/24/2017 12:29 PM, Dan Carpenter wrote: > On Thu, Aug 24, 2017 at 09:54:03AM +0100, Colin Ian King wrote: >> On 24/08/17 09:48, Aviad Krawczyk wrote: >>> On 8/23/2017 6:39 PM, Colin King wrote: >>>> From: Colin Ian King >>>> >>>> The compa

Re: [PATCH][next] net: hinic: fix comparison of a uint16_t type with -1

2017-08-24 Thread Aviad Krawczyk
On 8/23/2017 6:39 PM, Colin King wrote: > From: Colin Ian King > > The comparison of hw_ioctxt.rx_buf_sz_idx == -1 is always false because > rx_buf_sz_idx is a uint16_t. Fix this by explicitly casting -1 to uint16_t. > > Detected by CoverityScan, CID#1454559 ("Operands

Re: [PATCH][next] net: hinic: fix comparison of a uint16_t type with -1

2017-08-24 Thread Aviad Krawczyk
On 8/23/2017 6:39 PM, Colin King wrote: > From: Colin Ian King > > The comparison of hw_ioctxt.rx_buf_sz_idx == -1 is always false because > rx_buf_sz_idx is a uint16_t. Fix this by explicitly casting -1 to uint16_t. > > Detected by CoverityScan, CID#1454559 ("Operands don't affect result") >

Re: [PATCH V8 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-23 Thread Aviad Krawczyk
Hi, > It's clear that ... Sorry, but there are wrong assumptions here. Thanks, Aviad On 8/23/2017 1:37 PM, Arnd Bergmann wrote: > On Wed, Aug 23, 2017 at 11:31 AM, Aviad Krawczyk > <aviad.krawc...@huawei.com> wrote: >> Hi Arnd, >> >> This is Huawei's PCIE Hi

Re: [PATCH V8 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-23 Thread Aviad Krawczyk
Hi, > It's clear that ... Sorry, but there are wrong assumptions here. Thanks, Aviad On 8/23/2017 1:37 PM, Arnd Bergmann wrote: > On Wed, Aug 23, 2017 at 11:31 AM, Aviad Krawczyk > wrote: >> Hi Arnd, >> >> This is Huawei's PCIE HiNIC card. >> >> I am

RE: [PATCH][net-next] net: hinic: make functions set_ctrl0 and set_ctrl1 static

2017-08-23 Thread Aviad Krawczyk (A)
Thanks -Original Message- From: Colin King [mailto:colin.k...@canonical.com] Sent: Wednesday, August 23, 2017 1:00 PM To: Aviad Krawczyk (A); net...@vger.kernel.org Cc: kernel-janit...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: [PATCH][net-next] net: hinic: make functions

RE: [PATCH][net-next] net: hinic: make functions set_ctrl0 and set_ctrl1 static

2017-08-23 Thread Aviad Krawczyk (A)
Thanks -Original Message- From: Colin King [mailto:colin.k...@canonical.com] Sent: Wednesday, August 23, 2017 1:00 PM To: Aviad Krawczyk (A); net...@vger.kernel.org Cc: kernel-janit...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: [PATCH][net-next] net: hinic: make functions

Re: [PATCH V8 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-23 Thread Aviad Krawczyk
AM, Arnd Bergmann wrote: > On Mon, Aug 21, 2017 at 5:55 PM, Aviad Krawczyk > <aviad.krawc...@huawei.com> wrote: >> The patch-set contains the support of the HiNIC Ethernet driver for >> hinic family of PCIE Network Interface Cards. >> >> The Huawei's PCIE HiNIC c

Re: [PATCH V8 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-23 Thread Aviad Krawczyk
AM, Arnd Bergmann wrote: > On Mon, Aug 21, 2017 at 5:55 PM, Aviad Krawczyk > wrote: >> The patch-set contains the support of the HiNIC Ethernet driver for >> hinic family of PCIE Network Interface Cards. >> >> The Huawei's PCIE HiNIC card is a new Ethernet card and henc

Re: [PATCH V8 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-23 Thread Aviad Krawczyk
Thanks, David! Thanks to all the reviewers! On 8/22/2017 8:58 PM, David Miller wrote: > From: Aviad Krawczyk <aviad.krawc...@huawei.com> > Date: Mon, 21 Aug 2017 23:55:46 +0800 > >> The patch-set contains the support of the HiNIC Ethernet driver for >> hinic famil

Re: [PATCH V8 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-23 Thread Aviad Krawczyk
Thanks, David! Thanks to all the reviewers! On 8/22/2017 8:58 PM, David Miller wrote: > From: Aviad Krawczyk > Date: Mon, 21 Aug 2017 23:55:46 +0800 > >> The patch-set contains the support of the HiNIC Ethernet driver for >> hinic family of PCIE Network Interface Cards

[PATCH V8 net-next 01/22] net-next/hinic: Initialize hw interface

2017-08-21 Thread Aviad Krawczyk
Initialize hw interface as part of the nic initialization for accessing hw. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- Documentation/networking/hinic.txt | 125 ++ drivers/net/ethe

[PATCH V8 net-next 01/22] net-next/hinic: Initialize hw interface

2017-08-21 Thread Aviad Krawczyk
Initialize hw interface as part of the nic initialization for accessing hw. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- Documentation/networking/hinic.txt | 125 ++ drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile

[PATCH V8 net-next 05/22] net-next/hinic: Add management messages

2017-08-21 Thread Aviad Krawczyk
Add the management messages for sending to api cmd and the asynchronous event handler for the completion of the messages. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- .../net/ethernet/huawei/hinic/hinic_hw_api_c

[PATCH V8 net-next 05/22] net-next/hinic: Add management messages

2017-08-21 Thread Aviad Krawczyk
Add the management messages for sending to api cmd and the asynchronous event handler for the completion of the messages. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 35 ++ .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h

[PATCH V8 net-next 03/22] net-next/hinic: Initialize api cmd resources

2017-08-21 Thread Aviad Krawczyk
Initialize api cmd resources as part of management initialization. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- .../net/ethernet/huawei/hinic/hinic_hw_api_c

[PATCH V8 net-next 03/22] net-next/hinic: Initialize api cmd resources

2017-08-21 Thread Aviad Krawczyk
Initialize api cmd resources as part of management initialization. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 446 + .../net/ethernet/huawei

[PATCH V8 net-next 04/22] net-next/hinic: Initialize api cmd hw

2017-08-21 Thread Aviad Krawczyk
Update the hardware about api cmd resources and initialize it. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 173 - .../net/ethernet/

[PATCH V8 net-next 04/22] net-next/hinic: Initialize api cmd hw

2017-08-21 Thread Aviad Krawczyk
Update the hardware about api cmd resources and initialize it. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 173 - .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 38 + drivers/net/ethernet/huawei

[PATCH V8 net-next 06/22] net-next/hinic: Add api cmd commands

2017-08-21 Thread Aviad Krawczyk
Add the api cmd commands for sending management messages to the nic. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 329 - .../net/ethernet/

[PATCH V8 net-next 06/22] net-next/hinic: Add api cmd commands

2017-08-21 Thread Aviad Krawczyk
Add the api cmd commands for sending management messages to the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 329 - .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 65 drivers/net/ethernet

[PATCH V8 net-next 07/22] net-next/hinic: Add aeqs

2017-08-21 Thread Aviad Krawczyk
Handle aeq elements that are accumulated on the aeq by calling the registered handler for the specific event. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 49 +++

[PATCH V8 net-next 07/22] net-next/hinic: Add aeqs

2017-08-21 Thread Aviad Krawczyk
Handle aeq elements that are accumulated on the aeq by calling the registered handler for the specific event. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 49 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c | 463

[PATCH V8 net-next 08/22] net-next/hinic: Add port management commands

2017-08-21 Thread Aviad Krawczyk
Add the port management commands that are sent as management messages. The port management commands are used for netdev operations. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile

[PATCH V8 net-next 08/22] net-next/hinic: Add port management commands

2017-08-21 Thread Aviad Krawczyk
Add the port management commands that are sent as management messages. The port management commands are used for netdev operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic

[PATCH V8 net-next 09/22] net-next/hinic: Add Rx mode and link event handler

2017-08-21 Thread Aviad Krawczyk
Add port management message for setting Rx mode in the card, used for rx_mode netdev operation. The link event handler is used for getting a notification about the link state. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com>

[PATCH V8 net-next 09/22] net-next/hinic: Add Rx mode and link event handler

2017-08-21 Thread Aviad Krawczyk
Add port management message for setting Rx mode in the card, used for rx_mode netdev operation. The link event handler is used for getting a notification about the link state. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 17

[PATCH V8 net-next 12/22] net-next/hinic: Add qp resources

2017-08-21 Thread Aviad Krawczyk
Create the resources for queue pair operations: doorbell area, consumer index address and producer index address. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +-

[PATCH V8 net-next 12/22] net-next/hinic: Add qp resources

2017-08-21 Thread Aviad Krawczyk
Create the resources for queue pair operations: doorbell area, consumer index address and producer index address. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 1

[PATCH V8 net-next 10/22] net-next/hinic: Add logical Txq and Rxq

2017-08-21 Thread Aviad Krawczyk
Create the logical queues of the nic. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_dev.h| 5 + drivers/net/eth

[PATCH V8 net-next 10/22] net-next/hinic: Add logical Txq and Rxq

2017-08-21 Thread Aviad Krawczyk
Create the logical queues of the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_dev.h| 5 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 131

[PATCH V8 net-next 13/22] net-next/hinic: Set qp context

2017-08-21 Thread Aviad Krawczyk
Update the nic about the resources of the queue pairs. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_comm

[PATCH V8 net-next 13/22] net-next/hinic: Set qp context

2017-08-21 Thread Aviad Krawczyk
Update the nic about the resources of the queue pairs. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_common.c | 55 ++ drivers/net/ethernet/huawei/hinic/hinic_common.h

[PATCH V8 net-next 14/22] net-next/hinic: Initialize cmdq

2017-08-21 Thread Aviad Krawczyk
Create the work queues for cmdq and update the nic about the work queue contexts. cmdq commands are used for updating the nic about the qp contexts. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/

[PATCH V8 net-next 14/22] net-next/hinic: Initialize cmdq

2017-08-21 Thread Aviad Krawczyk
Create the work queues for cmdq and update the nic about the work queue contexts. cmdq commands are used for updating the nic about the qp contexts. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 282

[PATCH V8 net-next 17/22] net-next/hinic: Add cmdq completion handler

2017-08-21 Thread Aviad Krawczyk
Add cmdq completion handler for getting a notification about the completion of cmdq commands. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 297 +-

[PATCH V8 net-next 17/22] net-next/hinic: Add cmdq completion handler

2017-08-21 Thread Aviad Krawczyk
Add cmdq completion handler for getting a notification about the completion of cmdq commands. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 297 +- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 12 + 2

[PATCH V8 net-next 18/22] net-next/hinic: Add Rx handler

2017-08-21 Thread Aviad Krawczyk
Set the io resources in the nic and handle rx events by qp operations. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_

[PATCH V8 net-next 18/22] net-next/hinic: Add Rx handler

2017-08-21 Thread Aviad Krawczyk
Set the io resources in the nic and handle rx events by qp operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 1 + drivers/net/ethernet/huawei/hinic

[PATCH V8 net-next 15/22] net-next/hinic: Add ceqs

2017-08-21 Thread Aviad Krawczyk
Initialize the completion event queues and handle ceq events by calling the registered handlers. Used for cmdq command completion. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_hw_

[PATCH V8 net-next 15/22] net-next/hinic: Add ceqs

2017-08-21 Thread Aviad Krawczyk
Initialize the completion event queues and handle ceq events by calling the registered handlers. Used for cmdq command completion. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 16 ++ drivers/net/ethernet/huawei/hinic

[PATCH V8 net-next 16/22] net-next/hinic: Add cmdq commands

2017-08-21 Thread Aviad Krawczyk
Add cmdq commands for setting queue pair contexts in the nic. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_common.c | 25 ++ drivers/net/ethernet/huawei/hinic/hinic_com

[PATCH V8 net-next 16/22] net-next/hinic: Add cmdq commands

2017-08-21 Thread Aviad Krawczyk
Add cmdq commands for setting queue pair contexts in the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_common.c | 25 ++ drivers/net/ethernet/huawei/hinic/hinic_common.h | 9 + drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c

[PATCH V8 net-next 20/22] net-next/hinic: Add ethtool and stats

2017-08-21 Thread Aviad Krawczyk
Add ethtool operations and statistics operations. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 3 + drivers/net/ethernet/huawei/hinic/hinic_

[PATCH V8 net-next 20/22] net-next/hinic: Add ethtool and stats

2017-08-21 Thread Aviad Krawczyk
Add ethtool operations and statistics operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 3 + drivers/net/ethernet/huawei/hinic/hinic_main.c | 218 - drivers/net/ethernet/huawei/hinic/hinic_port.c

[PATCH V8 net-next 19/22] net-next/hinic: Add Tx operation

2017-08-21 Thread Aviad Krawczyk
Add transmit operation for sending data by qp operations. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_dev.h| 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 46

[PATCH V8 net-next 19/22] net-next/hinic: Add Tx operation

2017-08-21 Thread Aviad Krawczyk
Add transmit operation for sending data by qp operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_dev.h| 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 46 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 22

[PATCH V8 net-next 22/22] net-next/hinic: Add Maintainer

2017-08-21 Thread Aviad Krawczyk
Update MAINTAINERS file Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0e967b3..8f9ea9b 100644 --- a/MAINTAINERS +++ b

[PATCH V8 net-next 22/22] net-next/hinic: Add Maintainer

2017-08-21 Thread Aviad Krawczyk
Update MAINTAINERS file Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0e967b3..8f9ea9b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6240,6 +6240,13 @@ L: linux

[PATCH V8 net-next 21/22] net-next/hinic: Add netpoll

2017-08-21 Thread Aviad Krawczyk
Add more netdev operation - netpoll. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/net/eth

[PATCH V8 net-next 21/22] net-next/hinic: Add netpoll

2017-08-21 Thread Aviad Krawczyk
Add more netdev operation - netpoll. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei

[PATCH V8 net-next 11/22] net-next/hinic: Add wq

2017-08-21 Thread Aviad Krawczyk
Create work queues for being used by the queue pairs. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_common.h | 25 ++

[PATCH V8 net-next 11/22] net-next/hinic: Add wq

2017-08-21 Thread Aviad Krawczyk
Create work queues for being used by the queue pairs. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_common.h | 25 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_io.c | 69

[PATCH V8 net-next 02/22] net-next/hinic: Initialize hw device components

2017-08-21 Thread Aviad Krawczyk
Initialize hw device by calling the initialization functions of aeqs and management channel. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile| 3 +- drivers/net/ethernet/

[PATCH V8 net-next 02/22] net-next/hinic: Initialize hw device components

2017-08-21 Thread Aviad Krawczyk
Initialize hw device by calling the initialization functions of aeqs and management channel. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile| 3 +- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 172

[PATCH V8 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-21 Thread Aviad Krawczyk
https://lkml.org/lkml/2017/7/12/375 4. seperate last patch by moving ops to a new patch - Andrew Lunn comment https://lkml.org/lkml/2017/7/12/377 Aviad Krawczyk (22): net-next/hinic: Initialize hw interface net-next/hinic: Initialize hw device components net-next/hinic: Initialize ap

[PATCH V8 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-21 Thread Aviad Krawczyk
https://lkml.org/lkml/2017/7/12/375 4. seperate last patch by moving ops to a new patch - Andrew Lunn comment https://lkml.org/lkml/2017/7/12/377 Aviad Krawczyk (22): net-next/hinic: Initialize hw interface net-next/hinic: Initialize hw device components net-next/hinic: Initialize ap

Re: [PATCH V5 net-next 01/21] net-next/hinic: Initialize hw interface

2017-08-20 Thread Aviad Krawczyk
We will remove all the casting from void *. Thanks On 8/18/2017 8:03 AM, David Miller wrote: > From: Stephen Hemminger <step...@networkplumber.org> > Date: Thu, 17 Aug 2017 17:45:40 -0700 > >> On Thu, 17 Aug 2017 19:52:42 +0800 >> Aviad Krawczyk <av

Re: [PATCH V5 net-next 01/21] net-next/hinic: Initialize hw interface

2017-08-20 Thread Aviad Krawczyk
We will remove all the casting from void *. Thanks On 8/18/2017 8:03 AM, David Miller wrote: > From: Stephen Hemminger > Date: Thu, 17 Aug 2017 17:45:40 -0700 > >> On Thu, 17 Aug 2017 19:52:42 +0800 >> Aviad Krawczyk wrote: >> >>> + nic_dev = (s

Re: [PATCH V7 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-20 Thread Aviad Krawczyk
Got it On 8/17/2017 10:33 PM, David Miller wrote: > > You've posted this series 3 times today. > > That's way too fast. > > You must wait at least one full day for more feedback to come > your way. > > If you just repsin your series for every little small change nobody is > going to perform a

Re: [PATCH V7 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-20 Thread Aviad Krawczyk
Got it On 8/17/2017 10:33 PM, David Miller wrote: > > You've posted this series 3 times today. > > That's way too fast. > > You must wait at least one full day for more feedback to come > your way. > > If you just repsin your series for every little small change nobody is > going to perform a

[PATCH V7 net-next 03/22] net-next/hinic: Initialize api cmd resources

2017-08-17 Thread Aviad Krawczyk
Initialize api cmd resources as part of management initialization. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- .../net/ethernet/huawei/hinic/hinic_hw_api_c

[PATCH V7 net-next 01/22] net-next/hinic: Initialize hw interface

2017-08-17 Thread Aviad Krawczyk
Initialize hw interface as part of the nic initialization for accessing hw. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- Documentation/networking/hinic.txt | 125 ++ drivers/net/ethe

[PATCH V7 net-next 03/22] net-next/hinic: Initialize api cmd resources

2017-08-17 Thread Aviad Krawczyk
Initialize api cmd resources as part of management initialization. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 446 + .../net/ethernet/huawei

[PATCH V7 net-next 01/22] net-next/hinic: Initialize hw interface

2017-08-17 Thread Aviad Krawczyk
Initialize hw interface as part of the nic initialization for accessing hw. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- Documentation/networking/hinic.txt | 125 ++ drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile

[PATCH V7 net-next 06/22] net-next/hinic: Add api cmd commands

2017-08-17 Thread Aviad Krawczyk
Add the api cmd commands for sending management messages to the nic. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 329 - .../net/ethernet/

[PATCH V7 net-next 06/22] net-next/hinic: Add api cmd commands

2017-08-17 Thread Aviad Krawczyk
Add the api cmd commands for sending management messages to the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 329 - .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 65 drivers/net/ethernet

[PATCH V7 net-next 07/22] net-next/hinic: Add aeqs

2017-08-17 Thread Aviad Krawczyk
Handle aeq elements that are accumulated on the aeq by calling the registered handler for the specific event. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 49 +++

[PATCH V7 net-next 07/22] net-next/hinic: Add aeqs

2017-08-17 Thread Aviad Krawczyk
Handle aeq elements that are accumulated on the aeq by calling the registered handler for the specific event. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 49 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c | 464

[PATCH V7 net-next 04/22] net-next/hinic: Initialize api cmd hw

2017-08-17 Thread Aviad Krawczyk
Update the hardware about api cmd resources and initialize it. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 173 - .../net/ethernet/

[PATCH V7 net-next 04/22] net-next/hinic: Initialize api cmd hw

2017-08-17 Thread Aviad Krawczyk
Update the hardware about api cmd resources and initialize it. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 173 - .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 38 + drivers/net/ethernet/huawei

[PATCH V7 net-next 08/22] net-next/hinic: Add port management commands

2017-08-17 Thread Aviad Krawczyk
Add the port management commands that are sent as management messages. The port management commands are used for netdev operations. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile

[PATCH V7 net-next 08/22] net-next/hinic: Add port management commands

2017-08-17 Thread Aviad Krawczyk
Add the port management commands that are sent as management messages. The port management commands are used for netdev operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic

[PATCH V7 net-next 13/22] net-next/hinic: Set qp context

2017-08-17 Thread Aviad Krawczyk
Update the nic about the resources of the queue pairs. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_comm

[PATCH V7 net-next 13/22] net-next/hinic: Set qp context

2017-08-17 Thread Aviad Krawczyk
Update the nic about the resources of the queue pairs. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_common.c | 55 ++ drivers/net/ethernet/huawei/hinic/hinic_common.h

[PATCH V7 net-next 14/22] net-next/hinic: Initialize cmdq

2017-08-17 Thread Aviad Krawczyk
Create the work queues for cmdq and update the nic about the work queue contexts. cmdq commands are used for updating the nic about the qp contexts. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/

[PATCH V7 net-next 14/22] net-next/hinic: Initialize cmdq

2017-08-17 Thread Aviad Krawczyk
Create the work queues for cmdq and update the nic about the work queue contexts. cmdq commands are used for updating the nic about the qp contexts. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 282

[PATCH V7 net-next 12/22] net-next/hinic: Add qp resources

2017-08-17 Thread Aviad Krawczyk
Create the resources for queue pair operations: doorbell area, consumer index address and producer index address. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +-

[PATCH V7 net-next 12/22] net-next/hinic: Add qp resources

2017-08-17 Thread Aviad Krawczyk
Create the resources for queue pair operations: doorbell area, consumer index address and producer index address. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 1

[PATCH V7 net-next 09/22] net-next/hinic: Add Rx mode and link event handler

2017-08-17 Thread Aviad Krawczyk
Add port management message for setting Rx mode in the card, used for rx_mode netdev operation. The link event handler is used for getting a notification about the link state. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com>

[PATCH V7 net-next 09/22] net-next/hinic: Add Rx mode and link event handler

2017-08-17 Thread Aviad Krawczyk
Add port management message for setting Rx mode in the card, used for rx_mode netdev operation. The link event handler is used for getting a notification about the link state. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 17

[PATCH V7 net-next 10/22] net-next/hinic: Add logical Txq and Rxq

2017-08-17 Thread Aviad Krawczyk
Create the logical queues of the nic. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_dev.h| 5 + drivers/net/eth

[PATCH V7 net-next 10/22] net-next/hinic: Add logical Txq and Rxq

2017-08-17 Thread Aviad Krawczyk
Create the logical queues of the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_dev.h| 5 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 131

[PATCH V7 net-next 17/22] net-next/hinic: Add cmdq completion handler

2017-08-17 Thread Aviad Krawczyk
Add cmdq completion handler for getting a notification about the completion of cmdq commands. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 297 +-

[PATCH V7 net-next 17/22] net-next/hinic: Add cmdq completion handler

2017-08-17 Thread Aviad Krawczyk
Add cmdq completion handler for getting a notification about the completion of cmdq commands. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 297 +- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 12 + 2

[PATCH V7 net-next 16/22] net-next/hinic: Add cmdq commands

2017-08-17 Thread Aviad Krawczyk
Add cmdq commands for setting queue pair contexts in the nic. Signed-off-by: Aviad Krawczyk <aviad.krawc...@huawei.com> Signed-off-by: Zhao Chen <zhaoch...@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_common.c | 25 ++ drivers/net/ethernet/huawei/hinic/hinic_com

[PATCH V7 net-next 16/22] net-next/hinic: Add cmdq commands

2017-08-17 Thread Aviad Krawczyk
Add cmdq commands for setting queue pair contexts in the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_common.c | 25 ++ drivers/net/ethernet/huawei/hinic/hinic_common.h | 9 + drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c

  1   2   3   4   5   >