Date: Sun, 14 Sep 2014 22:42:43 +0800 From: "dongshan" <thomasyang1206@126.com> To: <net@freebsd.org> Subject: netmap BUG found on big endian machine Message-ID: <001e01cfd02a$255cb430$70161c90$@126.com>
next in thread | raw e-mail | index | archive | help
Hi,=20 =20 I have tested netmap on freescale PowerPC board, it is a big = endian machine, when I test the example app pkt-gen=A3=AC I found one bug, = really it is bug of netmap souce code. The commit id is = =A1=B0d39c4411a2129926d262f9faffacaf876392c7cd=A1=B1, the bug locates in =A1=B0netmap_mem2.c, netmap_mem_rings_create()=A1=B1, you = should use=20 =A1=B0*(uint32_t *)(uintptr_t)&ring->nr_buf_size =3D NETMAP_BDG_BUF_SIZE(na->nm_mem);=A1=B1 substituting =A1=B0*(uint16_t *)(uintptr_t)&ring->nr_buf_size =3D NETMAP_BDG_BUF_SIZE(na->nm_mem);=A1=B1 Because the outcome of big endian and little endian is different. = I guess the source code is written and tested on intel arch machine. But = it is true it can=A1=AFt run big endian machine directly. =20 =20 Best regards, Dongshan =20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001e01cfd02a$255cb430$70161c90$>