[dpdk-dev] [PATCH] net/enic: fix checking for sufficient resources

Bruce Richardson bruce.richardson at intel.com
Fri Jul 8 18:04:21 CEST 2016


On Wed, Jul 06, 2016 at 04:21:59PM -0700, Nelson Escobar wrote:
> 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: 856d7ba7ed22 ("net/enic: support scattered Rx")
> 
> Signed-off-by: Nelson Escobar <neescoba at cisco.com>

Applied to dpdk-next-net/rel_16_07

/Bruce


More information about the dev mailing list