Ilias Apalodimas(apalos) replied on github web page:

platform/linux-generic/m4/odp_pcapng.m4
line 17
@@ -0,0 +1,19 @@
+##########################################################################
+# Enable PCAPNG support
+##########################################################################
+have_pcapng=no
+AC_ARG_ENABLE([pcapng-support],
+       [AS_HELP_STRING([--enable-pcapng-support],
+       [enable experimental tcpdump for pktios])],
+       have_pcapng=$enableval)
+
+if test x$have_pcapng = xyes
+then
+    AC_DEFINE([ODP_PCAPNG], [1],
+             [Define to 1 to enable pcapng support])
+else
+    AC_DEFINE([ODP_PCAPNG], [0],
+             [Define to 0 to disable pcapng support])
+fi


Comment:
We did that in net_mdev and the "if" was corrected to check the value was equal 
to 1

> Ilias Apalodimas(apalos) wrote:
> This is how dpdk zero-copy was introduced. I think we need to keep that for 
> the same reasons @Bill-Fischofer-Linaro mentioned


>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>> @lumag This style ensures that the code is always syntax-checked since it is 
>> compiled, but then optimized away if it is not active. I've found this to be 
>> a useful idiom.


>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>> Having this as a section of the User Guide is fine, but you need to add 
>>> this file to the list in `doc/users-guide/Makefile.am` so that changes to 
>>> it will cause the User Guide to be regenerated.


>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>> This formats as __\<odp global pid\>-\<NIC name\>-flow-\<queue *number\>__ 
>>>> 
>>>> Is that what you wanted? 


>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>> @lumag Unfortunately flexibility comes at a price. We can't have untested 
>>>>> features and if they are selectable at `configure` time then I don't see 
>>>>> how to avoid this.


>>>>>> Dmitry Eremin-Solenikov(lumag) wrote:
>>>>>> I'm thinking about limiting variety of build options here. Not in your 
>>>>>> PR, but there are just way tooo many


>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote:
>>>>>>> And also it should be `_odp_pcapng_FOO`


>>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote:
>>>>>>>> `_odp_smth...`


>>>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote:
>>>>>>>>> Neat idea, but just put pcapng_prepare inside header and define it to 
>>>>>>>>> empty val if ODP_PCAPNG is undefined.
>>>>>>>>> Also if it returns an error, it should not require one to call 
>>>>>>>>> pcapng_destroy() afterwards. Just make it clean up after itself in 
>>>>>>>>> case of an error.


>>>>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote:
>>>>>>>>>> Just use one AC_DEFINE and check using `#ifdef` inside.


https://github.com/Linaro/odp/pull/488#discussion_r169251402
updated_at 2018-02-20 09:22:21

Reply via email to