示例#1
0
int
main(int argc, char *argv[])
{
	struct dpif_dpdk_message request;
	const struct ofpbuf test_ofpbuf[20];
	const struct ofpbuf *const *test_ofpbuf_array =
		(const struct ofpbuf *const *) &test_ofpbuf;

	int result = 0;

	rte_eal_init(argc, argv);
	/* Init all rings and a fake mempool with 3 mbufs */
	init_test_rings(3);

	/* Test dpdk_link_send_bulk(), num_pkts > PKT_BURST_SIZE */
	result = dpdk_link_send_bulk(&request, test_ofpbuf_array, 500);
	assert(result == EINVAL);

	return 0;
}
示例#2
0
/* Sends 'packet' and 'request' data to datapath. */
int
dpdk_link_send(struct dpif_dpdk_message *request,
               const struct ofpbuf *const packet)
{
    return dpdk_link_send_bulk(request, &packet, 1);
}