[dpdk-dev] [PATCH v8] eal: make lcore_config private

David Marchand david.marchand at redhat.com
Tue Oct 22 18:49:02 CEST 2019


On Tue, Oct 22, 2019 at 6:30 PM Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> On Tue, 22 Oct 2019 11:05:01 +0200
> David Marchand <david.marchand at redhat.com> wrote:
>
> > On Wed, Oct 2, 2019 at 9:40 PM Stephen Hemminger
> > <stephen at networkplumber.org> wrote:
> > > +struct lcore_config {
> > > +       pthread_t thread_id;       /**< pthread identifier */
> > > +       int pipe_master2slave[2];  /**< communication pipe with master */
> > > +       int pipe_slave2master[2];  /**< communication pipe with master */
> > > +
> > > +       lcore_function_t * volatile f; /**< function to call */
> > > +       void * volatile arg;       /**< argument of function */
> > > +       volatile int ret;          /**< return value of function */
> > > +
> > > +       uint32_t core_id;          /**< core number on socket for this lcore */
> > > +       uint32_t core_index;       /**< relative index, starting from 0 */
> > > +       uint16_t socket_id;        /**< physical socket id for this lcore */
> > > +       uint8_t core_role;         /**< role of core eg: OFF, RTE, SERVICE */
> > > +       uint8_t detected;          /**< true if lcore was detected */
> > > +       volatile enum rte_lcore_state_t state; /**< lcore state */
> > > +       rte_cpuset_t cpuset;       /**< cpu set which the lcore affinity to */
> > > +};
> >
> > There are still changes on the core_id, core_index, socket_id that I
> > am not confortable with (at this point).
> >
> > I prepared a series for -rc1 on ABI changes in EAL (that I will send shortly).
> > I took your patch without the changes on core_id, core_index and socket_id.
>
>
> Why, please be more precise.
>

I commented earlier that there were integer conversion with the fields
you changed.

core_id is ok, and a uint32_t would be fine, but this does not change the size.
socket_id needs investigation, but should be safe.
I am nervous about core_index, because it is used as a signed integer.

It looks too dangerous to blindly accept this change with the only
reason of saving space.


-- 
David Marchand



More information about the dev mailing list