[dpdk-dev] [PATCH v5 1/5] bnx2x: fixed stats get

2016-06-13 Thread Ferruh Yigit
On 6/10/2016 11:08 AM, Ferruh Yigit wrote:
> On 6/8/2016 5:15 PM, Bruce Richardson wrote:
>> On Wed, May 11, 2016 at 05:06:21PM -0700, Rasesh Mody wrote:
>>> Fix stats_get() routine to display drop counters under imissed counter.
>>>
>>> Fixes: 540a211084a7 ("bnx2x: driver core")
>>>
>>> Signed-off-by: Rasesh Mody 
>>> Signed-off-by: Harish Patil 
>>
>> Patchset applied to dpdk-next-net/rel_16_07
>>
>> /Bruce
>>
> 
> This patchset is cause a compile error with ICC, I will send a patch to
> disable some warning with ICC.
> 

With more investigation, it is not this patchset causing the compilation
error with ICC, master branch has also this problem.

Regards,
ferruh



[dpdk-dev] [PATCH v5 1/5] bnx2x: fixed stats get

2016-06-10 Thread Ferruh Yigit
On 6/8/2016 5:15 PM, Bruce Richardson wrote:
> On Wed, May 11, 2016 at 05:06:21PM -0700, Rasesh Mody wrote:
>> Fix stats_get() routine to display drop counters under imissed counter.
>>
>> Fixes: 540a211084a7 ("bnx2x: driver core")
>>
>> Signed-off-by: Rasesh Mody 
>> Signed-off-by: Harish Patil 
> 
> Patchset applied to dpdk-next-net/rel_16_07
> 
> /Bruce
> 

This patchset is cause a compile error with ICC, I will send a patch to
disable some warning with ICC.

Please find compile warning as reference:
== Build drivers/net/bnx2x
  CC bnx2x.o
.../drivers/net/bnx2x/bnx2x.c(1248): error #188: enumerated type mixed
with another type
cqe_fp_type = cqe_fp_flags & ETH_FAST_PATH_RX_CQE_TYPE;
^

.../drivers/net/bnx2x/bnx2x.c(3566): error #188: enumerated type mixed
with another type
op_code = ((drv_info_ctl & DRV_INFO_CONTROL_OP_CODE_MASK) >>
^

.../drivers/net/bnx2x/bnx2x.c(7731): error #188: enumerated type mixed
with another type
mf_info->afex_vlan_mode =
^

compilation aborted for .../drivers/net/bnx2x/bnx2x.c (code 2)
.../mk/internal/rte.compile-pre.mk:126: recipe for target 'bnx2x.o' failed
make[4]: *** [bnx2x.o] Error 2
  CC bnx2x_rxtx.o
  CC bnx2x_stats.o
.../drivers/net/bnx2x/bnx2x_stats.c(1287): error #188: enumerated type
mixed with another type
state = sc->stats_state;
  ^

compilation aborted for .../drivers/net/bnx2x/bnx2x_stats.c (code 2)
.../mk/internal/rte.compile-pre.mk:126: recipe for target
'bnx2x_stats.o' failed
make[4]: *** [bnx2x_stats.o] Error 2
  CC bnx2x_ethdev.o
  CC ecore_sp.o
.../drivers/net/bnx2x/ecore_sp.c(2508): error #188: enumerated type
mixed with another type
o->set_one_rule(sc, o, cnt, _data, cmd_pos->type);
   ^

.../drivers/net/bnx2x/ecore_sp.c(2542): error #188: enumerated type
mixed with another type
o->set_one_rule(sc, o, cnt, NULL, cmd_pos->type);
  ^

.../drivers/net/bnx2x/ecore_sp.c(3644): error #188: enumerated type
mixed with another type
o->complete_cmd(sc, o, pending_bit);
   ^

.../drivers/net/bnx2x/ecore_sp.c(3656): error #188: enumerated type
mixed with another type
rc = o->wait_comp(sc, o, pending_bit);
 ^

compilation aborted for .../drivers/net/bnx2x/ecore_sp.c (code 2)
.../mk/internal/rte.compile-pre.mk:126: recipe for target 'ecore_sp.o'
failed
make[4]: *** [ecore_sp.o] Error 2
  CC elink.o
.../drivers/net/bnx2x/elink.c(5032): error #188: enumerated type mixed
with another type
return 1;
   ^

.../drivers/net/bnx2x/elink.c(5042): error #188: enumerated type mixed
with another type
return 1;
   ^

.../drivers/net/bnx2x/elink.c(6738): error #188: enumerated type mixed
with another type
return 1;
   ^

.../drivers/net/bnx2x/elink.c(7560): error #188: enumerated type mixed
with another type
elink_status_t rc = 0;
^

.../drivers/net/bnx2x/elink.c(8464): error #188: enumerated type mixed
with another type
return elink_8706_8726_read_status(phy, params, vars);
   ^

compilation aborted for .../drivers/net/bnx2x/elink.c (code 2)
.../mk/internal/rte.compile-pre.mk:126: recipe for target 'elink.o' failed
make[4]: *** [elink.o] Error 2
  CC bnx2x_vfpf.o
make[4]: Target 'all' not remade because of errors.
.../mk/rte.subdir.mk:61: recipe for target 'bnx2x' failed
make[3]: *** [bnx2x] Error 2




[dpdk-dev] [PATCH v5 1/5] bnx2x: fixed stats get

2016-06-08 Thread Bruce Richardson
On Wed, May 11, 2016 at 05:06:21PM -0700, Rasesh Mody wrote:
> Fix stats_get() routine to display drop counters under imissed counter.
> 
> Fixes: 540a211084a7 ("bnx2x: driver core")
> 
> Signed-off-by: Rasesh Mody 
> Signed-off-by: Harish Patil 

Patchset applied to dpdk-next-net/rel_16_07

/Bruce


[dpdk-dev] [PATCH v5 1/5] bnx2x: fixed stats get

2016-05-11 Thread Rasesh Mody
Fix stats_get() routine to display drop counters under imissed counter.

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Rasesh Mody 
Signed-off-by: Harish Patil 
---
 drivers/net/bnx2x/bnx2x_ethdev.c |   16 
 drivers/net/bnx2x/bnx2x_rxtx.c   |2 ++
 2 files changed, 18 insertions(+)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 071b44f..3ff57c4 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -276,6 +276,9 @@ static void
 bnx2x_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
struct bnx2x_softc *sc = dev->data->dev_private;
+   uint32_t brb_truncate_discard;
+   uint64_t brb_drops;
+   uint64_t brb_truncates;

PMD_INIT_FUNC_TRACE();

@@ -316,6 +319,19 @@ bnx2x_dev_stats_get(struct rte_eth_dev *dev, struct 
rte_eth_stats *stats)
stats->rx_nombuf =
HILO_U64(sc->eth_stats.no_buff_discard_hi,
sc->eth_stats.no_buff_discard_lo);
+
+   brb_drops =
+   HILO_U64(sc->eth_stats.brb_drop_hi,
+sc->eth_stats.brb_drop_lo);
+
+   brb_truncates =
+   HILO_U64(sc->eth_stats.brb_truncate_hi,
+sc->eth_stats.brb_truncate_lo);
+
+   brb_truncate_discard = sc->eth_stats.brb_truncate_discard;
+
+   stats->imissed = brb_drops + brb_truncates +
+brb_truncate_discard + stats->rx_nombuf;
 }

 static void
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index 752a5e8..e825bce 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -408,6 +408,8 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, 
uint16_t nb_pkts)
new_mb = bnx2x_rxmbuf_alloc(rxq->mb_pool);
if (unlikely(!new_mb)) {
PMD_RX_LOG(ERR, "mbuf alloc fail fp[%02d]", fp->index);
+   rte_eth_devices[rxq->port_id].data->
+   rx_mbuf_alloc_failed++;
goto next_rx;
}

-- 
1.7.10.3