[dpdk-dev] [PATCH v2] add sample functions for packet forwarding

Pattan, Reshma reshma.pattan at intel.com
Thu Jul 12 18:00:22 CEST 2018


Hi Jananee,

> -----Original Message-----
> From: Parthasarathy, JananeeX M
> Sent: Thursday, July 12, 2018 9:53 AM
> To: dev at dpdk.org
> Cc: Horton, Remy <remy.horton at intel.com>; Pattan, Reshma
> <reshma.pattan at intel.com>; Parthasarathy, JananeeX M
> <jananeex.m.parthasarathy at intel.com>; Chaitanya Babu, TalluriX
> <tallurix.chaitanya.babu at intel.com>
> Subject: [PATCH v2] add sample functions for packet forwarding
> 

I could apply the patch succefully but there was a warning, just check  is the white line can be removed.
git apply v2-add-sample-functions-for-packet-forwarding
v2-add-sample-functions-for-packet-forwarding:160: new blank line at EOF.
+
warning: 1 line adds whitespace errors.

> +	uint16_t socket_id = rte_socket_id();
> +	struct rte_ring *rxtx[NUM_RINGS];
> +	rxtx[0] = rte_ring_create("R0", RING_SIZE, socket_id,
> +			RING_F_SP_ENQ|RING_F_SC_DEQ);
> +	if (rxtx[0] == NULL) {
> +		printf("%s() line %u: rte_ring_create R0 failed",
> +				__func__, __LINE__);
> +		return TEST_FAILED;
> +	}
> +	rxtx[1] = rte_ring_create("R1", RING_SIZE, socket_id,
> +			RING_F_SP_ENQ|RING_F_SC_DEQ);
> +	if (rxtx[1] == NULL) {
> +		printf("%s() line %u: rte_ring_create R1 failed",
> +				__func__, __LINE__);
> +		return TEST_FAILED;
> +	}
> +	tx_portid = rte_eth_from_rings("net_ringa", rxtx, NUM_QUEUES, rxtx,
> +			NUM_QUEUES, socket_id);
> +	rx_portid = rte_eth_from_rings("net_ringb", rxtx, NUM_QUEUES, rxtx,
> +			NUM_QUEUES, socket_id);

Also can you see if you can create only one port using rings instead of 2 and use it for 
two ports rx_port id and tx_ports ids?  And will that fit for all the UTs that you are writing.

Thanks,
Reshma


More information about the dev mailing list