> -----Original Message-----
> From: Ferruh Yigit <ferruh.yi...@intel.com>
> Sent: Thursday, March 3, 2022 10:52 PM
> To: Vamsi Krishna Attunuru <vattun...@marvell.com>; dev@dpdk.org
> Cc: Jerin Jacob Kollanukkaran <jer...@marvell.com>; Nithin Kumar
> Dabilpuram <ndabilpu...@marvell.com>; yux.ji...@intel.com;
> sta...@dpdk.org; Wei Ling <weix.l...@intel.com>; Srikanth Yalavarthi
> <syalavar...@marvell.com>
> Subject: [EXT] Re: [PATCH v2 1/1] common/cnxk: fix static assertion failure
> 
> External Email
> 
> ----------------------------------------------------------------------
> On 3/2/2022 1:46 PM, Vamsi Attunuru wrote:
> > Use dynamically allocated memory for storing soft expiry ring base
> > addresses which fixes the static assertion failure, as the size of
> > dynamic allocation depends on RTE_MAX_ETHPORTS which varies based on
> > the build config.
> >
> 
> Hi Vamsi,
> 
> "fix static assertion failure" is not enough descriptive.
> assertions already added to verify assumptions, and in this case it seems it
> failed, but what was actually wrong?
> 
> Is it that allocated memory size for ring wrong? (this is what I got from
> commit log but I am not sure)
> 
> Can you please describe what actually was wrong and fixed now?
> 
Hi Ferruh,

Earlier sa_soft_exp_ring struct member was an array of pointers and it's size 
is linked to num RTE_MAX_ETHPORTS, 
and the whole struct size is confined and protected by size assertion.  It 
resulted in build failure with -Dmax_ethports=1024
option and assertion caught that failure. V2 fixes the issues by allocating the 
required memory dynamically instead
 of using array of pointers.

> > Bugzilla ID: 940
> > Fixes: d26185716d3f ("net/cnxk: support outbound soft expiry
> > notification") Cc:sta...@dpdk.org
> >
> > Reported-by: Wei Ling<weix.l...@intel.com>
> > Reported-by: Yu Jiang<yux.ji...@intel.com>
> > Signed-off-by: Vamsi Attunuru<vattun...@marvell.com>
> > Signed-off-by: Srikanth Yalavarthi<syalavar...@marvell.com>
> > ---
> > V2: Add bugzilla & reportee details, remove unused changes.
> > ---

Reply via email to