Hi Brian it 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] > <mailto:[email protected]>> wrote: > > FYI non zero-copy does not have this limit > > From: [email protected] <mailto:[email protected]> > To: [email protected] <mailto:[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] <mailto:[email protected]> > http://listgateway.unipi.it/mailman/listinfo/ntop-misc > <http://listgateway.unipi.it/mailman/listinfo/ntop-misc>_______________________________________________ > Ntop-misc mailing list > [email protected] <mailto:[email protected]> > http://listgateway.unipi.it/mailman/listinfo/ntop-misc > <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 list > [email protected] <mailto:[email protected]> > http://listgateway.unipi.it/mailman/listinfo/ntop-misc > <http://listgateway.unipi.it/mailman/listinfo/ntop-misc>
_______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc
