Skip to content

Commit ce9b752

Browse files
Update README.md
1 parent 22c7b62 commit ce9b752

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Shared memory packet interface (memif) provides high performance packet transmit
1111
- [x] ICMP responder example app
1212
- [x] Transmit/receive packets
1313
- [x] Interrupt mode support
14-
- [ ] File descriptor event polling in libmemif (optional)
15-
- [ ] Simplify file descriptor event polling (one handler for control and interrupt channel)
14+
- [x] File descriptor event polling in libmemif (optional)
15+
- [x] Simplify file descriptor event polling (one handler for control and interrupt channel)
1616
- [ ] Multiple connections
1717
- [ ] Multiple regions
1818
- [ ] Multipe queues
@@ -72,6 +72,10 @@ For detailed information on api calls and structures please refer to [libmemif.h
7272

7373
> If event occures on any file descriptor returned by this callback, call memif\_control\_fd\_handler function.
7474
75+
WIP:
76+
If callback function parameter for memif\_init function is set to NULL, libmemif will handle file descriptor event polling.
77+
Api call memif\_poll\_event will call epoll\_pwait wit user defined timeout to poll event on file descriptors opend by libmemif.
78+
7579
> Mmeif initialization function will initialize internal structures and create timer file descriptor, which will be used for sending periodic connection requests. Timer is disarmed if no memif interface is created.
7680
7781
2. Creating interface
@@ -88,9 +92,7 @@ For detailed information on api calls and structures please refer to [libmemif.h
8892
- Once connection has been established, a callback will inform the user about connection status change.
8993

9094
4. Interrupt packet receive
91-
- Interrupt mode is still Work In Progress and will be simplified in furure patch.
92-
- For interrupt mode, user application is required to register interrupt file descriptor for event polling. Api call memif\_get\_queue\_efd will return this interrupt file descriptor.
93-
- If event occures on this file descriptor, there are packets in shared memory to be received.
95+
- If event is polled on interrupt file descriptor, libmemif will call memif\_interrupt\_t callback specified for every connection instance.
9496

9597
6. Memif buffers
9698
- Packet data are stored in memif\_buffer\_t. Pointer _data_ points to shared memory buffer, and unsigned integer *data\_len* contains packet data length.
@@ -118,10 +120,15 @@ For detailed information on api calls and structures please refer to [libmemif.h
118120

119121
- [ICMP Responder](examples/icmp_responder/main.c)
120122

123+
#### Example app (libmemif fd event polling):
124+
- [ICMP Responder](examples/icmp_responder2/main.c)
125+
> WIP! Application will create memif interface in slave mode and try to connect to VPP. Exit using Ctrl+C.
126+
121127
VPP side config:
122128
```
123129
# create memif id 0 master
124130
# set int state memif0 up
125131
# set int ip address memif0 192.168.1.1/24
126132
# ping 192.168.1.2
127133
```
134+
> Example applications use VPP default socket file for memif: /run/vpp/memif.sock

0 commit comments

Comments
 (0)