I got another machine to try which has only 4.4 and it compiles. Sign.. what is going on...
From: [email protected] To: [email protected] Date: Mon, 19 Oct 2015 07:34:06 +0000 Subject: Re: [Ntop-misc] Failed to send packet total size greater than 64bytes using code from the zsend example I am using the latest code from git. May I ask is it necessary to upgrade gcc to 4.8.4? How about the ubuntu version requirement? One more question is why I got "checking for pthread_setaffinity_np in -lpthread... no" i use pthread a lot, and i am sure the set affinity is also working... B.R Bryan From: [email protected] Date: Mon, 19 Oct 2015 09:26:51 +0200 To: [email protected] Subject: Re: [Ntop-misc] Failed to send packet total size greater than 64bytes using code from the zsend example Please use latest code from git, libnuma dependency has been removed there as you noticed, and upgrade gcc (my ubuntu has version 4.8.4). Alfredo On 19 Oct 2015, at 08:59, Bryan Fok <[email protected]> wrote:I did a lot of testing and encountered multiple problems. 1) my other computer has ZC and seems to be working, and it print out is license 6.1.1.150917. the computer which is not working having license 6.0.x. 2) so I try to install 6.1.1 on it. I copy the same library over and get the libnuma error at .userland/lib/configure. NOTE: In fact I had libnuma-dev installed. ii libnuma-dbg 2.0.8~rc3-1 Debug package for libnuma ii libnuma-dev 2.0.8~rc3-1 Development files for libnuma ii libnuma1 2.0.8~rc3-1 Libraries for controlling NUMA policy ii numactl 2.0.8~rc3-1 ./configure output .... hecking librdi.h usability... no checking librdi.h presence... no checking for librdi.h... no checking for pthread_setaffinity_np in -lpthread... no checking for librdi.h... (cached) no checking for redisCommand in -lhiredis... no checking for numa_available in -lnuma... no checking if libnuma is present... no Please install libnuma-dev in order to use PF_RING 3) and than I tried the new dev download from https://github.com/ntop/PF_RING and i get this: checking librdi.h usability... no checking librdi.h presence... no checking for librdi.h... no checking for pthread_setaffinity_np in -lpthread... no checking for librdi.h... (cached) no checking for redisCommand in -lhiredis... no checking for clock_gettime in -lrt... no checking for nl_handle_alloc in -lnl... no checking for dag_get_stream_erf_types in -ldag... no checking for NT_Init in -lntapi... no checking if ntapi is present... checking Accolade support... no checking Myricom support... no configure: creating ./config.status config.status: creating Makefile config.status: creating pfring_config config.status: creating ../examples/Makefile config.status: creating ../examples_zc/Makefile config.status: creating ../examples_libzero/Makefile config.status: creating ../c++/Makefile config.status: creating config.h config.status: config.h is unchanged make[2]: Entering directory `/home/bfok/Downloads/PF_RING-dev/userland/lib' gcc -march=core-avx2 -mtune=core-avx2 -Wall -fPIC -I../../kernel -I../libpcap -D ENABLE_BPF -D ENABLE_HW_TIMESTAMP -O2 -c pfring.c -o pfring.o pfring.c:1:0: error: bad value (core-avx2) for -march= switch pfring.c:1:0: error: bad value (core-avx2) for -mtune= switch make[2]: *** [pfring.o] Error 1 make[2]: Leaving directory `/home/bfok/Downloads/PF_RING-dev/userland/lib' make[1]: *** [libpfring] Error 2 make[1]: Leaving directory `/home/bfok/Downloads/PF_RING-dev/userland' make: *** [all] Error 2 4) the funny thing is the other computer which installed 6.1.1 can compile this new pf_ring version, and they have exactly the same version of ubuntu (Ubuntu 12.04.5 LTS), and gcc (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ). Bryan From: [email protected] Date: Fri, 16 Oct 2015 15:00:50 +0200 To: [email protected] Subject: Re: [Ntop-misc] Failed to send packet total size greater than 64bytes using code from the zsend example Hi Brianit does work for me with the same configuration # ethtool -i eth0 driver: e1000e version: 3.2.4.2-NAPI .. # ./zbalance_ipc -i zc:eth0 -c 1 -n 1 max_packet_len=1536 .. Alfredo On 16 Oct 2015, at 12:10, Bryan Fok <[email protected]> wrote:The driver i am using is under ZC e1000e FYI From: [email protected] To: [email protected] Date: Fri, 16 Oct 2015 09:52:14 +0000 Subject: Re: [Ntop-misc] Failed to send packet total size greater than 64bytes using code from the zsend example BTW I am passing zc:eth1 as the device_name argument From: [email protected] To: [email protected] Date: Fri, 16 Oct 2015 09:49:23 +0000 Subject: Re: [Ntop-misc] Failed to send packet total size greater than 64bytes using code from the zsend example Thank you Alfredo both print 0. How do I fix this? Bryan From: [email protected] Date: Fri, 16 Oct 2015 10:01:33 +0200 To: [email protected] Subject: Re: [Ntop-misc] Failed to send packet total size greater than 64bytes using code from the zsend example Please print:1. asio::pf_ring::max_packet_len(device_name.c_str())2. buffers[0]->len before pfring_zc_send_pkt() Alfredo On 16 Oct 2015, at 08:52, Bryan Fok <[email protected]> wrote:FYI non zero-copy does not have this limit From: [email protected] To: [email protected] Date: Fri, 16 Oct 2015 06:50:32 +0000 Subject: [Ntop-misc] Failed to send packet total size greater than 64bytes using code from the zsend example pfring_zc_send_pkt() always return -1 when the message size (include the header + my application data) is greater than 64 bytes. Please help. This is how I create the cluster zc = pfring_zc_create_cluster(cluster_id, asio::pf_ring::max_packet_len(device_name.c_str()), 0, NBUFF, numa_node_of_cpu(bind_cpu), NULL /* auto hugetlb mountpoint */ ); if (zc == NULL) { fprintf(stderr, "pfring_zc_create_cluster error [%s] Please check your hugetlb configuration\n", strerror(errno)); return -1; } zq = pfring_zc_open_device(zc, device_name.c_str(), tx_only, 0); if (zq == NULL) { fprintf(stderr, "pfring_zc_open_device error [%s] Please check that %s is up and not already used\n", strerror(errno), device_name.c_str()); return -1; } fprintf(stderr, "Sending packets to %s\n", device_name.c_str()); for (int i = 0; i < NBUFF; i++) { buffers[i] = pfring_zc_get_packet_handle(zc); if (buffers[i] == NULL) { fprintf(stderr, "pfring_zc_get_packet_handle error\n"); return -1; } } This is how I send the packet char a[23] = {0}; //23 + 42 = 65 return -1 from the send function, resetting a to 22 it works int tot_msg_size = forge_udp_packet(pfring_zc_pkt_buff_data(buffers[0], zq), 1600, a, sizeof(a), parse_ip_v4_string(sender_ip.c_str()), sender_port, parse_ip_v4_string(mcast_ip.c_str()), mcast_port); std::cout << "tot_msg_size:" << std::dec << tot_msg_size << std::endl; buffers[0]->len = tot_msg_size; std::cout << "buffers[0] : "; for (int i = 0; i < buffers[0]->len; ++i) { std::cout << std::hex << (int) pfring_zc_pkt_buff_data(buffers[0], zq)[i] << " "; } int rc = pfring_zc_send_pkt(zq, &buffers[0], 0); B.R Bryan _______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc_______________________________________________Ntop-misc mailing [email protected]http://listgateway.unipi.it/mailman/listinfo/ntop-misc _______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc _______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc _______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc_______________________________________________Ntop-misc mailing [email protected]http://listgateway.unipi.it/mailman/listinfo/ntop-misc _______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-miscg_______________________________________________Ntop-misc mailing [email protected]http://listgateway.unipi.it/mailman/listinfo/ntop-misc _______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc _______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc
_______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc
