Re: [PATCH v3 0/8] nic: thunderx: fix communication races between VF & PF

2019-02-20 Thread Vadim Lomovtsev
sorry for occasionally reply to old thread. On Wed, Feb 20, 2019 at 11:02:42AM +, Vadim Lomovtsev wrote: > The ThunderX CN88XX NIC Virtual Function driver uses mailbox interface > to communicate to physical function driver. Each of VF has it's own pair > of mailbox registers to

[PATCH v3 2/8] net: thunderx: replace global nicvf_rx_mode_wq work queue for all VFs to private for each of them.

2019-02-20 Thread Vadim Lomovtsev
one work queue for each NIC VF for set_rx_mode task and to let them work independently and replacing delayed_work with work_struct. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h | 4 ++- .../net/ethernet/cavium/thunder/nicvf_main.c | 30 ++- 2

[PATCH v3 5/8] net: thunderx: rework xcast message structure to make it fit into 64 bit

2019-02-20 Thread Vadim Lomovtsev
To communicate to PF each of ThunderX NIC VF uses mailbox which is pair of 64 bit registers available to both VFn and PF. This commit is to change the xcast message structure in order to fit it into 64 bit. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h| 6

[PATCH v3 8/8] net: thunderx: remove link change polling code and info from nicpf

2019-02-20 Thread Vadim Lomovtsev
-off-by: Vadim Lomovtsev --- .../net/ethernet/cavium/thunder/nic_main.c| 114 ++ 1 file changed, 12 insertions(+), 102 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c index 8ab71dae3988..c90252829ed3 10

[PATCH v3 0/8] nic: thunderx: fix communication races between VF & PF

2019-02-20 Thread Vadim Lomovtsev
e return type of nicvf_send_cfg_done() function from int to void; - 0007: update subject and remove unused variable 'netdev' from nicvf_link_status_check_task() function; Vadim Lomovtsev (8): net: thunderx: correct typo in macro name net: thunderx: replace global nicvf_rx_mode_wq work queu

[PATCH v3 6/8] net: thunderx: add mutex to protect mailbox from concurrent calls for same VF

2019-02-20 Thread Vadim Lomovtsev
messaging control data from concurrent access. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h| 2 ++ drivers/net/ethernet/cavium/thunder/nicvf_main.c | 13 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium

[PATCH v3 7/8] net: thunderx: move link state polling function to VF

2019-02-20 Thread Vadim Lomovtsev
Move the link change polling task to VF side in order to prevent races between VF and PF while sending link change message(s). This commit is to implement link change request to be initiated by VF. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h | 2 +- .../net

[PATCH v3 4/8] net: thunderx: add nicvf_send_msg_to_pf result check for set_rx_mode_task

2019-02-20 Thread Vadim Lomovtsev
The rx_set_mode invokes number of messages to be send to PF for receive mode configuration. In case if there any issues we need to stop sending messages and release allocated memory. This commit is to implement check of nicvf_msg_send_to_pf() result. Signed-off-by: Vadim Lomovtsev --- drivers

[PATCH v3 3/8] net: thunderx: make CFG_DONE message to run through generic send-ack sequence

2019-02-20 Thread Vadim Lomovtsev
nicvf_send_msg_to_pf() routine. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 15 --- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c

[PATCH v3 1/8] net: thunderx: correct typo in macro name

2019-02-20 Thread Vadim Lomovtsev
Correct STREERING to STEERING at macro name for BGX steering register. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

Re: [EXT] Re: [PATCH v2 3/8] net: thunderx: make CFG_DONE message to run through generic send-ack sequence

2019-02-19 Thread Vadim Lomovtsev
Hi David, On Mon, Feb 18, 2019 at 03:33:10PM -0800, David Miller wrote: > From: Vadim Lomovtsev > Date: Mon, 18 Feb 2019 09:52:14 + > > > @@ -169,6 +169,20 @@ static int nicvf_check_pf_ready(struct nicvf *nic) > > return 1; > > } > > > > +stat

[PATCH v2 1/8] net: thunderx: correct typo in macro name

2019-02-18 Thread Vadim Lomovtsev
Correct STREERING to STEERING at macro name for BGX steering register. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v2 0/8] nic: thunderx: fix communication races between VF & PF

2019-02-18 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The ThunderX CN88XX NIC Virtual Function driver uses mailbox interface to communicate to physical function driver. Each of VF has it's own pair of mailbox registers to read from and write to. The mailbox registers has no protection from possible races, so it has

[PATCH v2 4/8] net: thunderx: add nicvf_send_msg_to_pf result check for set_rx_mode_task

2019-02-18 Thread Vadim Lomovtsev
The rx_set_mode invokes number of messages to be send to PF for receive mode configuration. In case if there any issues we need to stop sending messages and release allocated memory. This commit is to implement check of nicvf_msg_send_to_pf() result. Signed-off-by: Vadim Lomovtsev --- drivers

[PATCH v2 8/8] net: thunderx: remove link change polling code and info from nicpf

2019-02-18 Thread Vadim Lomovtsev
-off-by: Vadim Lomovtsev --- .../net/ethernet/cavium/thunder/nic_main.c| 114 ++ 1 file changed, 12 insertions(+), 102 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c index 8ab71dae3988..c90252829ed3 10

[PATCH v2 2/8] net: thunderx: replace global nicvf_rx_mode_wq work queue for all VFs to private for each of them.

2019-02-18 Thread Vadim Lomovtsev
one work queue for each NIC VF for set_rx_mode task and to let them work independently and replacing delayed_work with work_struct. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h | 4 ++- .../net/ethernet/cavium/thunder/nicvf_main.c | 30 ++- 2

[PATCH v2 5/8] net: thunderx: rework xcast message structure to make it fit into 64 bit

2019-02-18 Thread Vadim Lomovtsev
To communicate to PF each of ThunderX NIC VF uses mailbox which is pair of 64 bit registers available to both VFn and PF. This commit is to change the xcast message structure in order to fit it into 64 bit. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h| 6

[PATCH v2 3/8] net: thunderx: make CFG_DONE message to run through generic send-ack sequence

2019-02-18 Thread Vadim Lomovtsev
nicvf_send_msg_to_pf() routine. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +- .../net/ethernet/cavium/thunder/nicvf_main.c | 18 +++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b

[PATCH v2 7/8] net: thunderx: add LINK_CHANGE message handler at nicpf

2019-02-18 Thread Vadim Lomovtsev
Move the link change polling task to VF side in order to prevent races between VF and PF while sending link change message(s). This commit is to implement link change request to be initiated by VF. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h | 2 +- .../net

[PATCH v2 6/8] net: thunderx: add mutex to protect mailbox from concurrent calls for same VF

2019-02-18 Thread Vadim Lomovtsev
messaging control data from concurrent access. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h| 2 ++ drivers/net/ethernet/cavium/thunder/nicvf_main.c | 13 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium

Re: [PATCH 0/8] nic: thunderx: fix communication races betwen VF & PF

2019-02-06 Thread Vadim Lomovtsev
self-NACK here, some emails get's corrupted for some reasons, along with some typos found. sorry for inconvenience. Vadim On Wed, Feb 06, 2019 at 10:13:54AM +, Vadim Lomovtsev wrote: > The ThunderX CN88XX NIC Virtual Function driver uses mailbox interface > to communicate to ph

[PATCH 4/8] net: thunderx: add nicvf_send_msg_to_pf result check for set_rx_mode_task

2019-02-06 Thread Vadim Lomovtsev
The rx_set_mode invokes number of messages to be send to PF for receive mode configuration. In case if there any issues we need to stop sending messages and release allocated memory. This commit is to implement check of nicvf_msg_send_to_pf() result. Signed-off-by: Vadim Lomovtsev --- drivers

[PATCH 2/8] net: thunderx: replace global nicvf_rx_mode_wq work queue for all VFs to private for each of them.

2019-02-06 Thread Vadim Lomovtsev
one work queue for each NIC VF for set_rx_mode task and to let them work independently and replacing delayed_work with work_struct. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h | 4 ++- .../net/ethernet/cavium/thunder/nicvf_main.c | 30 ++- 2

[PATCH 5/8] net: thunderx: rework xcast message structure to make it fit into 64 bit

2019-02-06 Thread Vadim Lomovtsev
To communicate to PF each of ThunderX NIC VF uses mailbox which is pair of 64 bit registers available to both VFn and PF. This commit is to change the xcast message structure in order to fit it into 64 bit. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h| 6

[PATCH 7/8] net: thunderx: implement helpers to read mailbox IRQ status

2019-02-06 Thread Vadim Lomovtsev
This commit is to implement routines to read mailbox IRQ status for particular VF at PF side, and for mailbox IRQ status from PF at VF side. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic_main.c | 13 + drivers/net/ethernet/cavium/thunder

[PATCH 1/8] net: thunderx: correct typo in macro name

2019-02-06 Thread Vadim Lomovtsev
Correct STREERING to STEERING at macro name for BGX steering register. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 3/8] net: thunderx: make CFG_DONE message to run through generic send-ack sequence

2019-02-06 Thread Vadim Lomovtsev
nicvf_send_msg_to_pf() routine. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +- .../net/ethernet/cavium/thunder/nicvf_main.c | 18 +++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b

[PATCH 0/8] nic: thunderx: fix communication races betwen VF & PF

2019-02-06 Thread Vadim Lomovtsev
. This patch series is to address race condition with VF & PF communication. Vadim Lomovtsev (8): net: thunderx: correct typo in macro name net: thunderx: replace global nicvf_rx_mode_wq work queue for all VFs to private for each of them. net: thunderx: make CFG_DONE message to run through gen

[PATCH 8/8] net: thunderx: check status of mailbox IRQ before sending a message

2019-02-06 Thread Vadim Lomovtsev
VF. Signed-off-by: Vadim Lomovtsev --- .../net/ethernet/cavium/thunder/nic_main.c| 39 --- .../net/ethernet/cavium/thunder/nicvf_main.c | 3 ++ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net

[PATCH 6/8] net: thunderx: add mutex to protect mailbox from concurrent calls for same VF

2019-02-06 Thread Vadim Lomovtsev
messaging control data from concurrent access. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h| 2 ++ drivers/net/ethernet/cavium/thunder/nicvf_main.c | 13 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium

[PATCH v5] net: thunderx: rework mac addresses list to u64 array

2018-04-09 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put singl

[PATCH v5] net: thunderx: rework mac addresses list to u64 array

2018-04-09 Thread Vadim Lomovtsev
From: Vadim Lomovtsev It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put single null check on kmalloc return value

Re: [PATCH v4] net: thunderx: rework mac addresses list to u64 array

2018-04-09 Thread Vadim Lomovtsev
On Sun, Apr 08, 2018 at 12:42:00PM -0400, David Miller wrote: > From: Vadim Lomovtsev <vadim.lomovt...@caviumnetworks.com> > Date: Fri, 6 Apr 2018 12:53:54 -0700 > > > @@ -1929,7 +1929,7 @@ static void nicvf_set_rx_mode_task(struct work_

Re: [PATCH v4] net: thunderx: rework mac addresses list to u64 array

2018-04-09 Thread Vadim Lomovtsev
On Sun, Apr 08, 2018 at 12:42:00PM -0400, David Miller wrote: > From: Vadim Lomovtsev > Date: Fri, 6 Apr 2018 12:53:54 -0700 > > > @@ -1929,7 +1929,7 @@ static void nicvf_set_rx_mode_task(struct work_struct > > *work_arg) > >

Re: [Question] patch posting process

2018-04-06 Thread Vadim Lomovtsev
Hi Willy, Thank you for your opinion, it's very helpful. WBR, Vadim On Fri, Apr 06, 2018 at 09:21:46PM +0200, Willy Tarreau wrote: > Hi Vadim, > > On Fri, Apr 06, 2018 at 11:29:16AM -0700, Vadim Lomovtsev wrote: > > Hi all, > > > > I bring my Apol

Re: [Question] patch posting process

2018-04-06 Thread Vadim Lomovtsev
Hi Willy, Thank you for your opinion, it's very helpful. WBR, Vadim On Fri, Apr 06, 2018 at 09:21:46PM +0200, Willy Tarreau wrote: > Hi Vadim, > > On Fri, Apr 06, 2018 at 11:29:16AM -0700, Vadim Lomovtsev wrote: > > Hi all, > > > > I bring my Apol

[PATCH v4] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put singl

[PATCH v4] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
From: Vadim Lomovtsev It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put single null check on kmalloc return value

[Question] patch posting process

2018-04-06 Thread Vadim Lomovtsev
Hi all, I bring my Apologise for wasting your time, but .. May I ask for some clarification.. When we're speaking of 'posting patches shortly' does it mean to send them in next few hours ? Or would it be more acceptable to post one version per day even for very small changes in between ?

[Question] patch posting process

2018-04-06 Thread Vadim Lomovtsev
Hi all, I bring my Apologise for wasting your time, but .. May I ask for some clarification.. When we're speaking of 'posting patches shortly' does it mean to send them in next few hours ? Or would it be more acceptable to post one version per day even for very small changes in between ?

Re: [PATCH v3] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
Self-NACK here, because of https://lkml.org/lkml/2018/4/6/724 Sorry for noise. Vadim On Fri, Apr 06, 2018 at 07:04:43AM -0700, Vadim Lomovtsev wrote: > From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> > > It is too expensive to pass u64 values via linked list, instead &

Re: [PATCH v3] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
Self-NACK here, because of https://lkml.org/lkml/2018/4/6/724 Sorry for noise. Vadim On Fri, Apr 06, 2018 at 07:04:43AM -0700, Vadim Lomovtsev wrote: > From: Vadim Lomovtsev > > It is too expensive to pass u64 values via linked list, instead > allocate array for them by overall n

Re: [PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
On Fri, Apr 06, 2018 at 11:06:03AM -0400, David Miller wrote: > From: Vadim Lomovtsev <vadim.lomovt...@caviumnetworks.com> > Date: Fri, 6 Apr 2018 04:14:25 -0700 > > > diff --git a/drivers/net/ethernet/cavium/thunder/nic.h > > b/drivers/net/ethernet/cavium/thunder/n

Re: [PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
On Fri, Apr 06, 2018 at 11:06:03AM -0400, David Miller wrote: > From: Vadim Lomovtsev > Date: Fri, 6 Apr 2018 04:14:25 -0700 > > > diff --git a/drivers/net/ethernet/cavium/thunder/nic.h > > b/drivers/net/ethernet/cavium/thunder/nic.h > > index 5fc46c

[PATCH v3] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put singl

[PATCH v3] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
From: Vadim Lomovtsev It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put single null check on kmalloc return value

Re: [PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
Hi Robin, On Fri, Apr 06, 2018 at 12:48:40PM +0100, Robin Murphy wrote: > On 06/04/18 12:14, Vadim Lomovtsev wrote: > > From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> > > > > It is too expensive to pass u64 values via linked list, instead > > allocate array

Re: [PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
Hi Robin, On Fri, Apr 06, 2018 at 12:48:40PM +0100, Robin Murphy wrote: > On 06/04/18 12:14, Vadim Lomovtsev wrote: > > From: Vadim Lomovtsev > > > > It is too expensive to pass u64 values via linked list, instead > > allocate array for them by overall number o

Re: [PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
On Fri, Apr 06, 2018 at 06:47:26AM -0500, Gustavo A. R. Silva wrote: > > > On 04/06/2018 06:43 AM, Vadim Lomovtsev wrote: > > Hi Gustavo, > > > > On Fri, Apr 06, 2018 at 06:36:28AM -0500, Gustavo A. R. Silva wrote: > > > Hi Vadim, > > > > &

Re: [PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
On Fri, Apr 06, 2018 at 06:47:26AM -0500, Gustavo A. R. Silva wrote: > > > On 04/06/2018 06:43 AM, Vadim Lomovtsev wrote: > > Hi Gustavo, > > > > On Fri, Apr 06, 2018 at 06:36:28AM -0500, Gustavo A. R. Silva wrote: > > > Hi Vadim, > > > > &

Re: [PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
Hi Gustavo, On Fri, Apr 06, 2018 at 06:36:28AM -0500, Gustavo A. R. Silva wrote: > Hi Vadim, > > On 04/06/2018 06:14 AM, Vadim Lomovtsev wrote: > > From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> > > > > It is too expensive to pass u64 values via linked

Re: [PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
Hi Gustavo, On Fri, Apr 06, 2018 at 06:36:28AM -0500, Gustavo A. R. Silva wrote: > Hi Vadim, > > On 04/06/2018 06:14 AM, Vadim Lomovtsev wrote: > > From: Vadim Lomovtsev > > > > It is too expensive to pass u64 values via linked list, instead > > allocate array

[PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put singl

[PATCH v2] net: thunderx: rework mac addresses list to u64 array

2018-04-06 Thread Vadim Lomovtsev
From: Vadim Lomovtsev It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put single null check on kmalloc return value

Re: [PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Vadim Lomovtsev
Hi Christoph, Thank you for your feedback and time. On Thu, Apr 05, 2018 at 08:07:48AM -0700, Christoph Hellwig wrote: > > struct xcast_addr_list { > > - struct list_head list; > > int count; > > + u64 mc[0]; > > Please use the standard C99 syntax here: > >

Re: [PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Vadim Lomovtsev
Hi Christoph, Thank you for your feedback and time. On Thu, Apr 05, 2018 at 08:07:48AM -0700, Christoph Hellwig wrote: > > struct xcast_addr_list { > > - struct list_head list; > > int count; > > + u64 mc[0]; > > Please use the standard C99 syntax here: > >

Re: [PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Vadim Lomovtsev
[correct Roberts' address] On Thu, Apr 05, 2018 at 07:57:56AM -0700, Vadim Lomovtsev wrote: > From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> > > It is too expensive to pass u64 values via linked list, instead > allocate array for them by overall number of mac add

Re: [PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Vadim Lomovtsev
[correct Roberts' address] On Thu, Apr 05, 2018 at 07:57:56AM -0700, Vadim Lomovtsev wrote: > From: Vadim Lomovtsev > > It is too expensive to pass u64 values via linked list, instead > allocate array for them by overall number of mac addresses from netdev. > > This eventuall

[PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put singl

[PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Vadim Lomovtsev
From: Vadim Lomovtsev It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put single null check on kmalloc return value

Re: [v2] net: thunderx: nicvf_main: Fix potential NULL pointer dereferences

2018-04-05 Thread Vadim Lomovtsev
Hi guys, Please give me couple days to workout solution for this. I'll post patch for this as soon as I done with my testing. WBR, Vadim On Tue, Apr 03, 2018 at 05:04:23PM -0500, Gustavo A. R. Silva wrote: > Add null check on kmalloc() return value in order to prevent > a null pointer

Re: [v2] net: thunderx: nicvf_main: Fix potential NULL pointer dereferences

2018-04-05 Thread Vadim Lomovtsev
Hi guys, Please give me couple days to workout solution for this. I'll post patch for this as soon as I done with my testing. WBR, Vadim On Tue, Apr 03, 2018 at 05:04:23PM -0500, Gustavo A. R. Silva wrote: > Add null check on kmalloc() return value in order to prevent > a null pointer

Re: [PATCH v2 0/7] net: thunderx: implement DMAC filtering support

2018-04-02 Thread Vadim Lomovtsev
On Sat, Mar 31, 2018 at 10:07:30PM -0400, David Miller wrote: > From: Vadim Lomovtsev <vadim.lomovt...@caviumnetworks.com> > Date: Fri, 30 Mar 2018 04:59:46 -0700 > > > From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> > > > > By default CN88XX BGX accep

Re: [PATCH v2 0/7] net: thunderx: implement DMAC filtering support

2018-04-02 Thread Vadim Lomovtsev
On Sat, Mar 31, 2018 at 10:07:30PM -0400, David Miller wrote: > From: Vadim Lomovtsev > Date: Fri, 30 Mar 2018 04:59:46 -0700 > > > From: Vadim Lomovtsev > > > > By default CN88XX BGX accepts all incoming multicast and broadcast > > packets and filtering is

[PATCH v2 1/7] net: thunderx: move filter register related macro into proper place

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The ThunderX NIC has set of registers which allows to configure filter policy for ingress packets. There are three possible regimes of filtering multicasts, broadcasts and unicasts: accept all, reject all and accept filter allowed only. C

[PATCH v2 1/7] net: thunderx: move filter register related macro into proper place

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The ThunderX NIC has set of registers which allows to configure filter policy for ingress packets. There are three possible regimes of filtering multicasts, broadcasts and unicasts: accept all, reject all and accept filter allowed only. Current implementation has enum

[PATCH v2 2/7] net: thunderx: add MAC address filter tracking for LMAC

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The ThunderX NIC has two Ethernet Interfaces (BGX) each of them could has up to four Logical MACs configured. Each of BGX has 32 filters to be configured for filtering ingress packets. The number of filters available to particular LMAC is

[PATCH v2 2/7] net: thunderx: add MAC address filter tracking for LMAC

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The ThunderX NIC has two Ethernet Interfaces (BGX) each of them could has up to four Logical MACs configured. Each of BGX has 32 filters to be configured for filtering ingress packets. The number of filters available to particular LMAC is from 8 (if we have four LMACs

[PATCH v2 4/7] net: thunderx: add new messages for handle ndo_set_rx_mode callback

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The kernel calls ndo_set_rx_mode() callback supplying it will all necessary info, such as device state flags, multicast mac addresses list and so on. Since we have only 128 bits to communicate with PF we need to initiate several requests

[PATCH v2 4/7] net: thunderx: add new messages for handle ndo_set_rx_mode callback

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The kernel calls ndo_set_rx_mode() callback supplying it will all necessary info, such as device state flags, multicast mac addresses list and so on. Since we have only 128 bits to communicate with PF we need to initiate several requests to PF with small/short operation

[PATCH v2 5/7] net: thunderx: add XCAST messages handlers for PF

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> This commit is to add message handling for ndo_set_rx_mode() callback at PF side. Signed-off-by: Vadim Lomovtsev <vadim.lomovt...@cavium.com> --- drivers/net/ethernet/cavium/thunder/nic_main.c | 45 +++--- 1 file

[PATCH v2 5/7] net: thunderx: add XCAST messages handlers for PF

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev This commit is to add message handling for ndo_set_rx_mode() callback at PF side. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic_main.c | 45 +++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/drivers/net

[PATCH v2 7/7] net: thunderx: add ndo_set_rx_mode callback implementation for VF

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The ndo_set_rx_mode() is called from atomic context which causes messages response timeouts while VF to PF communication via MSIx. To get rid of that we're copy passed mc list, parse flags and queue handling of kernel request to ordered wor

[PATCH v2 7/7] net: thunderx: add ndo_set_rx_mode callback implementation for VF

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The ndo_set_rx_mode() is called from atomic context which causes messages response timeouts while VF to PF communication via MSIx. To get rid of that we're copy passed mc list, parse flags and queue handling of kernel request to ordered workqueue. Signed-off-by: Vadim

[PATCH v2 6/7] net: thunderx: add workqueue control structures for handle ndo_set_rx_mode request

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The kernel calls ndo_set_rx_mode() callback from atomic context which causes messaging timeouts between VF and PF (as they’re implemented via MSIx). So in order to handle ndo_set_rx_mode() we need to get rid of it. This commit impl

[PATCH v2 6/7] net: thunderx: add workqueue control structures for handle ndo_set_rx_mode request

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The kernel calls ndo_set_rx_mode() callback from atomic context which causes messaging timeouts between VF and PF (as they’re implemented via MSIx). So in order to handle ndo_set_rx_mode() we need to get rid of it. This commit implements necessary workqueue related

[PATCH v2 0/7] net: thunderx: implement DMAC filtering support

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> By default CN88XX BGX accepts all incoming multicast and broadcast packets and filtering is disabled. The nic driver doesn't provide an ability to change such behaviour. This series is to implement DMAC filtering management for CN88XX nic

[PATCH v2 3/7] net: thunderx: add multicast filter management support

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The ThunderX NIC could be partitioned to up to 128 VFs and thus represented to system. Each VF is mapped to pair BGX:LMAC, and each of VF is configured by kernel individually. Eventually the bunch of VFs could be mapped onto same pair BG

[PATCH v2 0/7] net: thunderx: implement DMAC filtering support

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev By default CN88XX BGX accepts all incoming multicast and broadcast packets and filtering is disabled. The nic driver doesn't provide an ability to change such behaviour. This series is to implement DMAC filtering management for CN88XX nic driver allowing user to enable

[PATCH v2 3/7] net: thunderx: add multicast filter management support

2018-03-30 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The ThunderX NIC could be partitioned to up to 128 VFs and thus represented to system. Each VF is mapped to pair BGX:LMAC, and each of VF is configured by kernel individually. Eventually the bunch of VFs could be mapped onto same pair BGX:LMAC and thus could cause several

Re: [PATCH 0/7] net: thunderx: implement DMAC filtering support

2018-03-28 Thread Vadim Lomovtsev
Hi David, Thanks for feedback. On Tue, Mar 27, 2018 at 01:28:22PM -0400, David Miller wrote: > From: Vadim Lomovtsev <vadim.lomovt...@caviumnetworks.com> > Date: Tue, 27 Mar 2018 08:07:29 -0700 > > > From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> > > >

Re: [PATCH 0/7] net: thunderx: implement DMAC filtering support

2018-03-28 Thread Vadim Lomovtsev
Hi David, Thanks for feedback. On Tue, Mar 27, 2018 at 01:28:22PM -0400, David Miller wrote: > From: Vadim Lomovtsev > Date: Tue, 27 Mar 2018 08:07:29 -0700 > > > From: Vadim Lomovtsev > > > > By default CN88XX BGX accepts all incoming multicast and broadcas

[PATCH 2/7] net: thunderx: add MAC address filter tracking for LMAC

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The ThunderX NIC has two Ethernet Interfaces (BGX) each of them could has up to four Logical MACs configured. Each of BGX has 32 filters to be configured for filtering ingress packets. The number of filters available to particular LMAC is

[PATCH 2/7] net: thunderx: add MAC address filter tracking for LMAC

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The ThunderX NIC has two Ethernet Interfaces (BGX) each of them could has up to four Logical MACs configured. Each of BGX has 32 filters to be configured for filtering ingress packets. The number of filters available to particular LMAC is from 8 (if we have four LMACs

[PATCH 0/7] net: thunderx: implement DMAC filtering support

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> By default CN88XX BGX accepts all incoming multicast and broadcast packets and filtering is disabled. The nic driver doesn't provide an ability to change such behaviour. This series is to implement DMAC filtering management for CN88XX nic

[PATCH 0/7] net: thunderx: implement DMAC filtering support

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev By default CN88XX BGX accepts all incoming multicast and broadcast packets and filtering is disabled. The nic driver doesn't provide an ability to change such behaviour. This series is to implement DMAC filtering management for CN88XX nic driver allowing user to enable

[PATCH 3/7] net: thunderx: add multicast filter management support

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The ThunderX NIC could be partitioned to up to 128 VFs and thus represented to system. Each VF is mapped to pair BGX:LMAC, and each of VF is configured by kernel individually. Eventually the bunch of VFs could be mapped onto same pair BG

[PATCH 3/7] net: thunderx: add multicast filter management support

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The ThunderX NIC could be partitioned to up to 128 VFs and thus represented to system. Each VF is mapped to pair BGX:LMAC, and each of VF is configured by kernel individually. Eventually the bunch of VFs could be mapped onto same pair BGX:LMAC and thus could cause several

[PATCH 7/7] net: thunderx: add ndo_set_rx_mode callback implementation for VF

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The ndo_set_rx_mode() is called from atomic context which causes messages response timeouts while VF to PF communication via MSIx. To get rid of that we're copy passed mc list, parse flags and queue handling of kernel request to ordered wor

[PATCH 7/7] net: thunderx: add ndo_set_rx_mode callback implementation for VF

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The ndo_set_rx_mode() is called from atomic context which causes messages response timeouts while VF to PF communication via MSIx. To get rid of that we're copy passed mc list, parse flags and queue handling of kernel request to ordered workqueue. Signed-off-by: Vadim

[PATCH 6/7] net: thunderx: add workqueue control structures for handle ndo_set_rx_mode request

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The kernel calls ndo_set_rx_mode() callback from atomic context which causes messaging timeouts between VF and PF (as they’re implemented via MSIx). So in order to handle ndo_set_rx_mode() we need to get rid of it. This commit impl

[PATCH 6/7] net: thunderx: add workqueue control structures for handle ndo_set_rx_mode request

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The kernel calls ndo_set_rx_mode() callback from atomic context which causes messaging timeouts between VF and PF (as they’re implemented via MSIx). So in order to handle ndo_set_rx_mode() we need to get rid of it. This commit implements necessary workqueue related

[PATCH 5/7] net: thunderx: add XCAST messages handlers for PF

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> This commit is to add message handling for ndo_set_rx_mode() callback at PF side. Signed-off-by: Vadim Lomovtsev <vadim.lomovt...@cavium.com> --- drivers/net/ethernet/cavium/thunder/nic_main.c | 45 +++--- 1 file

[PATCH 5/7] net: thunderx: add XCAST messages handlers for PF

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev This commit is to add message handling for ndo_set_rx_mode() callback at PF side. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic_main.c | 45 +++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/drivers/net

[PATCH 1/7] net: thunderx: move filter register related macro into proper place

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The ThunderX NIC has set of registers which allows to configure filter policy for ingress packets. There are three possible regimes of filtering multicasts, broadcasts and unicasts: accept all, reject all and accept filter allowed only. C

[PATCH 4/7] net: thunderx: add new messages for handle ndo_set_rx_mode callback

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> The kernel calls ndo_set_rx_mode() callback supplying it will all necessary info, such as device state flags, multicast mac addresses list and so on. Since we have only 128 bits to communicate with PF we need to initiate several requests

[PATCH 1/7] net: thunderx: move filter register related macro into proper place

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The ThunderX NIC has set of registers which allows to configure filter policy for ingress packets. There are three possible regimes of filtering multicasts, broadcasts and unicasts: accept all, reject all and accept filter allowed only. Current implementation has enum

[PATCH 4/7] net: thunderx: add new messages for handle ndo_set_rx_mode callback

2018-03-27 Thread Vadim Lomovtsev
From: Vadim Lomovtsev The kernel calls ndo_set_rx_mode() callback supplying it will all necessary info, such as device state flags, multicast mac addresses list and so on. Since we have only 128 bits to communicate with PF we need to initiate several requests to PF with small/short operation

[PATCH v4] net: ethernet: cavium: Correct Cavium Thunderx NIC driver names accordingly to module name

2018-01-25 Thread Vadim Lomovtsev
From: Vadim Lomovtsev <vadim.lomovt...@cavium.com> It was found that ethtool provides unexisting module name while it queries the specified network device for associated driver information. Then user tries to unload that module by provided module name and fails. This happens because e

[PATCH v4] net: ethernet: cavium: Correct Cavium Thunderx NIC driver names accordingly to module name

2018-01-25 Thread Vadim Lomovtsev
From: Vadim Lomovtsev It was found that ethtool provides unexisting module name while it queries the specified network device for associated driver information. Then user tries to unload that module by provided module name and fails. This happens because ethtool reads value of DRV_NAME macro

  1   2   3   >