[PATCH v3 11/15] net: thunderx: Use netdev's name for naming VF's interrupts

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham This patch changes the way VF's irqs are visible in /proc/interrupts. Instead of VF id, logical interface's netdev name is used for IRQ naming and also all secondary VF's interrupts in multiqset config use primary VF's netdev name. Signed-off-by: Sunil Goutham --- drivers/n

[PATCH v3 14/15] net: thunderx: Reset RXQ HW stats when interface is brought down

2016-07-15 Thread sunil . kovvuri
From: Jerin Jacob When SQ/TXQ is reclaimed i.e reset it's stats also automatically reset by HW. This is not the case with RQ. Also VF doesn't have write access to statistics counter registers. Hence a new Mbox msg is introduced which supports resetting RQ, SQ and full Qset stats. Currently only R

[PATCH v3 12/15] net: thunderx: Use skb_add_rx_frag() for split buffer Rx pkts

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham Instead of a round about way of converting buffers to SKBs and combining them into a frag list, use standard skb_add_rx_frag() API to merge page fragments. This code is useful when incoming packets are of size more than RCV_FRAG_LEN which is currently set to 2048bytes. Signed

[PATCH v3 13/15] net: thunderx: Improvement for MBX interface debug messages

2016-07-15 Thread sunil . kovvuri
From: Radoslaw Biernacki Adding debug messages in case of NACK for a mailbox message, also did small cleanups. Signed-off-by: Radoslaw Biernacki Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c | 16 ++-- drivers/net/ethernet/cavium/thunder/nicvf_m

[PATCH v3 15/15] net: thunderx: Don't set mac address for secondary Qset VFs

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham Set MAC addresses only for primary VF's and don't for secondary VFs. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH v3 10/15] net: thunderx: Add RGMII interface type support

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham This patch adds RGX/RGMII interface type support to BGX driver. This type of interface is supported by 81xx SOC. CN81XX VNIC has 8 VFs and max possible LMAC interfaces are 9, hence RGMII interface will not work if all DLMs are in BGX mode and all 8 LMACs are enabled Signed-o

[PATCH v3 04/15] net: thunderx: Set queue count based on number of CPUs

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham 81xx has only 4 CPUs, so it doesn't make sense to initialize entire Qset i.e 8 queues by default. Made changes to queue initialization to init queues equal to number of CPUs or 8 queues whichever is lesser. Also this will be applicable to VMs with VNIC VF attached and having l

[PATCH v3 05/15] net: thunderx: Enable CQE_RX desc's extension fields

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham Unlike 88xx, CQE_RX descriptor's tunnelling extension i.e CQE_RX2_S is always enabled on 81xx/83xx and HW does insert these fields into CQE_RX. As a result receive buffer addresses will now be present at 7th word of CQE_RX instead of 6th. Enable CQE_RX2_S on 88xx pass 2.x as

[PATCH v3 07/15] net: thunderx: Support for different LMAC types within BGX

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham On 88xx all LMACs in a BGX will be in same mode but on 81xx BGX can be split as two and there can be LMACs configured in different modes. These changes move lmac_type, lane2serdes fields into per lmac struct from BGX struct. Got rid of qlm_mode field which has become redundan

[PATCH v3 01/15] net: thunderx: Moved HW capability info from macros to structure

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham Current driver has most of the HW maximums info like no of channels, traffic limiters, RSS indices e.t.c in the form of macros. These have been moved into a 'hw_info' structure so that support for VNIC on newer chips with different set of HW maximums can be added. Signed-off-

[PATCH v3 00/15] net: thunderx: Add support for 81xx and 83xx

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham This patch series adds support for VNIC on 81xx and 83xx SOCs. 81xx/83xx is different from 88xx in terms of capabilities and different types of interfaces supported (eg: QSGMII, RGMII) and have DLMs instead of QLMs which allows single BGX to have interfaces of different LMAC t

[PATCH v3 02/15] net: thunderx: Add VNIC's PCI devid on future chips

2016-07-15 Thread sunil . kovvuri
From: Sunil Goutham This patch adds PCI device IDs of VNIC on newer chips and also registers VF driver with them. Device id remains same for all versions of chips but subsystem device id changes. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic.h| 10 +-

Re: [PATCH v2 00/15] net: thunderx: Add support for 81xx and 83xx

2016-07-14 Thread Sunil Kovvuri
Hi David, I have found that I missed some piece of code in a patch and also discovered a corner case issue while further testing. Please ignore this patch set, will submit another version soon. Thanks, Sunil. On Wed, Jul 13, 2016 at 11:29 AM, wrote: > From: Sunil Goutham > > This patch serie

[PATCH v2 12/15] net: thunderx: Use skb_add_rx_frag() for split buffer Rx pkts

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham Instead of a round about way of converting buffers to SKBs and combining them into a frag list, use standard skb_add_rx_frag() API to merge page fragments. This code is useful when incoming packets are of size more than RCV_FRAG_LEN which is currently set to 2048bytes. Signed

[PATCH v2 01/15] net: thunderx: Moved HW capability info from macros to structure

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham Current driver has most of the HW maximums info like no of channels, traffic limiters, RSS indices e.t.c in the form of macros. These have been moved into a 'hw_info' structure so that support for VNIC on newer chips with different set of HW maximums can be added. Signed-off-

[PATCH v2 07/15] net: thunderx: Support for different LMAC types within BGX

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham On 88xx all LMACs in a BGX will be in same mode but on 81xx BGX can be split as two and there can be LMACs configured in different modes. These changes move lmac_type, lane2serdes fields into per lmac struct from BGX struct. Got rid of qlm_mode field which has become redundan

[PATCH v2 02/15] net: thunderx: Add VNIC's PCI devid on future chips

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham This patch adds PCI device IDs of VNIC on newer chips and also registers VF driver with them. Device id remains same for all versions of chips but subsystem device id changes. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic.h| 10 +-

[PATCH v2 13/15] net: thunderx: Improvement for MBX interface debug messages

2016-07-12 Thread sunil . kovvuri
From: Radoslaw Biernacki Adding debug messages in case of NACK for a mailbox message, also did small cleanups. Signed-off-by: Radoslaw Biernacki Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c | 16 ++-- drivers/net/ethernet/cavium/thunder/nicvf_m

[PATCH v2 09/15] net: thunderx: Add QSGMII interface type support

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for QSGMII interface type to the BGX driver. This type of interface is supported by 81xx SOC. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 55 ++- drivers/net/ethernet/cavium/thunder/thunder

[PATCH v2 14/15] net: thunderx: Reset RXQ HW stats when interface is brought down

2016-07-12 Thread sunil . kovvuri
From: Jerin Jacob When SQ/TXQ is reclaimed i.e reset it's stats also automatically reset by HW. This is not the case with RQ. Also VF doesn't have write access to statistics counter registers. Hence a new Mbox msg is introduced which supports resetting RQ, SQ and full Qset stats. Currently only R

[PATCH v2 03/15] net: thunderx: Add support for 81xx and 83xx chips

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham This patch adds info on HW maximums of 81xx/83xx and also configures receive and transmit datapaths accordingly. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c| 87 ++- drivers/net/ethernet/cavium/thunder/nic_reg.h

[PATCH v2 10/15] net: thunderx: Add RGMII interface type support

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham This patch adds RGX/RGMII interface type support to BGX driver. This type of interface is supported by 81xx SOC. CN81XX VNIC has 8 VFs and max possible LMAC interfaces are 9, hence RGMII interface will not work if all DLMs are in BGX mode and all 8 LMACs are enabled. Signed-

[PATCH v2 15/15] net: thunderx: Don't set mac address for secondary Qset VFs

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham Set MAC addresses only for primary VF's and don't for secondary VFs. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH v2 00/15] net: thunderx: Add support for 81xx and 83xx

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham This patch series adds support for VNIC on 81xx and 83xx SOCs. 81xx/83xx is different from 88xx in terms of capabilities and different types of interfaces supported (eg: QSGMII, RGMII) and have DLMs instead of QLMs which allows single BGX to have interfaces of different LMAC t

[PATCH v2 11/15] net: thunderx: Use netdev's name for naming VF's interrupts

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham This patch changes the way VF's irqs are visible in /proc/interrupts. Instead of VF id, logical interface's netdev name is used for IRQ naming and also all secondary VF's interrupts in multiqset config use primary VF's netdev name. Signed-off-by: Sunil Goutham --- drivers/n

[PATCH v2 08/15] net: thunderx: Add 81xx support to BGX driver

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for BGX module on 81xx where a BGX can be split and have different LMACs configured in different modes. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 112 -- drivers/net/ethernet/cavium/thund

[PATCH v2 05/15] net: thunderx: Enable CQE_RX desc's extension fields

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham Unlike 88xx, CQE_RX descriptor's tunnelling extension i.e CQE_RX2_S is always enabled on 81xx/83xx and HW does insert these fields into CQE_RX. As a result receive buffer addresses will now be present at 7th word of CQE_RX instead of 6th. Enable CQE_RX2_S on 88xx pass 2.x as

[PATCH v2 06/15] net: thunderx: Enable mailbox interrupts on 81xx/83xx

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham 88xx has 128 VFs, 81xx has 8 VFs and 83xx will have 32VFs. Made changes to PF driver such that mailbox interrupt enable registers are configuired based on number of VFs HW supports. Also cleanedup mailbox irq handler registration code. Signed-off-by: Sunil Goutham --- drive

[PATCH v2 04/15] net: thunderx: Set queue count based on number of CPUs

2016-07-12 Thread sunil . kovvuri
From: Sunil Goutham 81xx has only 4 CPUs, so it doesn't make sense to initialize entire Qset i.e 8 queues by default. Made changes to queue initialization to init queues equal to number of CPUs or 8 queues whichever is lesser. Also this will be applicable to VMs with VNIC VF attached and having l

[PATCH 06/15] net: thunderx: Enable mailbox interrupts on 81xx/83xx

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham 88xx has 128 VFs, 81xx has 8 VFs and 83xx will have 32VFs. Made changes to PF driver such that mailbox interrupt enable registers are configuired based on number of VFs HW supports. Also cleanedup mailbox irq handler registration code. Signed-off-by: Sunil Goutham --- drive

[PATCH 11/15] net: thunderx: Use netdev's name for naming VF's interrupts

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham This patch changes the way VF's irqs are visible in /proc/interrupts. Instead of VF id, logical interface's netdev name is used for IRQ naming and also all secondary VF's interrupts in multiqset config use primary VF's netdev name. Signed-off-by: Sunil Goutham --- drivers/n

[PATCH 09/15] net: thunderx: Add QSGMII interface type support

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for QSGMII interface type to the BGX driver. This type of interface is supported by 81xx SOC. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 55 ++- drivers/net/ethernet/cavium/thunder/thunder

[PATCH 01/15] net: thunderx: Moved HW capability info from macros to structure

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham Current driver has most of the HW maximums info like no of channels, traffic limiters, RSS indices e.t.c in the form of macros. These have been moved into a 'hw_info' structure so that support for VNIC on newer chips with different set of HW maximums can be added. Signed-off-

[PATCH 04/15] net: thunderx: Set queue count based on number of CPUs

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham 81xx has only 4 CPUs, so it doesn't make sense to initialize entire Qset i.e 8 queues by default. Made changes to queue initialization to init queues equal to number of CPUs or 8 queues whichever is lesser. Also this will be applicable to VMs with VNIC VF attached and having l

[PATCH 05/15] net: thunderx: Enable CQE_RX desc's extension fields

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham Unlike 88xx, CQE_RX descriptor's tunnelling extension i.e CQE_RX2_S is always enabled on 81xx/83xx and HW does insert these fields into CQE_RX. As a result receive buffer addresses will now be present at 7th word of CQE_RX instead of 6th. Enable CQE_RX2_S on 88xx pass 2.x as

[PATCH 03/15] net: thunderx: Add support for 81xx and 83xx chips

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham This patch adds info on HW maximums of 81xx/83xx and also configures receive and transmit datapaths accordingly. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c| 87 ++- drivers/net/ethernet/cavium/thunder/nic_reg.h

[PATCH 13/15] net: thunderx: Improvement for MBX interface debug messages

2016-07-11 Thread sunil . kovvuri
From: Radoslaw Biernacki Adding debug messages in case of NACK for a mailbox message, also did small cleanups. Signed-off-by: Radoslaw Biernacki Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c | 16 ++-- drivers/net/ethernet/cavium/thunder/nicvf_m

[PATCH 15/15] net: thunderx: Don't set mac address for secondary Qset VFs

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham Set MAC addresses only for primary VF's and don't for secondary VFs. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH 08/15] net: thunderx: Add 81xx support to BGX driver

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for BGX module on 81xx where a BGX can be split and have different LMACs configured in different modes. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 112 -- drivers/net/ethernet/cavium/thund

[PATCH 14/15] net: thunderx: Reset RXQ HW stats when interface is brought down

2016-07-11 Thread sunil . kovvuri
From: Jerin Jacob When SQ/TXQ is reclaimed i.e reset it's stats also automatically reset by HW. This is not the case with RQ. Also VF doesn't have write access to statistics counter registers. Hence a new Mbox msg is introduced which supports resetting RQ, SQ and full Qset stats. Currently only R

[PATCH 12/15] net: thunderx: Use skb_add_rx_frag() for split buffer Rx pkts

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham Instead of a round about way of converting buffers to SKBs and combining them into a frag list, use standard skb_add_rx_frag() API to merge page fragments. This code is useful when incoming packets are of size more than RCV_FRAG_LEN which is currently set to 2048bytes. Signed

[PATCH 07/15] net: thunderx: Support for different LMAC types within BGX

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham On 88xx all LMACs in a BGX will be in same mode but on 81xx BGX can be split as two and there can be LMACs configured in different modes. These changes move lmac_type, lane2serdes fields into per lmac struct from BGX struct. Got rid of qlm_mode field which has become redundan

[PATCH 10/15] net: thunderx: Add RGMII interface type support

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham This patch adds RGX/RGMII interface type support to BGX driver. This type of interface is supported by 81xx SOC. CN81XX VNIC has 8 VFs and max possible LMAC interfaces are 9, hence RGMII interface will not work if all DLMs are in BGX mode and all 8 LMACs are enabled. Signed-

[PATCH 00/15] net: thunderx: Add support for 81xx and 83xx

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham This patch series adds support for VNIC on 81xx and 83xx SOCs. 81xx/83xx is different from 88xx in terms of capabilities and different types of interfaces supported (eg: QSGMII, RGMII) and have DLMs instead of QLMs which allows single BGX to have interfaces of different LMAC

[PATCH 02/15] net: thunderx: Add VNIC's PCI devid on future chips

2016-07-11 Thread sunil . kovvuri
From: Sunil Goutham This patch adds PCI device IDs of VNIC on newer chips and also registers VF driver with them. Device id remains same for all versions of chips but subsystem device id changes. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic.h| 10 +-

[PATCH v2 2/2] net: thunderx: Fix TL4 configuration for secondary Qsets

2016-06-27 Thread sunil . kovvuri
From: Sunil Goutham TL4 calculation for a given SQ of secondary Qsets is incorrect and goes out of bounds and also for some SQ's TL4 chosen will transmit data via a different BGX interface and not same as primary Qset's interface. This patch fixes this issue. Signed-off-by: Sunil Goutham ---

[PATCH v2 1/2] net: thunderx: Fix link status reporting

2016-06-27 Thread sunil . kovvuri
From: Sunil Goutham Check for SMU RX local/remote faults along with SPU LINK status. Otherwise at times link is UP at our end but DOWN at link partner's side. Also due to an issue in BGX it's rarely seen that initialization doesn't happen properly and SMU RX reports faults with everything fine at

[PATCH v2 0/2] net: thunderx: Miscellaneous fixes

2016-06-27 Thread sunil . kovvuri
From: Sunil Goutham This 2 patch series fixes issues w.r.t physical link status reporting and transmit datapath configuration for secondary qsets. Changes from v1: Fixed lmac disable sequence for interfaces of type SGMII. Sunil Goutham (2): net: thunderx: Fix link status reporting net: thun

[PATCH 1/2] net: thunderx: Fix link status reporting

2016-06-22 Thread sunil . kovvuri
From: Sunil Goutham Check for SMU RX local/remote faults along with SPU LINK status. Otherwise at times link is UP at our end but DOWN at link partner's side. Also due to an issue in BGX it's rarely seen that initialization doesn't happen properly and SMU RX reports faults with everything fine at

[PATCH 2/2] net: thunderx: Fix TL4 configuration for secondary Qsets

2016-06-22 Thread sunil . kovvuri
From: Sunil Goutham TL4 calculation for a given SQ of secondary Qsets is incorrect and goes out of bounds and also for some SQ's TL4 chosen will transmit data via a different BGX interface and not same as primary Qset's interface. This patch fixes this issue. Signed-off-by: Sunil Goutham ---

[PATCH 0/2] net: thunderx: Miscellaneous fixes

2016-06-22 Thread sunil . kovvuri
From: Sunil Goutham This 2 patch series fixes issues w.r.t physical link status reporting and transmit datapath configuration for secondary qsets. Sunil Goutham (2): net: thunderx: Fix link status reporting net: thunderx: Fix TL4 configuration for secondary Qsets drivers/net/ethernet/cav

Re: [PATCH 1/1] net: thunderx: avoid exposing kernel stack

2016-05-09 Thread Sunil Kovvuri
Thanks for fixing, changes look okay. Sunil. On Sun, May 8, 2016 at 3:46 PM, Heinrich Schuchardt wrote: > Reserved fields should be set to zero to avoid exposing > bits from the kernel stack. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 4

[PATCH v2 4/4] net: thunderx: Improvement for MBX interface debug messages

2016-04-20 Thread sunil . kovvuri
From: Radoslaw Biernacki Adding debug messages in case of NACK for a mailbox message, also did small cleanups. Signed-off-by: Radoslaw Biernacki Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c | 16 ++-- drivers/net/ethernet/cavium/thunder/nicvf

[PATCH v2 3/4] net: thunderx: add sysfs attribute for SQS/SVF assigments

2016-04-20 Thread sunil . kovvuri
From: Radoslaw Biernacki With this sysfs attribute (sriov_sqs_assignment) administrator will be able to read the current assigment of SQS/SVF for a given VF. This is useful to decide which VFs needs to be attached to UIO for a successful allocation of secondary Qsets Signed-off-by: Radoslaw Bier

[PATCH v2 2/4] net: thunderx: Add multiqset support for dataplane apps

2016-04-20 Thread sunil . kovvuri
From: Radoslaw Biernacki This patch adds support to PF for allocating additional Qsets to dataplane apps such as DPDK. Till now PF, upon host bound interface's request it used to allocate Qsets from the free ones, but for dataplane apps support has been added for it to request specific Qsets inst

[PATCH v2 1/4] net: thunderx: Introduce a mailbox message to reset VF counters

2016-04-20 Thread sunil . kovvuri
From: Jerin Jacob Write access to VF statistics counter register is only allowed from PF. Added a new mailbox message to reset VF's Rx/Tx counters, this is used by userspace DPDK. Signed-off-by: Jerin Jacob Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic.h | 27

[PATCH v2 0/4] net: thunderx: Add multiqset support for DPDK

2016-04-20 Thread sunil . kovvuri
From: Sunil Goutham This patch series mainly adds support for userspace application like DPDK with a VNIC VF attached to request additional QSets for having morethan the default 8 queues. Changes from v1: Fixed compilation issue reported by kbuild test robot due to changes in 2nd patch. Now 'nic

[PATCH 4/4] net: thunderx: Improvement for MBX interface debug messages

2016-04-19 Thread sunil . kovvuri
From: Radoslaw Biernacki Adding debug messages in case of NACK for a mailbox message, also did small cleanups. Signed-off-by: Radoslaw Biernacki Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic_main.c | 16 ++-- drivers/net/ethernet/cavium/thunder/nicvf

[PATCH 3/4] net: thunderx: add sysfs attribute for SQS/SVF assigments

2016-04-19 Thread sunil . kovvuri
From: Radoslaw Biernacki With this sysfs attribute (sriov_sqs_assignment) administrator will be able to read the current assigment of SQS/SVF for a given VF. This is useful to decide which VFs needs to be attached to UIO for a successful allocation of secondary Qsets Signed-off-by: Radoslaw Bier

[PATCH 2/4] net: thunderx: Add multiqset support for dataplane apps

2016-04-19 Thread sunil . kovvuri
From: Radoslaw Biernacki This patch adds support to PF for allocating additional Qsets to dataplane apps such as DPDK. Till now PF, upon host bound interface's request it used to allocate Qsets from the free ones, but for dataplane apps support has been added for it to request specific Qsets inst

[PATCH 0/4] net: thunderx: Add multiqset support for DPDK

2016-04-19 Thread sunil . kovvuri
From: Sunil Goutham This patch series mainly adds support for userspace application like DPDK with a VNIC VF attached to request additional QSets for having morethan the default 8 queues. Jerin Jacob (1): net: thunderx: Introduce a mailbox message to reset VF counters Radoslaw Biernacki (3):

[PATCH 1/4] net: thunderx: Introduce a mailbox message to reset VF counters

2016-04-19 Thread sunil . kovvuri
From: Jerin Jacob Write access to VF statistics counter register is only allowed from PF. Added a new mailbox message to reset VF's Rx/Tx counters, this is used by userspace DPDK. Signed-off-by: Jerin Jacob Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic.h | 27

[PATCH v2 2/2] net: thunderx: Adjust nicvf structure to reduce cache misses

2016-03-14 Thread sunil . kovvuri
From: Sunil Goutham Adjusted nicvf structure such that all elements used in hot path like napi, xmit e.t.c fall into same cache line. This reduced no of cache misses and resulted in ~2% increase in no of packets handled on a core. Also modified elements with :1 notation to boolean, to be consist

[PATCH v2 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-14 Thread sunil . kovvuri
From: Sunil Goutham Instead of calling get_page() for every receive buffer carved out of page, set page's usage count at the end, to reduce no of atomic calls. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic.h |1 + drivers/net/ethernet/cavium/thunder/nicv

[PATCH v2 0/2] net: thunderx: Performance enhancement changes

2016-03-14 Thread sunil . kovvuri
From: Sunil Goutham Below patches attempts to improve performance by reducing no of atomic operations while allocating new receive buffers and reducing cache misses by adjusting nicvf structure elements. Changes from v1: No changes, resubmitting a fresh as per David's suggestion. Sunil Goutham

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-11 Thread Sunil Kovvuri
On Fri, Mar 11, 2016 at 1:18 AM, David Miller wrote: > From: Sunil Kovvuri > Date: Thu, 10 Mar 2016 23:57:48 +0530 > >> Difference between NIU driver and this patch is there it's >> calculate split count, increment page count and then divide page into >> buf

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-10 Thread Sunil Kovvuri
> > So calculate the modulus on the page split count and optimize the > increment ahead of time when possible, and for the sub page split > pieces do it one at a time. > Patch does almost the same with a negligible overhead of a counter for page->_count increment at a later time but still before HW

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-10 Thread Sunil Kovvuri
Hi David, >> So if you know ahead of time how the page will be split up, just >> calculate that when you get the page and increment the page count >> appropriately. >> >> That's what we do in the NIU driver. > > Thanks for the suggestion, will check and get back. > I looked at the NIU driver and

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-07 Thread Sunil Kovvuri
On Mon, Mar 7, 2016 at 10:34 PM, David Miller wrote: > From: Sunil Kovvuri > Date: Mon, 7 Mar 2016 22:28:39 +0530 > >> Hi David, >> >>>> you create a window of time during which the consumer >>>> can release the page and prematurely free it. >>

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-07 Thread Sunil Kovvuri
Hi David, >> you create a window of time during which the consumer >> can release the page and prematurely free it. Okay, but here the consumer i.e HW is notified only after page count is incremented. For example if you check 'nicvf_refill_rbdr' fn() only after receive buffer ring is refilled with

[PATCH 2/2] net: thunderx: Adjust nicvf structure to reduce cache misses

2016-03-06 Thread sunil . kovvuri
From: Sunil Goutham Adjusted nicvf structure such that all elements used in hot path like napi, xmit e.t.c fall into same cache line. This reduced no of cache misses and resulted in ~2% increase in no of packets handled on a core. Also modified elements with :1 notation to boolean, to be consist

[PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-06 Thread sunil . kovvuri
From: Sunil Goutham Instead of calling get_page() for every receive buffer carved out of page, set page's usage count at the end, to reduce no of atomic calls. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic.h |1 + drivers/net/ethernet/cavium/thunder/nicv

[PATCH 0/2] net: thunderx: Performance enhancement changes

2016-03-06 Thread sunil . kovvuri
From: Sunil Goutham Below patches attempts to improve performance by reducing no of atomic operations while allocating new receive buffers and reducing cache misses by adjusting nicvf structure elements. Sunil Goutham (2): net: thunderx: Set recevie buffer page usage count in bulk net: thund

[PATCH] net: thunderx: Fix for Qset error due to CQ full

2016-02-24 Thread sunil . kovvuri
From: Sunil Goutham On Thunderx pass 1.x and pass2 due to a HW errata default CQ DROP_LEVEL of 0x80 is not sufficient to avoid CQ_WR_FULL Qset error when packets are being received at >20Mpps resulting in complete stall of packet reception. This patch will configure it to 0x100 which is what is

[PATCH 2/3] net: thunderx: Fix for HW TSO not enabled for secondary qsets

2016-02-16 Thread sunil . kovvuri
From: Sunil Goutham For secondary Qsets 'hw_tso' is not getting set as probe() returns much earlier. Fixed it by moving silicon revision check. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nicvf_main.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) dif

[PATCH 0/3] net: thunderx: Miscellaneous fixes

2016-02-16 Thread sunil . kovvuri
From: Sunil Goutham This patch series fixes couple of issues w.r.t multiqset mode and receive packet statastics. Sunil Goutham (3): net: thunderx: Fix for multiqset not configured upon interface toggle net: thunderx: Fix for HW TSO not enabled for secondary qsets net: thunderx: Fix receive

[PATCH 3/3] net: thunderx: Fix receive packet stats

2016-02-16 Thread sunil . kovvuri
From: Sunil Goutham Counting rx packets for every CQE_RX in CQ irq handler is incorrect. Synchronization is missing when multiple queues are receiving packets simultaneously. Like transmit packet stats use HW stats here. Also removed unused 'cqe_type' parameter in nicvf_rcv_pkt_handler(). Signe

[PATCH 1/3] net: thunderx: Fix for multiqset not configured upon interface toggle

2016-02-16 Thread sunil . kovvuri
From: Sunil Goutham When a interface is assigned morethan 8 queues and the logical interface is toggled i.e down & up, additional queues or qsets are not initialized as secondary qset count is being set to zero while tearing down. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/th

[PATCH v2 1/6] net, thunderx: Add TX timeout and RX buffer alloc failure stats.

2016-02-11 Thread sunil . kovvuri
From: Thanneeru Srinivasulu When system is low on atomic memory, too many error messages are logged. Since this is not a total failure but a simple switch to non-atomic allocation better to have a stat. Also add a stat for reset, kicked due to transmit watchdog timeout. Signed-off-by: Thanneeru

[PATCH v2 6/6] net: thunderx: Alloc higher order pages when pagesize is small

2016-02-11 Thread sunil . kovvuri
From: Sunil Goutham Allocate higher order pages when pagesize is small, this will reduce number of calls to page allocator and wastage of memory. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nicvf_queues.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) dif

[PATCH v2 4/6] net: thunderx: bgx: Use standard firmware node infrastructure.

2016-02-11 Thread sunil . kovvuri
From: David Daney In the case of OF device tree, the firmware information is attached to the BGX device structure in the standard manner, so use the firmware iterators and accessors where possible. Signed-off-by: David Daney Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder

[PATCH v2 3/6] net: thunderx: Assign affinity hints to vf's interrupts

2016-02-11 Thread sunil . kovvuri
From: Sunil Goutham This affinity hint can be used by user space irqbalance tool to set preferred CPU mask for irqs registered by this VF. Irqbalance needs to be in 'exact' mode to set irq affinity same as indicated by affinity hint. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium

[PATCH v2 5/6] net: thunderx: bgx: Add log message when setting mac address

2016-02-11 Thread sunil . kovvuri
From: Robert Richter Signed-off-by: Robert Richter Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cav

[PATCH v2 2/6] net: thunderx: Use napi_schedule_irqoff()

2016-02-11 Thread sunil . kovvuri
From: Sunil Goutham napi_schedule is being called from hard irq context, hence switch to napi_schedule_irqoff which avoids unneeded call to local_irq_save and local_irq_restore. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nicvf_main.c |2 +- 1 files changed, 1 inse

[PATCH v2 0/6] net: thunderx: Setting IRQ affinity hints and other optimizations

2016-02-11 Thread sunil . kovvuri
From: Sunil Goutham This patch series contains changes - To add support for virtual function's irq affinity hint - Replace napi_schedule() with napi_schedule_irqoff() - Reduce page allocation overhead by allocating pages of higher order when pagesize is 4KB. - Add couple of stats which helps in

Re: [PATCH 0/6] net: thunderx: Setting IRQ affinity hints and other optimizations

2016-02-11 Thread Sunil Kovvuri
Hi David, If time permits, can you please look at this patchset. Thanks, Sunil. On Mon, Feb 8, 2016 at 5:37 PM, wrote: > From: Sunil Goutham > > This patch series contains changes > - To add support for virtual function's irq affinity hint > - Replace napi_schedule() with napi_schedule_irqoff

[PATCH 4/6] net: thunderx: bgx: Use standard firmware node infrastructure.

2016-02-08 Thread sunil . kovvuri
From: David Daney In the case of OF device tree, the firmware information is attached to the BGX device structure in the standard manner, so use the firmware iterators and accessors where possible. Signed-off-by: David Daney Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder

[PATCH 3/6] net: thunderx: Assign affinity hints to vf's interrupts

2016-02-08 Thread sunil . kovvuri
From: Sunil Goutham This affinity hint can be used by user space irqbalance tool to set preferred CPU mask for irqs registered by this VF. Irqbalance needs to be in 'exact' mode to set irq affinity same as indicated by affinity hint. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium

[PATCH 6/6] net: thunderx: Alloc higher order pages when pagesize is small

2016-02-08 Thread sunil . kovvuri
From: Sunil Goutham Allocate higher order pages when pagesize is small, this will reduce number of calls to page allocator and wastage of memory. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nicvf_queues.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) dif

[PATCH 1/6] net, thunderx: Add TX timeout and RX buffer alloc failure stats.

2016-02-08 Thread sunil . kovvuri
From: Thanneeru Srinivasulu When system is low on atomic memory, too many error messages are logged. Since this is not a total failure but a simple switch to non-atomic allocation better to have a stat. Also add a stat for reset, kicked due to transmit watchdog timeout. Signed-off-by: Thanneeru

[PATCH 5/6] net: thunderx: bgx: Add log message when setting mac address

2016-02-08 Thread sunil . kovvuri
From: Robert Richter Signed-off-by: Robert Richter Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cav

[PATCH 2/6] net: thunderx: Use napi_schedule_irqoff()

2016-02-08 Thread sunil . kovvuri
From: Sunil Goutham napi_schedule is being called from hard irq context, hence switch to napi_schedule_irqoff which avoids unneeded call to local_irq_save and local_irq_restore. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nicvf_main.c |2 +- 1 files changed, 1 inse

[PATCH 0/6] net: thunderx: Setting IRQ affinity hints and other optimizations

2016-02-08 Thread sunil . kovvuri
From: Sunil Goutham This patch series contains changes - To add support for virtual function's irq affinity hint - Replace napi_schedule() with napi_schedule_irqoff() - Reduce page allocation overhead by allocating pages of higher order when pagesize is 4KB. - Add couple of stats which helps in

Re: [PATCH 2/2] net: thunderx: Enable CQE count threshold interrupt

2015-12-09 Thread Sunil Kovvuri
Will take care of above suggestions and resubmit. Thanks, Sunil. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tu

Re: [PATCH 1/2] net: thunderx: HW TSO support for pass-2 hardware

2015-12-09 Thread Sunil Kovvuri
>> + booltns_mode:1; >> + boolsqs_mode:1; >These little refactors are creeping in your code without even being mentioned in the commit message, this is not good practice. Okay, will include these in the commit message. >IMHO. Additionally, may be t

Re: [PATCH 3/6] net: thunderx: Increase transmit queue length

2015-12-02 Thread Sunil Kovvuri
> > If the performance increase is 4 %, then surely using twice more memory > is not worth it. I haven't mentioned anywhere that i am seeing 4% increase in performance. Anyways as said already i will recheck and resubmit. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [PATCH 3/6] net: thunderx: Increase transmit queue length

2015-12-02 Thread Sunil Kovvuri
>After getting it working in guest i tried to apply it to host. With total of >128 virtual functions (= 128 interfaces) it does not work at all. > Even after bumping cma region size to insane value of 2GB more than half of > interfaces still failed to allocate queues. > And after setting cma=3G i

Re: [PATCH v2 4/5] net: thunderx: Switchon carrier only upon interface link up

2015-12-02 Thread Sunil Kovvuri
Thanks for the confirmation. On Wed, Dec 2, 2015 at 5:00 PM, Pavel Fedin wrote: > Hello again! > >> Subject: RE: [PATCH v2 4/5] net: thunderx: Switchon carrier only upon >> interface link up >> >> Just a reminder, we have issue with this one too, which is not addressed >> yet. > > I have exa

Re: [PATCH 3/6] net: thunderx: Increase transmit queue length

2015-12-01 Thread Sunil Kovvuri
ill see the same issue. And above i have suggested what could be done to not see this issue. But anyway for the time being I will resubmit the patch series without this patch, hope that would be okay. On Wed, Dec 2, 2015 at 1:00 AM, David Miller wrote: > From: Sunil Kovvuri > Date: Tue,

Re: [PATCH 5/6] net: thunderx: Switchon carrier only upon interface link up

2015-12-01 Thread Sunil Kovvuri
Hi Pavel Fedin, Are running Fedora 21 on Cavium ThunderX ? Do you see linkup notification (dmesg) ? If you see the existing driver (pasted snippet below), it does call netif_carrier_on() upon receiving l ink up notification from BGX driver. === case NIC_MBOX_MSG_BGX_LINK_CHANGE:

<    1   2   3   4   >