summaryrefslogtreecommitdiff
path: root/examples/rxtx_callbacks
diff options
context:
space:
mode:
authorJohn McNamara <john.mcnamara@intel.com>2015-03-12 16:54:28 +0000
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-03-30 21:51:48 +0200
commit467465d86df1c493345ff21487e97d787d63cce6 (patch)
tree7be4e5e9ca0fd7957488441afa44adf32549c3f3 /examples/rxtx_callbacks
parent444b872a76915a8fd3fbcba9311720f2246e696f (diff)
downloaddpdk-467465d86df1c493345ff21487e97d787d63cce6.zip
dpdk-467465d86df1c493345ff21487e97d787d63cce6.tar.gz
dpdk-467465d86df1c493345ff21487e97d787d63cce6.tar.xz
ethdev: add packet count parameter to Rx callback
Added a parameter to the RX callback to pass in the number of available RX packets in addition to the number of dequeued packets. This provides the RX callback functions with additional information that can be used to decide how packets from a burst are handled. The TX callback doesn't require this additional parameter so the RX and TX callbacks no longer have the same function parameters. As such the single RX/TX callback has been refactored into two separate callbacks. Signed-off-by: John McNamara <john.mcnamara@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'examples/rxtx_callbacks')
-rw-r--r--examples/rxtx_callbacks/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index 9e5e68e..21117ce 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -61,7 +61,8 @@ static struct {
static uint16_t
add_timestamps(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
- struct rte_mbuf **pkts, uint16_t nb_pkts, void *_ __rte_unused)
+ struct rte_mbuf **pkts, uint16_t nb_pkts,
+ uint16_t max_pkts __rte_unused, void *_ __rte_unused)
{
unsigned i;
uint64_t now = rte_rdtsc();