summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/examples
diff options
context:
space:
mode:
authorJakub Grajciar <grajciar.jakub@gmail.com>2017-09-14 14:12:10 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2017-09-15 08:33:43 +0000
commitb467b2a02be6ea7bab1a4773523afe8a8e3cfd83 (patch)
treed85ea1c045bc3090ad880521c4aae1b6a697c730 /extras/libmemif/examples
parentd5b1b85d2e776718169f930f592af5184a18100a (diff)
libmemif: Jumbo frames support
Change-Id: I2b316358dcd2de7168a860541bcca35c3dd44649 Signed-off-by: Jakub Grajciar <grajciar.jakub@gmail.com>
Diffstat (limited to 'extras/libmemif/examples')
-rw-r--r--extras/libmemif/examples/README.md6
-rw-r--r--extras/libmemif/examples/icmp_responder-epoll/main.c2
-rw-r--r--extras/libmemif/examples/icmp_responder-mt/main.c4
-rw-r--r--extras/libmemif/examples/icmp_responder/main.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/extras/libmemif/examples/README.md b/extras/libmemif/examples/README.md
index bbd663b99e2..1375d27abae 100644
--- a/extras/libmemif/examples/README.md
+++ b/extras/libmemif/examples/README.md
@@ -11,6 +11,6 @@ Current WORKDIR is set to root repository directory. Example apps can be run fro
Example app | Description
------------|------------
-[icmpr](../examples/icmp_responder/main.c) | Simplest implementaion. Event polling is handled by libmemif. Single memif conenction in slave mode is created (id 0). Use Ctrl + C to exit app.
-[icmpr-epoll](../examples/icmp_responder-epoll/main.c) (run in container by default) | Supports multiple connections and master mode. User can create/delete connections, set ip addresses, print connection information. [Example setup](ExampleSetup.md) contains instructions on basic connection use cases setups.
-[icmpr-mt](../examples/icmp_responder-mt/main.c) | Multi-thread example, very similar to icmpr-epoll. Packets are handled in threads assigned to specific queues. Slave mode only.
+[icmpr](../examples/icmp_responder/main.c) | Simplest implementaion. Event polling is handled by libmemif. Single memif conenction in slave mode is created (id 0). Use Ctrl + C to exit app. Memif receive mode: interrupt.
+[icmpr-epoll](../examples/icmp_responder-epoll/main.c) (run in container by default) | Supports multiple connections and master mode. User can create/delete connections, set ip addresses, print connection information. [Example setup](ExampleSetup.md) contains instructions on basic connection use cases setups. Memif receive mode: interrupt. App provides functionality to disable interrupts for specified queue/s for testing purposes. Polling mode is not implemented in this example.
+[icmpr-mt](../examples/icmp_responder-mt/main.c) | Multi-thread example, very similar to icmpr-epoll. Packets are handled in threads assigned to specific queues. Slave mode only. Memif receive mode: polling (memif_rx_poll function), interrupt (memif_rx_interrupt function). Receive modes differ per queue.
diff --git a/extras/libmemif/examples/icmp_responder-epoll/main.c b/extras/libmemif/examples/icmp_responder-epoll/main.c
index 4172785f0ef..cff944f94c7 100644
--- a/extras/libmemif/examples/icmp_responder-epoll/main.c
+++ b/extras/libmemif/examples/icmp_responder-epoll/main.c
@@ -283,7 +283,7 @@ icmpr_buffer_alloc (long index, long n, uint16_t qid)
int err;
uint16_t r;
/* set data pointer to shared memory and set buffer_len to shared mmeory buffer len */
- err = memif_buffer_alloc (c->conn, qid, c->tx_bufs, n, &r);
+ err = memif_buffer_alloc (c->conn, qid, c->tx_bufs, n, &r, 0);
if (err != MEMIF_ERR_SUCCESS)
{
INFO ("memif_buffer_alloc: %s", memif_strerror (err));
diff --git a/extras/libmemif/examples/icmp_responder-mt/main.c b/extras/libmemif/examples/icmp_responder-mt/main.c
index 860569bc20b..c47fc53d5b2 100644
--- a/extras/libmemif/examples/icmp_responder-mt/main.c
+++ b/extras/libmemif/examples/icmp_responder-mt/main.c
@@ -309,7 +309,7 @@ memif_rx_poll (void *ptr)
err =
memif_buffer_alloc (c->conn, data->qid, data->tx_bufs,
- data->rx_buf_num, &tx);
+ data->rx_buf_num, &tx, 0);
if (err != MEMIF_ERR_SUCCESS)
{
INFO ("memif_buffer_alloc: %s", memif_strerror (err));
@@ -439,7 +439,7 @@ memif_rx_interrupt (void *ptr)
err =
memif_buffer_alloc (c->conn, data->qid, data->tx_bufs,
- data->rx_buf_num, &tx);
+ data->rx_buf_num, &tx, 0);
if (err != MEMIF_ERR_SUCCESS)
{
INFO ("memif_buffer_alloc: %s", memif_strerror (err));
diff --git a/extras/libmemif/examples/icmp_responder/main.c b/extras/libmemif/examples/icmp_responder/main.c
index 5351b6b8e3c..9e49771e7a4 100644
--- a/extras/libmemif/examples/icmp_responder/main.c
+++ b/extras/libmemif/examples/icmp_responder/main.c
@@ -225,7 +225,7 @@ icmpr_buffer_alloc (long n, uint16_t qid)
int err;
uint16_t r;
/* set data pointer to shared memory and set buffer_len to shared mmeory buffer len */
- err = memif_buffer_alloc (c->conn, qid, c->tx_bufs, n, &r);
+ err = memif_buffer_alloc (c->conn, qid, c->tx_bufs, n, &r, 0);
if (err != MEMIF_ERR_SUCCESS)
{
INFO ("memif_buffer_alloc: %s", memif_strerror (err));