Skip to contentSkip to conversation

cannot disable RTE_ETHDEV_RXTX_CALLBACKS from rte_config.h

DPDK/ethdev Bug 1448 [email protected] 1 participant 4 messages May 30, 2024

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=1448

            Bug ID: 1448
           Summary: cannot disable RTE_ETHDEV_RXTX_CALLBACKS from
                    rte_config.h
           Product: DPDK
           Version: 24.07
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

RTE_ETHDEV_RXTX_CALLBACKS is used with ifdefs in ethdev. But it is defined as #define RTE_ETHDEV_RXTX_CALLBACKS 1
in rte_config.h

Hence we cannot actually disable it unless we undef/comment it. Rather, we should use #if

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=1448

Morten Brørup ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Morten Brørup ([email protected]) --- Using #ifdef is the convention in DPDK, like in the Linux Kernel.

The way to disable it is to outcomment it like this:

/* RTE_ETHDEV_RXTX_CALLBACKS is not set */

E.g.:
https://elixir.bootlin.com/dpdk/v24.03/source/config/rte_config.h#L60

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#2 lore raw
In reply to [email protected]

https://bugs.dpdk.org/show_bug.cgi?id=1448

Thomas Monjalon ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|RESOLVED                    |CONFIRMED
         Resolution|INVALID                     |---
                 CC|                            |[email protected]
     Ever confirmed|0                           |1

--- Comment #2 from Thomas Monjalon ([email protected]) --- We are not supposed to change anything in config/rte_config.h because it is a source file.
The configuration should be changed only in the application or with Meson.

If think using #if is the good option here.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#3 lore raw
In reply to [email protected]

https://bugs.dpdk.org/show_bug.cgi?id=1448

Morten Brørup ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |INVALID
             Status|CONFIRMED                   |RESOLVED

--- Comment #3 from Morten Brørup ([email protected]) --- The config/rte_config.h source code configuration is for exotic configuration parameters that we don't want to expose to Meson.

The threshold between normal and exotic is not well defined. :-)

The bug report says that ethdev rx/tx callbacks cannot be disabled in config/rte_config.h, where it is configurable. This is not correct. They can be disabled in config/rte_config.h, so there is no bug; the bug reporter just didn't know how to do it.

Although I personally prefer #if over #ifdef, it would be a huge patch series to replace all occurrences of #ifdef XYZ with #if XYZ. (2800+ LOC containing '#ifdef': grep -r '#ifdef' | grep -v '__cplusplus' | wc)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.