diff options
Diffstat (limited to 'extras/libmemif/examples')
-rw-r--r-- | extras/libmemif/examples/README.md | 6 | ||||
-rw-r--r-- | extras/libmemif/examples/icmp_responder-epoll/main.c | 2 | ||||
-rw-r--r-- | extras/libmemif/examples/icmp_responder-mt/main.c | 4 | ||||
-rw-r--r-- | extras/libmemif/examples/icmp_responder/main.c | 2 |
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)); |