problem of netmap running on PowerPC platform board
Luigi Rizzo
rizzo at iet.unipi.it
Sun Jun 1 18:59:31 UTC 2014
On Sunday, June 1, 2014, dongshan <thomasyang1206 at 126.com> wrote:
> Hi,
>
>
>
> very good work you have done, thank you for sharing the source code of
> netmap.
>
>
>
> These days I am trying to test netmap performance on PowerPC 32 bit board,
> followed the guide, I rebuilt the kernel and netmap modules, then I tested
> pkt-gen. when configured it as RX mode, it seems work fine. But when I test
> the TX mode, segmentation fault error
> As you probably figured out, it is an endianness issue (I have not had a
> chance to test netmap on a bigendian machine).
To further track down the problem could you try and see if using vale:xx as
interface name still gives a segfault ?
This would help me identify what part of the code to look at.
Also what network interface are you using (nic model/driver) ?
Thanks
Luigi
>
> occurs. Am sure the procedures I did
> was right, as I followed the procedures as what I did on X86 platform.
>
>
>
> Here is the info:
>
> root at p4080ds:~/netmap_modules# ./pkt-gen -i eth0 -f tx -n 500111222 -l 60
> -w
> 10
> 886.299155 main [1624] interface is eth0
> 886.299712 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0
> 886.299731 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0
> 886.517024 main [1807] mapped 334980KB at 0x48003000
> Sending on netmap:eth0: 1 queues, 1 threads and 1 cpus.
> 10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> ff:ff:ff:ff:ff:ff)
> 886.517087 main [1885] Sending 512 packets every 0.000000000 s
> 886.517099 main [1887] Wait 10 secs for phy reset
> 896.517259 main [1889] Ready...
> 896.517293 nm_open [457] overriding ifname eth0 ringid 0x0 flags 0x1
> 896.517428 sender_body [996] start
> Segmentation fault
>
>
>
> After carefully debugging, I found where the error occurs. In pkt-gen.c
> file, line 691:
>
> .
>
> } else if (options & OPT_MEMCPY) {
>
> memcpyu(frame, p, size);
>
> if ( fcnt == nfrags)
>
> .
>
> The 'p' address in the code is out of range of the mmap(). Then I traced it
> and found the root error but I don't know how to correct it. I used GDB to
> debug the code, in netmap_user.h file: 525, I added info of r->ofs as:
>
> .
>
> for(i = 0; i <+ d->req.nr_tx_rings, i++) {
>
> struct netmap_ring *r = NETMAP_TXRING(d->nifp, i);
>
> D("TX%d %p h %d c %d t %d ofs 0x%lx", i, r, r->head, r->cur,
> r->tail,
> r->buf_ofs);
>
> }
>
> .
>
> The red is what I added. It outcomes the 'ofs' is 0x8000000, however 0x800
> is expected.
>
> The board I tested is PowerPC big endian 32 bit board, kernel: linux 3.8. I
> am not whether it effects the outcome.
>
>
>
> Best regards,
>
> Dongshan
>
>
>
> _______________________________________________
> freebsd-net at freebsd.org <javascript:;> mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org
> <javascript:;>"
>
--
-----------------------------------------+-------------------------------
Prof. Luigi RIZZO, rizzo at iet.unipi.it . Dip. di Ing. dell'Informazione
http://www.iet.unipi.it/~luigi/ . Universita` di Pisa
TEL +39-050-2211611 . via Diotisalvi 2
Mobile +39-338-6809875 . 56122 PISA (Italy)
-----------------------------------------+-------------------------------
More information about the freebsd-net
mailing list