[PATCH v4 1/6] dpdk: do not force C linkage on include file dependencies

Mattias Rönnblom hofors at lysator.liu.se
Tue Sep 10 07:10:08 CEST 2024


On 2024-09-10 02:50, fengchengwen wrote:
> On 2024/9/9 22:57, Mattias Rönnblom wrote:
>> diff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h
>> index 5474a5281d..11b72b0f2d 100644
>> --- a/lib/dmadev/rte_dmadev.h
>> +++ b/lib/dmadev/rte_dmadev.h
>> @@ -149,10 +149,6 @@
>>   #include <rte_bitops.h>
>>   #include <rte_common.h>
>>   
>> -#ifdef __cplusplus
>> -extern "C" {
>> -#endif
>> -
>>   /** Maximum number of devices if rte_dma_dev_max() is not called. */
>>   #define RTE_DMADEV_DEFAULT_MAX 64
> 
> There are many C functions declaration in this region, we should wrap it
> by extern "C" {}, so let's keep or add like:
> 
> #include "rte_dmadev_core.h"
> #ifdef __cplusplus
>      }
> #endif
> 
> #include "rte_dmadev_trace_fp.h"
> 
> #ifdef __cplusplus
>      extern "C" {
> #endif
> 

OK, will do. Thanks!

>>   
>> @@ -775,6 +771,10 @@ struct rte_dma_sge {
>>   #include "rte_dmadev_core.h"
>>   #include "rte_dmadev_trace_fp.h"
>>   
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>>   /**@{@name DMA operation flag
>>    * @see rte_dma_copy()
>>    * @see rte_dma_copy_sg()


More information about the dev mailing list