[dpdk-dev] [PATCH] bnx2x: check sc->state to prevent double init

2015-12-08 Thread Chas Williams
If the link is up, then the driver cannot be stopped and started successfully. Instead of checking the link status, use the driver's state. Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[dpdk-dev] [PATCH] bnx2x: always reinitialize the rx queue indices

2015-12-09 Thread Chas Williams
cache. Tidy some init code to make it clearer what the defaults are. Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.c | 16 +++- drivers/net/bnx2x/bnx2x_rxtx.c | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drive

[dpdk-dev] bnx2x pmd performance expectations

2015-12-27 Thread Chas Williams
I wouldn't consider myself an expert on this driver but while looking at some other things, I have noted that?RTE_PMD_BNX2X_TX_MAX_BURST is defined to be 1. ?This bursts single packets to bnx2x_tx_encap() but it looks like bnx2x_tx_encap() is far more capable than that. On Tue, 2015-12-22 at

[dpdk-dev] [PATCH 1/2] bnx2x: fix error handling in bnx2x_loop_obtain_resources()

2015-12-30 Thread Chas Williams
From: "Charles (Chas) Williams" <ciwil...@brocade.com> bnx2x_loop_obtain_resources() returns a struct containing the status and the error message. If bnx2x_do_req4pf() fails, it shouldn't return both of these fields set to 0 indicating failure and no error. Further, bnx2x_d

[dpdk-dev] [PATCH 2/2] bnx2x: Determine rx/tx queue sizes sooner

2015-12-30 Thread Chas Williams
From: "Charles (Chas) Williams" <ciwil...@brocade.com> The VF needs to determine the queues sizes before .dev_infos_get so that it can hint to the upper layer the proper sizes. Move bnx2x_vf_get_resources() to .eth_dev_init and probe with the guesses from bnx2x_init_rte(). Sig

[dpdk-dev] [PATCH] bnx2x: Correctly determine MSIX vector count

2016-06-10 Thread Chas Williams
From: "Charles (Chas) Williams" <ciwil...@brocade.com> If MSIX is available, the vector count given by the table size is one less than the actual count. This count also limits the receive and transmit queue resources the VF can support. Fixes: 540a211084a7 ("bnx2x: driv

[dpdk-dev] bnx2x driver and 57800 versus 57810

2016-06-13 Thread Chas Williams
://www.dpdk.org/dev/patchwork/patch/13459 On Wed, Jan 27, 2016 at 10:58 AM, Chas Williams <3chas3 at gmail.com> wrote: > On Wed, 2016-01-27 at 07:32 +, Harish Patil wrote: > > > > > >I have to practically identical systems, same hypervisor on each > > (Centos &

[dpdk-dev] [PATCH] bnx2x: set random MAC address if one isn't assigned

2016-06-21 Thread Chas Williams
If the PF hasn't assigned an address, assign one randomly. While here, convert to use DPDK's ether address utility routines. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.h | 8 d

[dpdk-dev] [PATCH] bnx2x: Call bnx2x_init_rte() later

2016-06-28 Thread Chas Williams
We need sc->igu_sb_cnt determined before calculating the number of queues we can support. Fixes: a787538ee754 ("bnx2x: fix MSIX vector and VF resource counts") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.c | 6 +++--- 1 file changed,

[dpdk-dev] [PATCH] bnx2x: use bnx2xvf driver for VF devices

2015-11-02 Thread Chas Williams
Signed-off-by: Chas Williams <3chas3 at gmail.com> --- lib/librte_eal/common/include/rte_pci_dev_ids.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h index 9

[dpdk-dev] [PATCH] bnx2x: tx_start_bd->vlan_or_ethertype is le16

2015-11-03 Thread Chas Williams
Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index fed7a06..76444eb 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net

[dpdk-dev] [PATCH] bnx2x: set Ethernet address type during transmit for VF's

2015-11-18 Thread Chas Williams
The original was always setting unicast. While here, clean up some other references that also point into the Ethernet header. Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.c | 23 +++ drivers/net/bnx2x/ecore_hsi.h | 5 +++-- 2

[dpdk-dev] [PATCH] devargs: add blacklisting by linux interface name

2015-10-02 Thread Chas Williams
If a system is using deterministic interface names, it may be easier in some cases to use the interface name to blacklist an interface. Signed-off-by: Chas Williams <3chas3 at gmail.com> --- app/test/test_devargs.c | 2 ++ lib/librte_eal/common/eal_common_devargs.c

[dpdk-dev] [PATCH v2] devargs: add blacklisting by linux interface name

2015-10-05 Thread Chas Williams
If a system is using deterministic interface names, it may be easier in some cases to use the interface name to blacklist an interface. Signed-off-by: Chas Williams <3chas3 at gmail.com> --- app/test/test_devargs.c | 2 ++ lib/librte_eal/common/eal_common_devargs.c

[dpdk-dev] VF in the bnx2x driver broken on 57810

2016-01-11 Thread Chas Williams
Interestingly enough, VF works for a 57800 card but doesn't seem to work for a 57810 card. ?To the best of my knowledge, these cards are practically the same, i.e. E3's with rev B0. ?Are there any bnx2x hw guys that could tell me why these cards might be behaving differently? The 57810 brokenness

[dpdk-dev] bnx2x driver and 57800 versus 57810

2016-01-26 Thread Chas Williams
I have to practically identical systems, same hypervisor on each (Centos 7.x). ?In one, I have a 57800 card which works fine with DPDK with SRIOV. ?In the other, I have a 57810 card which doesn't work with SRIOV. For the 57810 I have tracked this down to the status block in the VF failing to be

[dpdk-dev] bnx2x driver and 57800 versus 57810

2016-01-27 Thread Chas Williams
On Wed, 2016-01-27 at 07:32 +, Harish Patil wrote: > > > >I have to practically identical systems, same hypervisor on each > (Centos > >7.x).??In one, I have a 57800 card which works fine with DPDK with > >SRIOV.??In the other, I have a 57810 card which doesn't work with > SRIOV. > > > >For

[dpdk-dev] [PATCH 02/10] bnx2x: Remove unused preprocessor symbols and code

2016-07-12 Thread Chas Williams
ELINK_INCLUDE_EMUL and ELINK_INCLUDE_FPGA are never defined. Remove them along with enumeration constants dependent on their inclusion. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.c | 28 d

[dpdk-dev] [PATCH 03/10] bnx2x: Remove delay during device startup

2016-07-12 Thread Chas Williams
This 2.5s delay doesn't seem to serve any purpose other than a being a pause after logging the device configuration. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x_ethdev.c | 2 -- 1 file changed, 2 de

[dpdk-dev] [PATCH 04/10] bnx2x: Remove unused RX queue code

2016-07-12 Thread Chas Williams
Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x_rxtx.c | 13 +++-- drivers/net/bnx2x/bnx2x_rxtx.h | 6 -- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/net/bnx2

[dpdk-dev] [PATCH 05/10] bnx2x: Restrict RX mask flags sent to the PF

2016-07-12 Thread Chas Williams
Don't use bnx2x_fill_accept_flags() to fill the RX mask in the VF since the PF only handles a subset of the existing flags. now, bnx2x_fill_accept_flags() can be static. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/n

[dpdk-dev] [PATCH 06/10] bnx2x: Replace macro with static function

2016-07-12 Thread Chas Williams
Replace BNX2X_TLV_APPEND() with the clearer and safer bnx2x_add_tlv(). bnx2x_add_tlv() was previously prototyped at some point but can be static. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/b

[dpdk-dev] [PATCH 07/10] bnx2x: Serialize access to pf2vf mailbox

2016-07-12 Thread Chas Williams
The pf2vf mailbox can only be used by one thread at a time. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.h| 12 +++-- drivers/net/bnx2x/bnx2x_ethdev.c | 2 + drivers/net/bnx2x/bnx2

[dpdk-dev] [PATCH 08/10] bnx2x: Check return codes during VF mailbox operation

2016-07-12 Thread Chas Williams
Refactor bnx2x_do_req4pf() to be easier to read and return errors when the transaction fails -- Previously, it could succeed when the control channel was down. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bn

[dpdk-dev] [PATCH 09/10] bnx2x: Don't return structs

2016-07-12 Thread Chas Williams
bnx2x_loop_obtain_resources() returns a struct. This routine either succeeds or fails -- We don't need a struct for that. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/b

[dpdk-dev] [PATCH 10/10] bnx2x: Merge debug register operations into headers

2016-07-12 Thread Chas Williams
The register read/writes should just be static inline instead of alternately defined as routines or macros depending on the status of debugging. Fix bnx2x_reg_read32() returning 0 during debug unaligned reads. Fixes: b5bf7719221d ("bnx2x: driver support routines") Signed-off-by: Cha

[dpdk-dev] [PATCH 1/2] bnx2x: disable fast path interrupts

2016-07-15 Thread Chas Williams
On Thu, 2016-07-14 at 10:03 -0700, Rasesh Mody wrote: > Disable fastpath interrupts and remove unneeded delay in > bnx2x_interrupt_action(). This patch fixes and prevents performance > degradation for BNX2X PMD. > > Fixes: 540a2110 ("bnx2x: driver core") > > Signed-off-by: Rasesh Mody >? > diff

[dpdk-dev] [PATCH 02/10] bnx2x: Remove unused preprocessor symbols and code

2016-07-15 Thread Chas Williams
On Fri, 2016-07-15 at 16:56 +0100, Bruce Richardson wrote: > On Tue, Jul 12, 2016 at 09:38:06AM -0400, Chas Williams wrote: > > ELINK_INCLUDE_EMUL and ELINK_INCLUDE_FPGA are never defined.??Remove them > > along with enumeration constants dependent on their inclusion. > >? &g

[dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues

2016-10-11 Thread Chas Williams
gt;max_rx_queues = 128; > + sc->max_rx_queues = BNX2X_MAX_RSS_COUNT(sc); > + sc->max_tx_queues = sc->max_rx_queues; > } > } Technically, I think max_tx_queues would be max_rx_queues * max_cos. However, I don't think there are any DPDK applications that would take advantage of this. Acked-By: Chas Williams <3chas3 at gmail.com>

[dpdk-dev] [PATCH v3 01/10] net/bnx2x: set cache line based on build configuration

2016-10-11 Thread Chas Williams
Correctly hint the cache line size. Remove unused macros associated with the cache line size. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> Acked-by: Harish Patil --- drivers/net/bnx2x/bnx2x.h | 5 + 1 file changed, 1

[dpdk-dev] [PATCH v3 02/10] net/bnx2x: remove unused preprocessor symbols and code

2016-10-11 Thread Chas Williams
ELINK_INCLUDE_EMUL and ELINK_INCLUDE_FPGA are never defined. Remove them along with enumeration constants dependent on their inclusion. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.c | 28 d

[dpdk-dev] [PATCH v3 03/10] net/bnx2x: remove delay during device startup

2016-10-11 Thread Chas Williams
This 2.5s delay doesn't seem to serve any purpose other than a being a pause after logging the device configuration. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x_ethdev.c | 2 -- 1 file changed, 2 de

[dpdk-dev] [PATCH v3 04/10] net/bnx2x: remove unused RX queue code

2016-10-11 Thread Chas Williams
Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x_rxtx.c | 13 +++-- drivers/net/bnx2x/bnx2x_rxtx.h | 6 -- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/net/bnx2

[dpdk-dev] [PATCH v3 05/10] net/bnx2x: restrict RX mask flags sent to the PF

2016-10-11 Thread Chas Williams
Don't use bnx2x_fill_accept_flags() to fill the RX mask in the VF since the PF only handles a subset of the existing flags. now, bnx2x_fill_accept_flags() can be static. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/n

[dpdk-dev] [PATCH v3 06/10] net/bnx2x: replace macro with static function

2016-10-11 Thread Chas Williams
Replace BNX2X_TLV_APPEND() with the clearer and safer bnx2x_add_tlv(). bnx2x_add_tlv() was previously prototyped at some point but can be static. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/b

[dpdk-dev] [PATCH v3 07/10] net/bnx2x: serialize access to pf2vf mailbox

2016-10-11 Thread Chas Williams
The pf2vf mailbox can only be used by one thread at a time. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bnx2x.h| 12 +++-- drivers/net/bnx2x/bnx2x_ethdev.c | 2 + drivers/net/bnx2x/bnx2

[dpdk-dev] [PATCH v3 08/10] net/bnx2x: check return codes during VF mailbox operation

2016-10-11 Thread Chas Williams
Refactor bnx2x_do_req4pf() to be easier to read and return errors when the transaction fails -- Previously, it could succeed when the control channel was down. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/bn

[dpdk-dev] [PATCH v3 09/10] net/bnx2x: don't return structs

2016-10-11 Thread Chas Williams
bnx2x_loop_obtain_resources() returns a struct. This routine either succeeds or fails -- We don't need a struct for that. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- drivers/net/bnx2x/b

[dpdk-dev] [PATCH v3 10/10] net/bnx2x: merge debug register operations into headers

2016-10-11 Thread Chas Williams
The register read/writes should just be static inline instead of alternately defined as routines or macros depending on the status of debugging. Fix bnx2x_reg_read32() returning 0 during debug unaligned reads. Fixes: b5bf7719221d ("bnx2x: driver support routines") Signed-off-by: Cha

[dpdk-dev] [PATCH] vhost: use after free

2016-10-19 Thread Chas Williams
Don't dereference freed memory. Fixes: a277c7159876 ("vhost: refactor code structure") Signed-off-by: Chas Williams <3chas3 at gmail.com> --- lib/librte_vhost/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhos

[dpdk-dev] [PATCH] bnx2x: tx_start_bd->vlan_or_ethertype is le16

2015-12-01 Thread Charles (Chas) Williams
On Wed, 2015-12-02 at 00:34 +0100, Thomas Monjalon wrote: > 2015-12-01 14:37, Stephen Hemminger: > > Harish Patil wrote: > > > >2015-11-03 12:26, Chas Williams: > > > >> --- a/drivers/net/bnx2x/bnx2x.c > > > >> +++ b/drivers/net/bnx2x/bnx2x.

[dpdk-dev] [PATCH] bnx2x: tx_start_bd->vlan_or_ethertype is le16

2015-12-02 Thread Charles (Chas) Williams
On Wed, 2015-12-02 at 02:04 +0100, Thomas Monjalon wrote: > 2015-12-01 18:58, Charles Williams: > > On Wed, 2015-12-02 at 00:34 +0100, Thomas Monjalon wrote: > > > 2015-12-01 14:37, Stephen Hemminger: > > > > Harish Patil wrote: > > &g

[dpdk-dev] [PATCH] bnx2x: set Ethernet address type during transmit for VF's

2015-12-07 Thread Charles (Chas) Williams
On Sun, 2015-12-06 at 23:34 +, Harish Patil wrote: > > > >The original was always setting unicast. While here, clean up some > >other references that also point into the Ethernet header. > > > >Signed-off-by: Chas Williams <3chas3 at gmail.com> > >

[dpdk-dev] [PATCH] bnx2x: set Ethernet address type during transmit for VF's

2015-12-08 Thread Charles (Chas) Williams
On Mon, 2015-12-07 at 17:29 +, Harish Patil wrote: > > > >On Sun, 2015-12-06 at 23:34 +, Harish Patil wrote: > >> > > >> >The original was always setting unicast. While here, clean up some > >> >other references that also point into the E

[dpdk-dev] [PATCH v2] devargs: add blacklisting by linux interface name

2015-10-14 Thread Charles (Chas) Williams
On Tue, 2015-10-13 at 14:49 +0200, Olivier MATZ wrote: > Hi Chas, > > > @@ -352,6 +354,19 @@ pci_scan_one(const char *dirname, uint16_t domain, > > uint8_t bus, > > return -1; > > } > > > > + /* get network interface name */ > > + snprintf(filename, sizeof(filename),

[dpdk-dev] Status of bnx2x pmd?

2015-11-04 Thread Charles (Chas) Williams
On Fri, 2015-10-30 at 18:10 -0400, Mussar, Gary wrote: > I have been attempting to build testpmd with the bnx2x pmd enabled to try and > talk through a bcm57810 10G NIC card. I have tried using SR-IOV VFs and I > have tried using the PFs. Neither seem to be able to be properly initialized > in

[dpdk-dev] [PATCH v2] devargs: add blacklisting by linux interface name

2015-11-05 Thread Charles (Chas) Williams
On Wed, 2015-11-04 at 23:40 +0100, Thomas Monjalon wrote: > 2015-10-14 09:41, Charles Williams: > > On Tue, 2015-10-13 at 14:49 +0200, Olivier MATZ wrote: > > > For PCI devices that have several interfaces (I think it's the case for > > > some Mellanox boards), maybe we should not store the

[dpdk-dev] [PATCH v2] devargs: add blacklisting by linux interface name

2015-11-10 Thread Charles (Chas) Williams
On Thu, 2015-11-05 at 11:23 -0800, Stephen Hemminger wrote: > On Thu, 05 Nov 2015 11:39:04 -0500 > "Charles (Chas) Williams" <3chas3 at gmail.com> wrote: > > > On Wed, 2015-11-04 at 23:40 +0100, Thomas Monjalon wrote: > > > 2015-10-14 09:41, Charles Will

[dpdk-dev] [PATCH] devargs: add blacklisting by linux interface name

2015-10-02 Thread Charles (Chas) Williams
On Fri, 2015-10-02 at 16:18 +0100, Bruce Richardson wrote: > On Fri, Oct 02, 2015 at 11:00:07AM -0400, Chas Williams wrote: > > If a system is using deterministic interface names, it may be easier in > > some cases to use the interface name to blacklist an interface. > > >

[dpdk-dev] [PATCH] devargs: add blacklisting by linux interface name

2015-10-02 Thread Charles (Chas) Williams
On Fri, 2015-10-02 at 16:44 +, Richardson, Bruce wrote: > > -Original Message- > > From: Charles (Chas) Williams [mailto:3chas3 at gmail.com] > > > > On Fri, 2015-10-02 at 16:18 +0100, Bruce Richardson wrote: > > > On Fri, Oct 02, 2015 at 11:0

[dpdk-dev] [PATCH] devargs: add blacklisting by linux interface name

2015-10-05 Thread Charles (Chas) Williams
On Fri, 2015-10-02 at 16:44 +, Richardson, Bruce wrote: > I'm not sure about that, to be honest. However, I'd rather not have > too many cmd line options to be maintained in the code. > > Does you proposed blacklisting patch work with non-pci devices as well > as with PCI ones as now? I

[dpdk-dev] [PATCH v2] devargs: add blacklisting by linux interface name

2015-10-06 Thread Charles (Chas) Williams
On Tue, 2015-10-06 at 08:35 +0100, Stephen Hemminger wrote: > On Mon, 5 Oct 2015 11:26:08 -0400 > Chas Williams <3chas3 at gmail.com> wrote: > > > diff --git a/lib/librte_eal/common/include/rte_pci.h > > b/lib/librte_eal/common/include/rte_pci.h > > index 83e3

[dpdk-dev] [PATCH 1/2] bnx2x: fix error handling in bnx2x_loop_obtain_resources()

2016-02-08 Thread Charles (Chas) Williams
I am afraid I don't understand what you are asking. This was broken in the commit that added bnx2x, 540a211084a7695a1c7bc43068934c140d6989be On 02/08/2016 05:51 AM, Bruce Richardson wrote: > On Wed, Dec 30, 2015 at 07:37:50PM -0500, Chas Williams wrote: >> From: "Charles (