[PATCH v3 15/21] octeontx2-af: Teardown NPA, NIX LF upon receiving FLR

2018-11-19 Thread sunil . kovvuri
From: Geetha sowjanya Upon receiving FLR IRQ for a RVU PF, teardown or cleanup resources held by that PF_FUNC. This patch cleans up, NIX LF - Stop ingress/egress traffic - Disable NPC MCAM entries being used. - Free Tx scheduler queues - Disable RQ/SQ/CQ HW contexts NPA LF - Disable

[PATCH v3 12/21] octeontx2-af: Add support for stripping STAG/CTAG

2018-11-19 Thread sunil . kovvuri
From: Tomasz Duszynski This works by shadowing existing UCAST MCAM entry with a new one additionally matching either NPC_LT_LB_CTAG or NPC_LT_LB_STAG. For this to fully work one needs to send properly configured NIX_VTAG_CFG message afterwards i.e with strip and capture enabled and type set to

[PATCH v3 11/21] octeontx2-af: Support to enable/disable default MCAM entries

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham For a PF/VF with a NIXLF attached has default/reserved MCAM entries for receiving Ucast/Bcast/Promisc traffic. Ideally traffic should be forwarded to NIXLF only after it's contexts are initialized. This patch keeps these default entries disabled and adds mbox messages for a

[PATCH v3 19/21] octeontx2-af: Add FLR handling support for AF's VFs

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham Added support to handle FLR for AF's VFs (i.e LBK VFs). Just the FLR interrupt enable/disable, handler registration etc, actual HW resource cleanup or LFs teardown logic is already there. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/rvu.c |

[PATCH v3 13/21] octeontx2-af: Verify NPA/SSO/NIX PF_FUNC mapping

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham While mapping a NIX LF to a NPA LF attached PF_FUNC or SSO LF attached PF_FUNC, verify if PF_FUNC is valid and if that PF_FUNC has a LF of that block attached to it or not. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2 ++

[PATCH v3 20/21] octeontx2-af: Add interrupt handlers for Master Enable event

2018-11-19 Thread sunil . kovvuri
From: Linu Cherian - Add interrupt handlers for Master Enable events from PFs and Master Enable events from VFs of AF - Master Enable is required for the MSIX delivery to work - Master Enable bit trap handler doesn't have to do any anything other than clearing the TRPEND bit, since the

[PATCH v3 18/21] octeontx2-af: Configure AF VFs to talk over LBK channels

2018-11-19 Thread sunil . kovvuri
From: Tomasz Duszynski Configure AF VFs such that they are able to talk over consecutive loopback channels. If 8 VFs are attached to AF then communication will work as below: TX RX lbk0 -> lbk1 lbk1 -> lbk0 lbk2 -> lbk3 lbk3 -> lbk2 lbk4 -> lbk5 lbk5 -> lbk4 lbk6 -> lbk7 lbk7 -> lbk6

[PATCH v3 17/21] octeontx2-af: Enable sriov on AF to create VFs

2018-11-19 Thread sunil . kovvuri
From: Tomasz Duszynski Enable all AF VFs during probe. Since AF's VFs work in pairs (eg: Pkts sent on VF0 are received by VF1 and viceversa), enable only even number of VFs out of totalVFs, which should again be less than number of loopback (LBK) channels. Also enable VF's mailbox interrupts.

[PATCH v3 14/21] octeontx2-af: Add FLR interrupt handler

2018-11-19 Thread sunil . kovvuri
From: Geetha sowjanya RVU admin function (AF) has all the priviliges to cleanup HW state when VFIO triggers a PCIe function level reset (FLR) due to either reset or a VM crash. FLR for RVU PF1-PFn will trigger an IRQ to AF. This patch enables all RVU PF's FLR interrupts and registers a handler.

[PATCH v3 16/21] octeontx2-af: Mbox communication support btw AF and it's VFs

2018-11-19 Thread sunil . kovvuri
From: Tomasz Duszynski VFs attached to PFs other than AF can not communicate with AF directly. Instead they are supposed to first send message to the PF they are residing on and PF forwards it to the AF. Responses to messages are handled in the reverse order. On the other hand if VFs are on AF

[PATCH v3 21/21] octeontx2-af: Workarounds for HW errata

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham Errata 35038 Software sets NIX_AF_RX_SW_SYNC[ENA] to sync (flush) in-flight packets the RX data path before configuration changes (e.g. disabling one or more RQs). Hardware clears [ENA] to indicate sync is done An issue exists whereby NIX may clear NIX_AF_RX_SW_SYNC

[PATCH v3 10/21] octeontx2-af: Add MKEX default profile

2018-11-19 Thread sunil . kovvuri
From: Santosh Shukla Added basic default MKEX profile. This profile tells hardware what data to extract from packet and where to place it (bit offset) in final KEY generated for the parsed packet. Based on the bit placement of the packet data, MCAM entries have to programmed for matching. Also

[PATCH v3 09/21] octeontx2-af: Alloc and config NPC MCAM entry at a time

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham A new mailbox message is added to support allocating a MCAM entry along with a counter and configuring it in one go. This reduces the amount of mailbox communication involved in installing a new MCAM rule. Signed-off-by: Sunil Goutham ---

[PATCH v3 02/21] octeontx2-af: Support to modify min/max allowed packet lengths

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for RVU PF/VFs to modify min/max packet lengths allowed by HW. For VFs on PF0, settings will be automatically applied on LBK link. RX link's min/maxlen is configured to min/max of PF and it's all VFs. On the TX side if requested all SMQs attached to

[PATCH v3 01/21] octeontx2-af: Convert mbox handlers APIs to lowercase

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham This patch converts all mailbox message handler API names to lowercase. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.c | 2 +- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 73 --

[PATCH v3 06/21] octeontx2-af: MCAM entry installation support

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham Add support for a RVU PF/VF to enable, disable, configure and shuffle MCAM entries via mbox commands. This patch adds mailbox message formats and handling of these commands. As of now otherthan validating MCAM entry index, info like channel number e.t.c in MCAM config data

[PATCH v3 03/21] octeontx2-af: Support to get NIX HW constants from AF

2018-11-19 Thread sunil . kovvuri
From: Kiran Kumar This patch adds reading HW limits like number of Rx/Tx stats, number of queue IRQs supported per NIX LF from AF registers and sync them to PF/VF. Signed-off-by: Kiran Kumar Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h| 4

[PATCH v3 05/21] octeontx2-af: NPC MCAM entry alloc/free support

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham This patch adds NPC MCAM entry management and support for allocating and freeing them via mailbox. Both contiguous and non-contiguous allocations are supported. Incase of contiguous, if request cannot be met then max contiguous number of available entries are allocated. High

[PATCH v3 07/21] octeontx2-af: Support for NPC MCAM counters

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham NPC HW has counters which can be mapped to MCAM entries to gather entry match statistics. This patch adds support to allocate, free, clear and retrieve stats of NPC MCAM counters. New mailbox messages have been added for this. Similar to MCAM entries both contiguous and

[PATCH v3 08/21] octeontx2-af: Map or unmap NPC MCAM entry and counter

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham Alloc memory to save MCAM 'entry to counter' mapping and since multiple entries can map to same counter, added counter's reference count tracking. Do 'entry to counter' mapping when a entry is being installed and mbox msg sender requested to configure a counter as well.

[PATCH v3 04/21] octeontx2-af: Relax resource lock into mutex

2018-11-19 Thread sunil . kovvuri
From: Stanislaw Kardach Mailbox message handling is done in a workqueue context scheduled from interrupt handler. So resource locks does not need to be a spinlock. Therefore relax them into a mutex so that later on we may use them in routines that might sleep. Signed-off-by: Stanislaw Kardach

[PATCH v3 00/21] octeontx2-af: NPC MCAM support and FLR handling

2018-11-19 Thread sunil . kovvuri
From: Sunil Goutham This patchset is a continuation to earlier submitted three patch series to add a new driver for Marvell's OcteonTX2 SOC's Resource virtualization unit (RVU) admin function driver. 1. octeontx2-af: Add RVU Admin Function driver

Re: [PATCH v2 04/21] octeontx2-af: Relax resource lock into mutex

2018-11-17 Thread Sunil Kovvuri
On Sat, Nov 17, 2018 at 12:50 PM David Miller wrote: > > From: sunil.kovv...@gmail.com > Date: Thu, 15 Nov 2018 16:29:29 +0530 > > > From: Stanislaw Kardach > > > > The resource locks does not need to be a spinlock as they are not > > used in any interrupt handling routines (only in bottom

[PATCH v2 17/21] octeontx2-af: Enable sriov on AF to create VFs

2018-11-15 Thread sunil . kovvuri
From: Tomasz Duszynski Enable all AF VFs during probe. Since AF's VFs work in pairs (eg: Pkts sent on VF0 are received by VF1 and viceversa), enable only even number of VFs out of totalVFs, which should again be less than number of loopback (LBK) channels. Also enable VF's mailbox interrupts.

[PATCH v2 20/21] octeontx2-af: Add interrupt handlers for Master Enable event

2018-11-15 Thread sunil . kovvuri
From: Linu Cherian - Add interrupt handlers for Master Enable events from PFs and Master Enable events from VFs of AF - Master Enable is required for the MSIX delivery to work - Master Enable bit trap handler doesn't have to do any anything other than clearing the TRPEND bit, since the

[PATCH v2 21/21] octeontx2-af: Workarounds for HW errata

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham Errata 35038 Software sets NIX_AF_RX_SW_SYNC[ENA] to sync (flush) in-flight packets the RX data path before configuration changes (e.g. disabling one or more RQs). Hardware clears [ENA] to indicate sync is done An issue exists whereby NIX may clear NIX_AF_RX_SW_SYNC

[PATCH v2 15/21] octeontx2-af: Teardown NPA, NIX LF upon receiving FLR

2018-11-15 Thread sunil . kovvuri
From: Geetha sowjanya Upon receiving FLR IRQ for a RVU PF, teardown or cleanup resources held by that PF_FUNC. This patch cleans up, NIX LF - Stop ingress/egress traffic - Disable NPC MCAM entries being used. - Free Tx scheduler queues - Disable RQ/SQ/CQ HW contexts NPA LF - Disable

[PATCH v2 16/21] octeontx2-af: Mbox communication support btw AF and it's VFs

2018-11-15 Thread sunil . kovvuri
From: Tomasz Duszynski VFs attached to PFs other than AF can not communicate with AF directly. Instead they are supposed to first send message to the PF they are residing on and PF forwards it to the AF. Responses to messages are handled in the reverse order. On the other hand if VFs are on AF

[PATCH v2 19/21] octeontx2-af: Add FLR handling support for AF's VFs

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham Added support to handle FLR for AF's VFs (i.e LBK VFs). Just the FLR interrupt enable/disable, handler registration etc, actual HW resource cleanup or LFs teardown logic is already there. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/rvu.c |

[PATCH v2 07/21] octeontx2-af: Support for NPC MCAM counters

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham NPC HW has counters which can be mapped to MCAM entries to gather entry match statistics. This patch adds support to allocate, free, clear and retrieve stats of NPC MCAM counters. New mailbox messages have been added for this. Similar to MCAM entries both contiguous and

[PATCH v2 12/21] octeontx2-af: Add support for stripping STAG/CTAG

2018-11-15 Thread sunil . kovvuri
From: Tomasz Duszynski This works by shadowing existing UCAST MCAM entry with a new one additionally matching either NPC_LT_LB_CTAG or NPC_LT_LB_STAG. For this to fully work one needs to send properly configured NIX_VTAG_CFG message afterwards i.e with strip and capture enabled and type set to

[PATCH v2 18/21] octeontx2-af: Configure AF VFs to talk over LBK channels

2018-11-15 Thread sunil . kovvuri
From: Tomasz Duszynski Configure AF VFs such that they are able to talk over consecutive loopback channels. If 8 VFs are attached to AF then communication will work as below: TX RX lbk0 -> lbk1 lbk1 -> lbk0 lbk2 -> lbk3 lbk3 -> lbk2 lbk4 -> lbk5 lbk5 -> lbk4 lbk6 -> lbk7 lbk7 -> lbk6

[PATCH v2 09/21] octeontx2-af: Alloc and config NPC MCAM entry at a time

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham A new mailbox message is added to support allocating a MCAM entry along with a counter and configuring it in one go. This reduces the amount of mailbox communication involved in installing a new MCAM rule. Signed-off-by: Sunil Goutham ---

[PATCH v2 10/21] octeontx2-af: Add MKEX default profile

2018-11-15 Thread sunil . kovvuri
From: Santosh Shukla Added basic default MKEX profile. This profile tells hardware what data to extract from packet and where to place it (bit offset) in final KEY generated for the parsed packet. Based on the bit placement of the packet data, MCAM entries have to programmed for matching. Also

[PATCH v2 14/21] octeontx2-af: Add FLR interrupt handler

2018-11-15 Thread sunil . kovvuri
From: Geetha sowjanya RVU admin function (AF) has all the priviliges to cleanup HW state when VFIO triggers a PCIe function level reset (FLR) due to either reset or a VM crash. FLR for RVU PF1-PFn will trigger an IRQ to AF. This patch enables all RVU PF's FLR interrupts and registers a handler.

[PATCH v2 13/21] octeontx2-af: Verify NPA/SSO/NIX PF_FUNC mapping

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham While mapping a NIX LF to a NPA LF attached PF_FUNC or SSO LF attached PF_FUNC, verify if PF_FUNC is valid and if that PF_FUNC has a LF of that block attached to it or not. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2 ++

[PATCH v2 08/21] octeontx2-af: Map or unmap NPC MCAM entry and counter

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham Alloc memory to save MCAM 'entry to counter' mapping and since multiple entries can map to same counter, added counter's reference count tracking. Do 'entry to counter' mapping when a entry is being installed and mbox msg sender requested to configure a counter as well.

[PATCH v2 11/21] octeontx2-af: Support to enable/disable default MCAM entries

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham For a PF/VF with a NIXLF attached has default/reserved MCAM entries for receiving Ucast/Bcast/Promisc traffic. Ideally traffic should be forwarded to NIXLF only after it's contexts are initialized. This patch keeps these default entries disabled and adds mbox messages for a

[PATCH v2 04/21] octeontx2-af: Relax resource lock into mutex

2018-11-15 Thread sunil . kovvuri
From: Stanislaw Kardach The resource locks does not need to be a spinlock as they are not used in any interrupt handling routines (only in bottom halves). Therefore relax them into a mutex so that later on we may use them in routines that might sleep. Signed-off-by: Stanislaw Kardach

[PATCH v2 03/21] octeontx2-af: Support to get NIX HW constants from AF

2018-11-15 Thread sunil . kovvuri
From: Kiran Kumar This patch adds reading HW limits like number of Rx/Tx stats, number of queue IRQs supported per NIX LF from AF registers and sync them to PF/VF. Signed-off-by: Kiran Kumar Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h| 4

[PATCH v2 06/21] octeontx2-af: MCAM entry installation support

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham Add support for a RVU PF/VF to enable, disable, configure and shuffle MCAM entries via mbox commands. This patch adds mailbox message formats and handling of these commands. As of now otherthan validating MCAM entry index, info like channel number e.t.c in MCAM config data

[PATCH v2 05/21] octeontx2-af: NPC MCAM entry alloc/free support

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham This patch adds NPC MCAM entry management and support for allocating and freeing them via mailbox. Both contiguous and non-contiguous allocations are supported. Incase of contiguous, if request cannot be met then max contiguous number of available entries are allocated. High

[PATCH v2 01/21] octeontx2-af: Convert mbox handlers APIs to lowercase

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham This patch converts all mailbox message handler API names to lowercase. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.c | 2 +- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 73 --

[PATCH v2 00/21] octeontx2-af: NPC MCAM support and FLR handling

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham This patchset is a continuation to earlier submitted three patch series to add a new driver for Marvell's OcteonTX2 SOC's Resource virtualization unit (RVU) admin function driver. 1. octeontx2-af: Add RVU Admin Function driver

[PATCH v2 02/21] octeontx2-af: Support to modify min/max allowed packet lengths

2018-11-15 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for RVU PF/VFs to modify min/max packet lengths allowed by HW. For VFs on PF0, settings will be automatically applied on LBK link. RX link's min/maxlen is configured to min/max of PF and it's all VFs. On the TX side if requested all SMQs attached to

Re: [PATCH 08/20] octeontx2-af: Alloc and config NPC MCAM entry at a time

2018-11-12 Thread Sunil Kovvuri
On Sat, Nov 10, 2018 at 2:36 AM Arnd Bergmann wrote: > > On Fri, Nov 9, 2018 at 6:13 PM Sunil Kovvuri wrote: > > On Fri, Nov 9, 2018 at 4:32 PM Arnd Bergmann wrote: > > > On Fri, Nov 9, 2018 at 5:21 AM Sunil Kovvuri > > > wrote: > > > > > > >

Re: [PATCH 08/20] octeontx2-af: Alloc and config NPC MCAM entry at a time

2018-11-09 Thread Sunil Kovvuri
On Fri, Nov 9, 2018 at 4:32 PM Arnd Bergmann wrote: > > On Fri, Nov 9, 2018 at 5:21 AM Sunil Kovvuri wrote: > > > > On Fri, Nov 9, 2018 at 2:13 AM Arnd Bergmann wrote: > > > > > > On Thu, Nov 8, 2018 at 7:37 PM wrote: > > > > @@ -66

Re: [PATCH 11/20] octeontx2-af: Add support for stripping STAG/CTAG

2018-11-09 Thread Sunil Kovvuri
On Fri, Nov 9, 2018 at 4:42 PM Arnd Bergmann wrote: > > On Fri, Nov 9, 2018 at 5:29 AM Sunil Kovvuri wrote: > > On Fri, Nov 9, 2018 at 2:17 AM Arnd Bergmann wrote: > > > On Thu, Nov 8, 2018 at 7:37 PM wrote: > > > > > > > Here is another insta

Re: [PATCH 00/20] octeontx2-af: NPC MCAM support and FLR handling

2018-11-08 Thread Sunil Kovvuri
On Fri, Nov 9, 2018 at 2:32 AM Arnd Bergmann wrote: > > On Thu, Nov 8, 2018 at 7:36 PM wrote: > > > > From: Sunil Goutham > > Hmm, I noticed that you use a different address as the patch author > and the submitter. I'm guessing that "Sunil Goutham"

Re: [PATCH 11/20] octeontx2-af: Add support for stripping STAG/CTAG

2018-11-08 Thread Sunil Kovvuri
On Fri, Nov 9, 2018 at 2:17 AM Arnd Bergmann wrote: > > On Thu, Nov 8, 2018 at 7:37 PM wrote: > > > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/npc.h > > b/drivers/net/ethernet/marvell/octeontx2/af/npc.h > > index f98b011..3f7e5e6 100644 > > ---

Re: [PATCH 08/20] octeontx2-af: Alloc and config NPC MCAM entry at a time

2018-11-08 Thread Sunil Kovvuri
On Fri, Nov 9, 2018 at 2:13 AM Arnd Bergmann wrote: > > On Thu, Nov 8, 2018 at 7:37 PM wrote: > > @@ -666,4 +668,20 @@ struct npc_mcam_unmap_counter_req { > > u8 all; /* Unmap all entries using this counter ? */ > > }; > > > > +struct npc_mcam_alloc_and_write_entry_req { > > +

[PATCH 16/20] octeontx2-af: Enable sriov on AF to create VFs

2018-11-08 Thread sunil . kovvuri
From: Tomasz Duszynski Enable all AF VFs during probe. Since AF's VFs work in pairs (eg: Pkts sent on VF0 are received by VF1 and viceversa), enable only even number of VFs out of totalVFs, which should again be less than number of loopback (LBK) channels. Also enable VF's mailbox interrupts.

[PATCH 15/20] octeontx2-af: Mbox communication support btw AF and it's VFs

2018-11-08 Thread sunil . kovvuri
From: Tomasz Duszynski VFs attached to PFs other than AF can not communicate with AF directly. Instead they are supposed to first send message to the PF they are residing on and PF forwards it to the AF. Responses to messages are handled in the reverse order. On the other hand if VFs are on AF

[PATCH 17/20] octeontx2-af: Configure AF VFs to talk over LBK channels

2018-11-08 Thread sunil . kovvuri
From: Tomasz Duszynski Configure AF VFs such that they are able to talk over consecutive loopback channels. If 8 VFs are attached to AF then communication will work as below: TX RX lbk0 -> lbk1 lbk1 -> lbk0 lbk2 -> lbk3 lbk3 -> lbk2 lbk4 -> lbk5 lbk5 -> lbk4 lbk6 -> lbk7 lbk7 -> lbk6

[PATCH 14/20] octeontx2-af: Teardown NPA, NIX LF upon receiving FLR

2018-11-08 Thread sunil . kovvuri
From: Geetha sowjanya Upon receiving FLR IRQ for a RVU PF, teardown or cleanup resources held by that PF_FUNC. This patch cleans up, NIX LF - Stop ingress/egress traffic - Disable NPC MCAM entries being used. - Free Tx scheduler queues - Disable RQ/SQ/CQ HW contexts NPA LF - Disable

[PATCH 18/20] octeontx2-af: Add FLR handling support for AF's VFs

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham Added support to handle FLR for AF's VFs (i.e LBK VFs). Just the FLR interrupt enable/disable, handler registration etc, actual HW resource cleanup or LFs teardown logic is already there. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/rvu.c |

[PATCH 13/20] octeontx2-af: Add FLR interrupt handler

2018-11-08 Thread sunil . kovvuri
From: Geetha sowjanya All RVU PF's upon receiving a FLR will trigger an IRQ to RVU AF. This patch enables all RVU PF's FLR interrupt and registers a handler. Upon receiving an IRQ a workqueue is scheduled to cleanup all RVU blocks being used by the PF/VF which received the FLR. Signed-off-by:

[PATCH 20/20] octeontx2-af: Workarounds for HW errata

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham Errata 35038 Software sets NIX_AF_RX_SW_SYNC[ENA] to sync (flush) in-flight packets the RX data path before configuration changes (e.g. disabling one or more RQs). Hardware clears [ENA] to indicate sync is done An issue exists whereby NIX may clear NIX_AF_RX_SW_SYNC

[PATCH 19/20] octeontx2-af: Add interrupt handlers for Master Enable event

2018-11-08 Thread sunil . kovvuri
From: Linu Cherian - Add interrupt handlers for Master Enable events from PFs and Master Enable events from VFs of AF - Master Enable is required for the MSIX delivery to work - Master Enable bit trap handler doesn't have to do any anything other than clearing the TRPEND bit, since the

[PATCH 06/20] octeontx2-af: Support for NPC MCAM counters

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham NPC HW has counters which can be mapped to MCAM entries to gather entry match statistics. This patch adds support to allocate, free, clear and retrieve stats of NPC MCAM counters. New mailbox messages have been added for this. Similar to MCAM entries both contiguous and

[PATCH 12/20] octeontx2-af: Verify NPA/SSO/NIX PF_FUNC mapping

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham While mapping a NIX LF to a NPA LF attached PF_FUNC or SSO LF attached PF_FUNC, verify if PF_FUNC is valid and if that PF_FUNC has a LF of that block attached to it or not. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2 ++

[PATCH 09/20] octeontx2-af: Add MKEX default profile

2018-11-08 Thread sunil . kovvuri
From: Santosh Shukla Added basic default MKEX profile. This profile tells hardware what data to extract from packet and where to place it (bit offset) in final KEY generated for the parsed packet. Based on the bit placement of the packet data, MCAM entries have to programmed for matching. Also

[PATCH 11/20] octeontx2-af: Add support for stripping STAG/CTAG

2018-11-08 Thread sunil . kovvuri
From: Tomasz Duszynski This works by shadowing existing UCAST MCAM entry with a new one additionally matching either NPC_LT_LB_CTAG or NPC_LT_LB_STAG. For this to fully work one needs to send properly configured NIX_VTAG_CFG message afterwards i.e with strip and capture enabled and type set to

[PATCH 10/20] octeontx2-af: Support to enable/disable default MCAM entries

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham For a PF/VF with a NIXLF attached has default/reserved MCAM entries for receiving Ucast/Bcast/Promisc traffic. Ideally traffic should be forwarded to NIXLF only after it's contexts are initialized. This patch keeps these default entries disabled and adds mbox messages for a

[PATCH 04/20] octeontx2-af: NPC MCAM entry alloc/free support

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham This patch adds NPC MCAM entry management and support for allocating and freeing them via mailbox. Both contiguous and non-contiguous allocations are supported. Incase of contiguous, if request cannot be met then max contiguous number of available entries are allocated. High

[PATCH 07/20] octeontx2-af: Map or unmap NPC MCAM entry and counter

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham Alloc memory to save MCAM 'entry to counter' mapping and since multiple entries can map to same counter, added counter's reference count tracking. Do 'entry to counter' mapping when a entry is being installed and mbox msg sender requested to configure a counter as well.

[PATCH 05/20] octeontx2-af: MCAM entry installation support

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham Add support for a RVU PF/VF to enable, disable, configure and shuffle MCAM entries via mbox commands. This patch adds mailbox message formats and handling of these commands. As of now otherthan validating MCAM entry index, info like channel number e.t.c in MCAM config data

[PATCH 08/20] octeontx2-af: Alloc and config NPC MCAM entry at a time

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham A new mailbox message is added to support allocating a MCAM entry along with a counter and configuring it in one go. This reduces the amount of mailbox communication involved in installing a new MCAM rule. Signed-off-by: Sunil Goutham ---

[PATCH 03/20] octeontx2-af: Relax resource lock into mutex

2018-11-08 Thread sunil . kovvuri
From: Stanislaw Kardach The resource locks does not need to be a spinlock as they are not used in any interrupt handling routines (only in bottom halves). Therefore relax them into a mutex so that later on we may use them in routines that might sleep. Signed-off-by: Stanislaw Kardach

[PATCH 01/20] octeontx2-af: Support to modify min/max allowed packet lengths

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for RVU PF/VFs to modify min/max packet lengths allowed by HW. For VFs on PF0, settings will be automatically applied on LBK link. RX link's min/maxlen is configured to min/max of PF and it's all VFs. On the TX side if requested all SMQs attached to

[PATCH 02/20] octeontx2-af: Support to get NIX HW constants from AF

2018-11-08 Thread sunil . kovvuri
From: Kiran Kumar This patch adds reading HW limits like number of Rx/Tx stats, number of queue IRQs supported per NIX LF from AF registers and sync them to PF/VF. Signed-off-by: Kiran Kumar Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h| 4

[PATCH 00/20] octeontx2-af: NPC MCAM support and FLR handling

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham This patchset is a continuation to earlier submitted three patch series to add a new driver for Marvell's OcteonTX2 SOC's Resource virtualization unit (RVU) admin function driver. 1. octeontx2-af: Add RVU Admin Function driver

Re: [PATCH v2 00/17] octeontx2-af: NPC parser and NIX blocks initialization

2018-10-28 Thread Sunil Kovvuri
On Sat, Oct 27, 2018 at 12:59 AM Arnd Bergmann wrote: > > On Fri, Oct 26, 2018 at 6:33 PM Sunil Kovvuri wrote: > > On Fri, Oct 26, 2018 at 9:56 PM Sunil Kovvuri > > wrote: > > > On Fri, Oct 26, 2018 at 7:34 PM Arnd Bergmann wrote: > > > > > On 10/26/

Re: [PATCH v2 00/17] octeontx2-af: NPC parser and NIX blocks initialization

2018-10-26 Thread Sunil Kovvuri
On Fri, Oct 26, 2018 at 9:56 PM Sunil Kovvuri wrote: > > On Fri, Oct 26, 2018 at 7:34 PM Arnd Bergmann wrote: > > > > On 10/26/18, Sunil Kovvuri wrote: > > > On Fri, Oct 26, 2018 at 6:24 PM Arnd Bergmann wrote: > > >> > > >> I see this has be

Re: [PATCH v2 00/17] octeontx2-af: NPC parser and NIX blocks initialization

2018-10-26 Thread Sunil Kovvuri
On Fri, Oct 26, 2018 at 7:34 PM Arnd Bergmann wrote: > > On 10/26/18, Sunil Kovvuri wrote: > > On Fri, Oct 26, 2018 at 6:24 PM Arnd Bergmann wrote: > >> > >> I see this has been applied, but I'd still like to understand better how > >> the > >>

Re: [PATCH v2 00/17] octeontx2-af: NPC parser and NIX blocks initialization

2018-10-26 Thread Sunil Kovvuri
On Fri, Oct 26, 2018 at 6:24 PM Arnd Bergmann wrote: > > On 10/23/18, David Miller wrote: > > From: sunil.kovv...@gmail.com > > Date: Mon, 22 Oct 2018 23:25:47 +0530 > > > >> From: Sunil Goutham > >> > >> This patchset is a continuation to earlier submitted two patch > >> series to add a new

Re: [PATCH] octeontx2-af: Use GFP_ATOMIC under spin lock

2018-10-24 Thread Sunil Kovvuri
On Thu, Oct 25, 2018 at 7:02 AM Wei Yongjun wrote: > > The function nix_update_mce_list() is called from > nix_update_bcast_mce_list(), and a spin lock is held > here, so we should use GFP_ATOMIC instead. > > Fixes: 4b05528ebf0c ("octeontx2-af: Update bcast list upon NIXLF alloc/free") >

[PATCH v2 12/17] octeontx2-af: Add LMAC channel info to NIXLF_ALLOC response

2018-10-22 Thread sunil . kovvuri
From: Stanislaw Kardach Add LMAC channel info like Rx/Tx channel base and count to NIXLF_ALLOC mailbox message response. This info is used by NIXLF attached RVU PF/VF to configure SQ's default channel, TL3_TL2_LINKX_CFG and to install MCAM rules in NPC based on matching ingress channel number.

[PATCH v2 13/17] octeontx2-af: Install ucast and bcast pkt forwarding rules

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham Upon NIXLF_ALLOC install a unicast forwarding rule in NPC MCAM like below - Match pkt DMAC with NIXLF attached PF/VF's MAC address. - Ingress channel - Action is UCAST - Forward to PF_FUNC of this NIXLF And broadcast pkt forwarding rule as - Match L2B bit in MCAM search

[PATCH v2 11/17] octeontx2-af: NPC MCAM and LDATA extract minimal configuration

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham This patch adds some minimal configuration for NPC MCAM and LDATA extraction which is sufficient enough to install ucast/bcast/promiscuous forwarding rules. Below is the config done - LDATA extraction config to extract DMAC from pkt to offset 64bit in MCAM search key. - Set

[PATCH v2 14/17] octeontx2-af: NIX Rx flowkey configuration for RSS

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham Configure NIX RX flowkey algorithm configuration to support RSS (receive side scaling). Currently support for only L3/L4 2-tuple and 4-tuple hash of IPv4/v6/TCP/UDP/SCTP is added. HW supports upto 32 different flowkey algorithms which SW can define, this patch defines 9. NPC

[PATCH v2 15/17] octeontx2-af: Support for changing RSS algorithm

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for a RVU PF/VF to change NIX Rx flowkey algorithm index in NPC RX RSS_ACTION. eg: a ethtool command changing RSS algorithm for a netdev interface would trigger this change in NPC. If PF/VF doesn't specify any MCAM entry index then default UCAST entry

[PATCH v2 16/17] octeontx2-af: Support for setting MAC address

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham Added a new mailbox message for a PF/VF to set/update it's NIXLF's MAC address. Also updates unicast NPC MCAM entry with this address as matching DMAC. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 8 ++-

[PATCH v2 17/17] octeontx2-af: Support for NIXLF's UCAST/PROMISC/ALLMULTI modes

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham By default NIXLF is set in UCAST mode. This patch adds a new mailbox message which when sent by a RVU PF changes this default mode. When promiscuous mode is needed, the reserved promisc entry for each of RVU PF is setup to match against ingress channel number only, so that

[PATCH v2 02/17] octeontx2-af: NIX Tx scheduler queue config support

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for a PF/VF driver to configure NIX transmit scheduler queues via mbox. Since PF/VF doesn't know the absolute HW index of the NIXLF attached to it, AF traps the register config and overwrites with the correct NIXLF index. HW supports shaping,

[PATCH v2 01/17] octeontx2-af: NIX Tx scheduler queues alloc/free

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham Added support for a PF/VF to allocate or free NIX transmit scheduler queues via mbox. For setting up pkt transmission priorities between queues, the scheduler queues have to be contiguous w.r.t their HW indices. So both contiguous and non-contiguous allocations are supported.

[PATCH v2 05/17] octeontx2-af: Config NPC KPU engines with parser profile

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham This patch configures all 16 KPUs and iKPU (pkinds) with the KPU parser profile defined in npc_profile.h. Each KPU engine has a 128 entry CAM, only CAM entries which are listed in the profile are enabled and rest are left disabled. Also - Memory is allocated for pkind's

[PATCH v2 08/17] octeontx2-af: Update bcast list upon NIXLF alloc/free

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham Upon NIXLF ALLOC/FREE, add or remove corresponding PF_FUNC from the broadcast packet replication list of the CGX LMAC mapped RVU PF. Signed-off-by: Sunil Goutham --- .../net/ethernet/marvell/octeontx2/af/rvu_nix.c| 133 + 1 file changed, 133

[PATCH v2 09/17] octeontx2-af: Support for VTAG strip and capture

2018-10-22 Thread sunil . kovvuri
From: Vamsi Attunuru Added support for PF/VF drivers to configure NIX to capture and/or strip VLAN tag from ingress packets. Signed-off-by: Vamsi Attunuru Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 35 -

[PATCH v2 07/17] octeontx2-af: Broadcast packet replication support

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham Allocate memory for mcast/bcast/mirror replication entry contexts, replication buffers (used by HW) and config HW with corresponding memory bases. Added support for installing MCEs via NIX AQ mbox. For now support is restricted to broadcast pkt replication, hence MCE table

[PATCH v2 04/17] octeontx2-af: Add NPC KPU profile

2018-10-22 Thread sunil . kovvuri
From: Hao Zheng NPC block is responsible for parsing and forwarding packets to different NIXLFs. NPC has 16 KPU engines (Kangaroo parse engine) and one iKPU which represents pkinds. Each physical port either CGX/LBK is assigned a pkind and upon receiving a packet HW takes that port's pkind and

[PATCH v2 03/17] octeontx2-af: Reset NIXLF's Rx/Tx stats

2018-10-22 Thread sunil . kovvuri
From: Vamsi Attunuru This patch adds a new mailbox message to reset a NIXLF's receive and transmit HW stats. Signed-off-by: Vamsi Attunuru Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 3 ++- drivers/net/ethernet/marvell/octeontx2/af/rvu.h| 2 ++

[PATCH v2 06/17] octeontx2-af: Config pkind for CGX mapped PFs

2018-10-22 Thread sunil . kovvuri
From: Geetha sowjanya For each CGX LMAC that is mapped to a RVU PF, allocate a pkind and config the same in CGX. For a received packet at CGX LMAC interface this pkind is used by NPC block to start parsing of packet. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham ---

[PATCH v2 10/17] octeontx2-af: Enable packet length and csum validation

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham Config NPC layer info from KPU profile into protocol checker to identify outer L2/IPv4/TCP/UDP headers in a packet. And enable IPv4 checksum validation. L3/L4 and L4 CSUM validation will be enabled by PF/VF drivers by configuring NIX_AF_LF(0..127)_RX_CFG via mbox i.e

[PATCH v2 00/17] octeontx2-af: NPC parser and NIX blocks initialization

2018-10-22 Thread sunil . kovvuri
From: Sunil Goutham This patchset is a continuation to earlier submitted two patch series to add a new driver for Marvell's OcteonTX2 SOC's Resource virtualization unit (RVU) admin function driver. 1. octeontx2-af: Add RVU Admin Function driver

[PATCH 12/17] octeontx2-af: Add LMAC channel info to NIXLF_ALLOC response

2018-10-19 Thread sunil . kovvuri
From: Stanislaw Kardach Add LMAC channel info like Rx/Tx channel base and count to NIXLF_ALLOC mailbox message response. This info is used by NIXLF attached RVU PF/VF to configure SQ's default channel, TL3_TL2_LINKX_CFG and to install MCAM rules in NPC based on matching ingress channel number.

[PATCH 04/17] octeontx2-af: Add NPC KPU profile

2018-10-19 Thread sunil . kovvuri
From: Hao Zheng NPC block is responsible for parsing and forwarding packets to different NIXLFs. NPC has 16 KPU engines (Kangaroo parse engine) and one iKPU which represents pkinds. Each physical port either CGX/LBK is assigned a pkind and upon receiving a packet HW takes that port's pkind and

[PATCH 16/17] octeontx2-af: Support for setting MAC address

2018-10-19 Thread sunil . kovvuri
From: Sunil Goutham Added a new mailbox message for a PF/VF to set/update it's NIXLF's MAC address. Also updates unicast NPC MCAM entry with this address as matching DMAC. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 8 ++-

[PATCH 17/17] octeontx2-af: Support for NIXLF's UCAST/PROMISC/ALLMULTI modes

2018-10-19 Thread sunil . kovvuri
From: Sunil Goutham By default NIXLF is set in UCAST mode. This patch adds a new mailbox message which when sent by a RVU PF changes this default mode. When promiscuous mode is needed, the reserved promisc entry for each of RVU PF is setup to match against ingress channel number only, so that

[PATCH 11/17] octeontx2-af: NPC MCAM and LDATA extract minimal configuration

2018-10-19 Thread sunil . kovvuri
From: Sunil Goutham This patch adds some minimal configuration for NPC MCAM and LDATA extraction which is sufficient enough to install ucast/bcast/promiscuous forwarding rules. Below is the config done - LDATA extraction config to extract DMAC from pkt to offset 64bit in MCAM search key. - Set

  1   2   3   4   5   >