libmemif: refactor connection establishment 72/30572/6
authorJakub Grajciar <jgrajcia@cisco.com>
Mon, 4 Jan 2021 10:10:42 +0000 (11:10 +0100)
committerDamjan Marion <dmarion@me.com>
Mon, 27 Sep 2021 14:35:45 +0000 (14:35 +0000)
commit134f1e02251b27ad73c3ff4591954c2e0919c984
tree30e84c2bea30ad760a6629a7b1d5843bdd7f8a7c
parent45cf1fc3f58ee465d2e7e4689158e79fd706658e
libmemif: refactor connection establishment

per_thread_ namespace fuctionality replaced by memif socket.
Interfaces are grouped by memif socket which holds interface database.
Each thread can create it's unique memif socket. The path name
can be equal across threads so that the app only uses one
UNIX socket. In case of listener socket, listener fd
can be obtained and set using APIs.

This change allows:
  - No lookup on file descriptor events
    - improves interrupt handling
  - Loopback support (connect two interfaces in one app)
    - usefull for debugging and testing
  - Improves code readability by providing control channel
    abstraction for each interface and listener sockets

Type: refactor

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I1b8261042431c0376646ab4c4c831f6e59dd3eed
extras/libmemif/src/libmemif.h
extras/libmemif/src/main.c
extras/libmemif/src/memif_private.h
extras/libmemif/src/socket.c
extras/libmemif/src/socket.h