All of lore.kernel.org
 help / color / mirror / Atom feed
* Pcap question
@ 2014-03-02 19:13 Meir Tseitlin
       [not found] ` <CA+Typ9mqB4nQ1MoztqSKQ1QvQX_nWQHDybw3tTuyuqghySLGRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Meir Tseitlin @ 2014-03-02 19:13 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Hi guys,

I am experiencing problem with compiling libpcap extension with all recent
versions:

Versions after 1.5.2r2 (1.5.2r2 up to 1.6.0r1) I get the following error
compilation error:
------------------------------------------------------------------------------------------------------------------

== Build lib/librte_pmd_pcap
  CC rte_eth_pcap.o
/home/ubuntu/libs/dpdk-1.5.2r2/lib/librte_pmd_pcap/rte_eth_pcap.c: In
function 'rte_pmd_init_internals':
/home/ubuntu/libs/dpdk-1.5.2r2/lib/librte_pmd_pcap/rte_eth_pcap.c:559:30:
error: dereferencing pointer to incomplete type
/home/ubuntu/libs/dpdk-1.5.2r2/lib/librte_pmd_pcap/rte_eth_pcap.c:560:15:
error: dereferencing pointer to incomplete type
/home/ubuntu/libs/dpdk-1.5.2r2/lib/librte_pmd_pcap/rte_eth_pcap.c:561:18:
error: dereferencing pointer to incomplete type
/home/ubuntu/libs/dpdk-1.5.2r2/lib/librte_pmd_pcap/rte_eth_pcap.c:603:47:
error: dereferencing pointer to incomplete type
/home/ubuntu/libs/dpdk-1.5.2r2/lib/librte_pmd_pcap/rte_eth_pcap.c: In
function 'rte_pmd_pcap_init':
/home/ubuntu/libs/dpdk-1.5.2r2/lib/librte_pmd_pcap/rte_eth_pcap.c:732:73:
error: 'dict' undeclared (first use in this function)
/home/ubuntu/libs/dpdk-1.5.2r2/lib/librte_pmd_pcap/rte_eth_pcap.c:732:73:
note: each undeclared identifier is reported only once for each function it
appears in
/home/ubuntu/libs/dpdk-1.5.2r2/lib/librte_pmd_pcap/rte_eth_pcap.c:778:1:
error: control reaches end of non-void function [-Werror=return-type]


Versions 1.5.1r1 - 1.5.2r1 I get the following error:
------------------------------------------------------------------------------------------------------------------

  LD testpmd
/usr/bin/ld: unrecognized option '-Wl'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make[3]: *** [testpmd] Error 1
make[2]: *** [test-pmd] Error 2


My environment:
-----------------------
I am running Ubuntu 12.04 64 bit:
I tried GCC 4.6 and 4.7.3
I tried binutils (ld) 2.22 and 2.24
I tried libpcap 1.4.0 and 1.5.3

With libpcap 0.8 (12.04 original repository) version prior 1.5.2r2 does
compile successfully, but as mentioned in documentation it does not support
packet sending

Without libpcap enabled everything compiles fine


Help will be highly appreciated!
Meir Tseitlin


-- 
Kind regards,
*Meir Tseitlin*
Software architect*Mobile:* +972.54.7647417
*Fax:* +972.72.2812365
*Email:* meir.tech-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
 *http://il.linkedin.com/in/meirts <http://il.linkedin.com/in/meirts>*
*Independent consultant*
<http://maps.google.com/maps?q=&hl=en>
See who we know in
common<http://www.linkedin.com/e/wwk/6408776/?hs=false&tok=2g4qg82N8Sb5U1>Want
a signature like
this?<http://www.linkedin.com/e/sig/6408776/?hs=false&tok=20mz9jA_USb5U1>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found] ` <CA+Typ9mqB4nQ1MoztqSKQ1QvQX_nWQHDybw3tTuyuqghySLGRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-03-02 20:11   ` Olivier MATZ
       [not found]     ` <5313905E.7000603-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Olivier MATZ @ 2014-03-02 20:11 UTC (permalink / raw)
  To: Meir Tseitlin; +Cc: dev-VfR2kkLFssw

Hi Meir,

On 03/02/2014 08:13 PM, Meir Tseitlin wrote:
> I am experiencing problem with compiling libpcap extension with all recent
> versions

Indeed, I can reproduce the compilation error on current dev version.
The cause seems to be a conflict between the patches I submitted
(rte_kvargs) and the one from Mats Liljegren which was commited the
day before:

http://dpdk.org/browse/dpdk/commit/?h=1.5.2&id=4c745617a18fc37bd2a08aad512846a416665ae3

I will submit a fix.

Olivier

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found]     ` <5313905E.7000603-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2014-03-03 19:31       ` Meir Tseitlin
       [not found]         ` <CA+Typ9kW8gp4fLL7=q95ZbBjB030hAjMzh-CBn_iydWC1mPT4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Meir Tseitlin @ 2014-03-03 19:31 UTC (permalink / raw)
  To: Olivier MATZ; +Cc: dev-VfR2kkLFssw

Hi Olivier,

The patch did solved compilation errors (Thanks!), but now I am again
experiencing linkage error with executables I had in previous versions as
well:

  LD dump_cfg
/usr/bin/ld: unrecognized option '-Wl'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make[3]: *** [dump_cfg] Error 1
make[2]: *** [dump_cfg] Error 2
make[2]: *** Waiting for unfinished jobs....

  LD cmdline_test
/usr/bin/ld: unrecognized option '-Wl'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make[3]: *** [cmdline_test] Error 1
make[2]: *** [cmdline_test] Error 2

  LD testpmd
/usr/bin/ld: unrecognized option '-Wl'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make[3]: *** [testpmd] Error 1
make[2]: *** [test-pmd] Error 2


I tried it with binutils 2.22 and 2.24.

It does not happen when compiling without pcap flag enabled

Can you please put some light on it?

Many thanks
Meir Tseitlin


On Sun, Mar 2, 2014 at 10:11 PM, Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>wrote:

> Hi Meir,
>
>
> On 03/02/2014 08:13 PM, Meir Tseitlin wrote:
>
>> I am experiencing problem with compiling libpcap extension with all recent
>> versions
>>
>
> Indeed, I can reproduce the compilation error on current dev version.
> The cause seems to be a conflict between the patches I submitted
> (rte_kvargs) and the one from Mats Liljegren which was commited the
> day before:
>
> http://dpdk.org/browse/dpdk/commit/?h=1.5.2&id=
> 4c745617a18fc37bd2a08aad512846a416665ae3
>
> I will submit a fix.
>
> Olivier
>
>


-- 
Kind regards,
*Meir Tseitlin*
Software architect*Mobile:* +972.54.7647417
*Fax:* +972.72.2812365
*Email:* meir.tech-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
 *http://il.linkedin.com/in/meirts <http://il.linkedin.com/in/meirts>*
*Independent consultant*
<http://maps.google.com/maps?q=&hl=en>
See who we know in
common<http://www.linkedin.com/e/wwk/6408776/?hs=false&tok=2g4qg82N8Sb5U1>Want
a signature like
this?<http://www.linkedin.com/e/sig/6408776/?hs=false&tok=20mz9jA_USb5U1>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found]         ` <CA+Typ9kW8gp4fLL7=q95ZbBjB030hAjMzh-CBn_iydWC1mPT4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-03-03 20:32           ` Olivier MATZ
       [not found]             ` <5314E6F4.2090709-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Olivier MATZ @ 2014-03-03 20:32 UTC (permalink / raw)
  To: Meir Tseitlin; +Cc: dev-VfR2kkLFssw

Hi Meir,

On 03/03/2014 08:31 PM, Meir Tseitlin wrote:
> The patch did solved compilation errors (Thanks!), but now I am again
> experiencing linkage error with executables I had in previous versions
> as well:
>
>    LD dump_cfg
> /usr/bin/ld: unrecognized option '-Wl'
> /usr/bin/ld: use the --help option for usage information
> collect2: error: ld returned 1 exit status
> make[3]: *** [dump_cfg] Error 1
> make[2]: *** [dump_cfg] Error 2
> make[2]: *** Waiting for unfinished jobs....

Could you please retry with make V=1 ?
It will display the full command line.

This may be related to the following line in rte.app.mk:
LIBPCAP_LDFLAGS ?= $(shell pcap-config --libs).

You check the result of "pcap-config --libs" in a shell.

Regards,
Olivier

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found]             ` <5314E6F4.2090709-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2014-03-03 21:09               ` Meir Tseitlin
       [not found]                 ` <CA+Typ9kTXGfhs-t+NY+1A-Ui645JPKKSGkim9BjAU-h-d+xuNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Meir Tseitlin @ 2014-03-03 21:09 UTC (permalink / raw)
  To: Olivier MATZ; +Cc: dev-VfR2kkLFssw

Hi Olivier,

make V=1 output (last lines):

== Build lib/librte_meter
== Build lib/librte_sched
== Build lib/librte_kni
== Build app
make S=app -f /home/cigol/libs/dpdk-1.6.0r1-patch/app/Makefile -C
/home/cigol/libs/dpdk-1.6.0r1-patch/build/build/app all
== Build app/test
gcc -m64 -pthread  -march=native -DRTE_MACHINE_CPUFLAG_SSE
-DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3
-DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1
-DRTE_MACHINE_CPUFLAG_SSE4_2
-DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2
 -I/usr/local/include -I/home/cigol/libs/dpdk-1.6.0r1-patch/build/include
-include /home/cigol/libs/dpdk-1.6.0r1-patch/build/include/rte_config.h -O3
-W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align
-Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef
-Wwrite-strings -D_GNU_SOURCE  -Wl,-Map=test.map,--cref -o test commands.o
test.o test_pci.o test_prefetch.o test_byteorder.o test_per_lcore.o
test_atomic.o test_malloc.o test_cycles.o test_spinlock.o test_memory.o
test_memzone.o test_ring.o test_ring_perf.o test_rwlock.o test_timer.o
test_mempool.o test_mempool_perf.o test_mbuf.o test_logs.o test_memcpy.o
test_memcpy_perf.o test_hash.o test_hash_perf.o test_lpm.o test_lpm6.o
test_debug.o test_errno.o test_tailq.o test_string_fns.o
test_mp_secondary.o test_cpuflags.o test_eal_flags.o test_alarm.o
test_interrupts.o test_version.o test_eal_fs.o test_func_reentrancy.o
test_cmdline.o test_cmdline_num.o test_cmdline_etheraddr.o
test_cmdline_portlist.o test_cmdline_ipaddr.o test_cmdline_cirbuf.o
test_cmdline_string.o test_cmdline_lib.o test_red.o test_sched.o
test_meter.o test_kni.o test_power.o test_common.o test_timer_perf.o
test_ivshmem.o test_pmd_ring.o test_kvargs.o -Wl,-export-dynamic
-Wl,-L/home/cigol/libs/dpdk-1.6.0r1-patch/build/lib
 -Wl,-L/home/cigol/libs/dpdk-1.6.0r1-patch/build/lib -Wl,-lrte_kni
-Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_virtio
-Wl,-lrte_pmd_vmxnet3 -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_lpm
-Wl,-lrte_power -Wl,-lrte_meter -Wl,-lrte_sched -Wl,-lm -Wl,-lrt
-Wl,--start-group -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lethdev
-Wl,-lrte_pmd_ring -Wl,-lrte_malloc -Wl,-lrte_mempool -Wl,-lrte_ring
-Wl,-lrte_eal -Wl,-lrte_cmdline -Wl,-lrte_pmd_pcap -Wl,-L/usr/local/lib
-Wl,-Wl,-rpath,/usr/local/lib -Wl,-lpcap -Wl,-lrt -Wl,-lm -Wl,-ldl
-Wl,--end-group
/usr/bin/ld: unrecognized option '-Wl'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make[3]: *** [test] Error 1
make[2]: *** [test] Error 2
make[1]: *** [app] Error 2
make: *** [all] Error 2



Thanks
Meir


On Mon, Mar 3, 2014 at 10:32 PM, Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>wrote:

> Hi Meir,
>
>
> On 03/03/2014 08:31 PM, Meir Tseitlin wrote:
>
>> The patch did solved compilation errors (Thanks!), but now I am again
>> experiencing linkage error with executables I had in previous versions
>> as well:
>>
>>    LD dump_cfg
>> /usr/bin/ld: unrecognized option '-Wl'
>> /usr/bin/ld: use the --help option for usage information
>> collect2: error: ld returned 1 exit status
>> make[3]: *** [dump_cfg] Error 1
>> make[2]: *** [dump_cfg] Error 2
>> make[2]: *** Waiting for unfinished jobs....
>>
>
> Could you please retry with make V=1 ?
> It will display the full command line.
>
> This may be related to the following line in rte.app.mk:
> LIBPCAP_LDFLAGS ?= $(shell pcap-config --libs).
>
> You check the result of "pcap-config --libs" in a shell.
>
> Regards,
> Olivier
>
>


-- 
Kind regards,
*Meir Tseitlin*
Software architect*Mobile:* +972.54.7647417
*Fax:* +972.72.2812365
*Email:* meir.tech-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
 *http://il.linkedin.com/in/meirts <http://il.linkedin.com/in/meirts>*
*Independent consultant*
<http://maps.google.com/maps?q=&hl=en>
See who we know in
common<http://www.linkedin.com/e/wwk/6408776/?hs=false&tok=2g4qg82N8Sb5U1>Want
a signature like
this?<http://www.linkedin.com/e/sig/6408776/?hs=false&tok=20mz9jA_USb5U1>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found]                 ` <CA+Typ9kTXGfhs-t+NY+1A-Ui645JPKKSGkim9BjAU-h-d+xuNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-03-03 21:31                   ` Olivier MATZ
       [not found]                     ` <5314F4BA.7020507-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Olivier MATZ @ 2014-03-03 21:31 UTC (permalink / raw)
  To: Meir Tseitlin; +Cc: dev-VfR2kkLFssw

Hi Meir,

On 03/03/2014 10:09 PM, Meir Tseitlin wrote:
> -Wl,-lrte_pmd_pcap -Wl,-L/usr/local/lib -Wl,-Wl,-rpath,/usr/local/lib
> -Wl,-lpcap

The problem is related to the lines above. They are generated in
rte.app.mk:

   ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
   LDLIBS += -lrte_pmd_pcap
   LIBPCAP_LDFLAGS ?= $(shell pcap-config --libs)
   $(if $(LIBPCAP_LDFLAGS),,$(error LIBPCAP_LDFLAGS is undefined))
   LDLIBS += $(LIBPCAP_LDFLAGS)
   endif

The output of "pcap-config --libs" on your computer is probably:
   -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpcap

The problem is that the DPDK makefile add the "-Wl," to convert the
linker arguments into gcc arguments. You may want to replace the
code above by:

   ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
   LDLIBS += -lrte_pmd_pcap
   repl := -Wl,%
   LIBPCAP_LDFLAGS ?= $(patsubst -Wl$(comma),%,$(shell pcap-config --libs))
   $(if $(LIBPCAP_LDFLAGS),,$(error LIBPCAP_LDFLAGS is undefined))
   LDLIBS += $(LIBPCAP_LDFLAGS)
   endif

I don't know if it's the proper way to fix this. Maybe rte.app.mk
should take care of not adding "-Wl," if it's already there.

Regards,
Olivier

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found]                     ` <5314F4BA.7020507-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2014-03-03 21:37                       ` Olivier MATZ
       [not found]                         ` <5314F611.5010307-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Olivier MATZ @ 2014-03-03 21:37 UTC (permalink / raw)
  To: Meir Tseitlin; +Cc: dev-VfR2kkLFssw

On 03/03/2014 10:31 PM, Olivier MATZ wrote:
>    LIBPCAP_LDFLAGS ?= $(patsubst -Wl$(comma),%,$(shell pcap-config --libs))

I forgot a %:

LIBPCAP_LDFLAGS ?= $(patsubst -Wl$(comma)%,%,$(shell pcap-config --libs))

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found]                         ` <5314F611.5010307-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2014-03-03 21:45                           ` Meir Tseitlin
       [not found]                             ` <CA+Typ9mLbzccmXPE-VS-KFW9NFuXBFYuyr_ZwOkWgE0YhU7SrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Meir Tseitlin @ 2014-03-03 21:45 UTC (permalink / raw)
  To: Olivier MATZ; +Cc: dev-VfR2kkLFssw

Yep,

It did resolved the issue.

I also think it should be handled somehow by default, because Ubuntu is not
an esoteric distro. Why not patching it as well?

Anyway great work!


On Mon, Mar 3, 2014 at 11:37 PM, Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>wrote:

> On 03/03/2014 10:31 PM, Olivier MATZ wrote:
>
>>    LIBPCAP_LDFLAGS ?= $(patsubst -Wl$(comma),%,$(shell pcap-config
>> --libs))
>>
>
> I forgot a %:
>
> LIBPCAP_LDFLAGS ?= $(patsubst -Wl$(comma)%,%,$(shell pcap-config --libs))
>
>


-- 
Kind regards,
*Meir Tseitlin*
Software architect*Mobile:* +972.54.7647417
*Fax:* +972.72.2812365
*Email:* meir.tech-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
 *http://il.linkedin.com/in/meirts <http://il.linkedin.com/in/meirts>*
*Independent consultant*
<http://maps.google.com/maps?q=&hl=en>
See who we know in
common<http://www.linkedin.com/e/wwk/6408776/?hs=false&tok=2g4qg82N8Sb5U1>Want
a signature like
this?<http://www.linkedin.com/e/sig/6408776/?hs=false&tok=20mz9jA_USb5U1>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found]                             ` <CA+Typ9mLbzccmXPE-VS-KFW9NFuXBFYuyr_ZwOkWgE0YhU7SrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-03-05 20:32                               ` Meir Tseitlin
       [not found]                                 ` <CA+Typ9k1hSKwPx6oUTCs3KGJuQZXtsxZod7ge+n0-K_rzTqmNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2014-03-20 16:38                               ` Thomas Monjalon
  1 sibling, 1 reply; 13+ messages in thread
From: Meir Tseitlin @ 2014-03-05 20:32 UTC (permalink / raw)
  To: Olivier MATZ; +Cc: dev-VfR2kkLFssw

Hi Olivier,

I guess something is still wrong:

testpmd application is reporting "PMD: pcap library cannot send packets,
please rebuild with a more up to date libpcap" message when I try creating
a bridge between two network cards.

I am more than sure that older version of pcap is not installed:

cigol@cigol-desktop:~/debug$ ls -l /usr/local/lib/*pcap*
-rw-r--r-- 1 root root 1274936 Mar  5 23:26 /usr/local/lib/libpcap.a
lrwxrwxrwx 1 root root      12 Mar  5 23:26 /usr/local/lib/libpcap.so ->
libpcap.so.1
lrwxrwxrwx 1 root root      16 Mar  5 23:26 /usr/local/lib/libpcap.so.1 ->
libpcap.so.1.5.3
-rwxr-xr-x 1 root root  786725 Mar  5 23:26 /usr/local/lib/libpcap.so.1.5.3


Do you have any thoughts?

THank you for kind support,
Meir


On Mon, Mar 3, 2014 at 11:45 PM, Meir Tseitlin <mirots-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Yep,
>
> It did resolved the issue.
>
> I also think it should be handled somehow by default, because Ubuntu is
> not an esoteric distro. Why not patching it as well?
>
> Anyway great work!
>
>
> On Mon, Mar 3, 2014 at 11:37 PM, Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>wrote:
>
>> On 03/03/2014 10:31 PM, Olivier MATZ wrote:
>>
>>>    LIBPCAP_LDFLAGS ?= $(patsubst -Wl$(comma),%,$(shell pcap-config
>>> --libs))
>>>
>>
>> I forgot a %:
>>
>> LIBPCAP_LDFLAGS ?= $(patsubst -Wl$(comma)%,%,$(shell pcap-config --libs))
>>
>>
>
>
> --
> Kind regards,
>  *Meir Tseitlin*
> Software architect *Mobile:* +972.54.7647417
> *Fax:* +972.72.2812365
> *Email:* meir.tech-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>  *http://il.linkedin.com/in/meirts <http://il.linkedin.com/in/meirts>*
> *Independent consultant*
> <http://maps.google.com/maps?q=&hl=en>
> See who we know in common<http://www.linkedin.com/e/wwk/6408776/?hs=false&tok=2g4qg82N8Sb5U1> Want
> a signature like this?<http://www.linkedin.com/e/sig/6408776/?hs=false&tok=20mz9jA_USb5U1>
>
>



-- 
Kind regards,
*Meir Tseitlin*
Software architect*Mobile:* +972.54.7647417
*Fax:* +972.72.2812365
*Email:* meir.tech-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
 *http://il.linkedin.com/in/meirts <http://il.linkedin.com/in/meirts>*
*Independent consultant*
<http://maps.google.com/maps?q=&hl=en>
See who we know in
common<http://www.linkedin.com/e/wwk/6408776/?hs=false&tok=2g4qg82N8Sb5U1>Want
a signature like
this?<http://www.linkedin.com/e/sig/6408776/?hs=false&tok=20mz9jA_USb5U1>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Pcap question
       [not found]                                 ` <CA+Typ9k1hSKwPx6oUTCs3KGJuQZXtsxZod7ge+n0-K_rzTqmNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-03-06  9:00                                   ` liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w
       [not found]                                     ` <1394096440-50930-1-git-send-email-liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w @ 2014-03-06  9:00 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

> I guess something is still wrong:

> testpmd application is reporting "PMD: pcap library cannot send packets,
> please rebuild with a more up to date libpcap" message when I try creating
> a bridge between two network cards.

> I am more than sure that older version of pcap is not installed:

> cigol@cigol-desktop:~/debug$ ls -l /usr/local/lib/*pcap*
> -rw-r--r-- 1 root root 1274936 Mar  5 23:26 /usr/local/lib/libpcap.a
> lrwxrwxrwx 1 root root      12 Mar  5 23:26 /usr/local/lib/libpcap.so ->
> libpcap.so.1
> lrwxrwxrwx 1 root root      16 Mar  5 23:26 /usr/local/lib/libpcap.so.1 ->
> libpcap.so.1.5.3
> -rwxr-xr-x 1 root root  786725 Mar  5 23:26 /usr/local/lib/libpcap.so.1.5.3

> Do you have any thoughts?

I had this problem a couple of months ago, and tracked it down to a
check for a macro named pcap_sendpacket. I didn't have this macro, but
it is a function, so I simply removed the check and got things
working.
I thought I mentioned this in the DPDK mailing list, but I cannot find
any evidence of this. So I probably didn't...

Since I have lost the original patch I used to solve this issue, I
made a new patch that might work for you, which you should be able to
find as a reply to this message. It was made completely out of my
memory of this and I haven't tested it, but the change is pretty
trivial so I'm sure you can work out any mistakes I might have made.

I hope this helps you.

Best regards,
Mats Liljegren

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] pcap: Remove check for pcap_sendpacket
       [not found]                                     ` <1394096440-50930-1-git-send-email-liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-03-06  9:00                                       ` liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w
  2014-03-06 10:10                                       ` Pcap question David Marchand
  1 sibling, 0 replies; 13+ messages in thread
From: liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w @ 2014-03-06  9:00 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Mats Liljegren <mats.liljegren-AM1FMPraTHU@public.gmane.org>

Current test relies on the fact that pcap_sendpacket is a macro. Since it is
a function, the test fails, causing loss of sending ability when using pcap.

Signed-off-by: Mats Liljegren <mats.liljegren-AM1FMPraTHU@public.gmane.org>
---
 lib/librte_pmd_pcap/rte_eth_pcap.h |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/lib/librte_pmd_pcap/rte_eth_pcap.h b/lib/librte_pmd_pcap/rte_eth_pcap.h
index c0bc5d8..0e28e0b 100644
--- a/lib/librte_pmd_pcap/rte_eth_pcap.h
+++ b/lib/librte_pmd_pcap/rte_eth_pcap.h
@@ -39,11 +39,7 @@ extern "C" {
 #endif
 #include <pcap.h>
 
-#ifdef pcap_sendpacket
 #define PCAP_CAN_SEND
-#else
-#undef PCAP_CAN_SEND
-#endif
 
 #define RTE_ETH_PCAP_PARAM_NAME "eth_pcap"
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found]                                     ` <1394096440-50930-1-git-send-email-liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2014-03-06  9:00                                       ` [PATCH] pcap: Remove check for pcap_sendpacket liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w
@ 2014-03-06 10:10                                       ` David Marchand
  1 sibling, 0 replies; 13+ messages in thread
From: David Marchand @ 2014-03-06 10:10 UTC (permalink / raw)
  To: Mats Liljegren; +Cc: dev-VfR2kkLFssw

Hello Mats, Meir,

On Thu, Mar 6, 2014 at 10:00 AM, <liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>
> I had this problem a couple of months ago, and tracked it down to a
> check for a macro named pcap_sendpacket. I didn't have this macro, but
> it is a function, so I simply removed the check and got things
> working.
> I thought I mentioned this in the DPDK mailing list, but I cannot find
> any evidence of this. So I probably didn't...
>
> Since I have lost the original patch I used to solve this issue, I
> made a new patch that might work for you, which you should be able to
> find as a reply to this message. It was made completely out of my
> memory of this and I haven't tested it, but the change is pretty
> trivial so I'm sure you can work out any mistakes I might have made.

Actually, the more I look at this, the more I think we should just revert
the
patches I submitted to support old pcap libraries.
I will send a revert patch for now and try to find a better approach later.

So, the patch from Olivier (resolving the conflict on kvargs) and the revert
patch I will send should be enough.
Can you confirm it is working fine for you ?


Regards,
--
David Marchand

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Pcap question
       [not found]                             ` <CA+Typ9mLbzccmXPE-VS-KFW9NFuXBFYuyr_ZwOkWgE0YhU7SrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2014-03-05 20:32                               ` Meir Tseitlin
@ 2014-03-20 16:38                               ` Thomas Monjalon
  1 sibling, 0 replies; 13+ messages in thread
From: Thomas Monjalon @ 2014-03-20 16:38 UTC (permalink / raw)
  To: Meir Tseitlin; +Cc: dev-VfR2kkLFssw

Hi,

03/03/2014 23:45, Meir Tseitlin :
> I also think it should be handled somehow by default, because Ubuntu is not
> an esoteric distro. Why not patching it as well?

This issue should have disappeared after this commit:
http://dpdk.org/browse/dpdk/commit/?id=2a315d698510e7b33a7c9516ef532dbcd44c027f

-- 
Thomas

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-03-20 16:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-02 19:13 Pcap question Meir Tseitlin
     [not found] ` <CA+Typ9mqB4nQ1MoztqSKQ1QvQX_nWQHDybw3tTuyuqghySLGRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-02 20:11   ` Olivier MATZ
     [not found]     ` <5313905E.7000603-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-03 19:31       ` Meir Tseitlin
     [not found]         ` <CA+Typ9kW8gp4fLL7=q95ZbBjB030hAjMzh-CBn_iydWC1mPT4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-03 20:32           ` Olivier MATZ
     [not found]             ` <5314E6F4.2090709-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-03 21:09               ` Meir Tseitlin
     [not found]                 ` <CA+Typ9kTXGfhs-t+NY+1A-Ui645JPKKSGkim9BjAU-h-d+xuNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-03 21:31                   ` Olivier MATZ
     [not found]                     ` <5314F4BA.7020507-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-03 21:37                       ` Olivier MATZ
     [not found]                         ` <5314F611.5010307-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-03 21:45                           ` Meir Tseitlin
     [not found]                             ` <CA+Typ9mLbzccmXPE-VS-KFW9NFuXBFYuyr_ZwOkWgE0YhU7SrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-05 20:32                               ` Meir Tseitlin
     [not found]                                 ` <CA+Typ9k1hSKwPx6oUTCs3KGJuQZXtsxZod7ge+n0-K_rzTqmNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-06  9:00                                   ` liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w
     [not found]                                     ` <1394096440-50930-1-git-send-email-liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-06  9:00                                       ` [PATCH] pcap: Remove check for pcap_sendpacket liljegren.mats2-Re5JQEeQqe8AvxtiuMwx3w
2014-03-06 10:10                                       ` Pcap question David Marchand
2014-03-20 16:38                               ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.