numam-dpdk/drivers/net/enic
Nelson Escobar ce93d3c36d net/enic: fix resource check failures when bonding devices
The enic PMD was using the same variables in the enic structure to
track two different things.  Initially rq_count, wq_count, cq_count,
and intr_count were set to the values obtained from the VIC adapters
as the maximum resources allocated on the VIC, then in
enic_set_vnic_res(), they were set to the counts of resources actually
used, discarding the initial values. The checks in enic_set_vnic_res()
were technically incorrect if it is called more than once on a port,
which happens when using bonding, but were harmless in practice as the
checks couldn't fail on the second call.

The enic rx-scatter patch misunderstood the subtleties of
enic_set_vnic_res(), and naively added a multiply by two to the
rq_count check. This resulted in the rq_count check failing when
enic_set_vnic_res() was called a second time, ie when using bonding.

This patch adds new variables to the enic structure to track the
maximum resources the VIC is configured to provide so that the
information isn't later lost and calls to enic_set_vnic_res() do
the expected thing.

Fixes: 856d7ba7ed ("net/enic: support scattered Rx")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
2016-07-08 22:51:03 +02:00
..
base net/enic: fix Tx crash after restart 2016-07-05 15:36:23 +02:00
enic_clsf.c net/enic: fix name of classifiers hash table 2016-06-28 12:09:52 +02:00
enic_compat.h enic: remove #ident lines 2015-09-30 01:19:19 +02:00
enic_ethdev.c net/enic: fix resource check failures when bonding devices 2016-07-08 22:51:03 +02:00
enic_main.c net/enic: fix resource check failures when bonding devices 2016-07-08 22:51:03 +02:00
enic_res.c net/enic: fix resource check failures when bonding devices 2016-07-08 22:51:03 +02:00
enic_res.h net/enic: determine max egress packet size and max MTU 2016-06-29 11:54:46 +02:00
enic_rxtx.c net/enic: remove useless assert macro 2016-07-10 16:19:56 +02:00
enic.h net/enic: fix resource check failures when bonding devices 2016-07-08 22:51:03 +02:00
LICENSE enic: move to drivers/net/ 2015-05-22 16:05:52 +02:00
Makefile net/enic: put Tx and Rx functions into same file 2016-06-15 17:13:56 +02:00
rte_pmd_enic_version.map enic: move to drivers/net/ 2015-05-22 16:05:52 +02:00