Lines Matching +full:in +full:- +full:application

1 .. SPDX-License-Identifier: GPL-2.0
8 interface over TCP for generic application protocols. With KCM an application
9 can efficiently send and receive application protocol messages over TCP using
12 KCM implements an NxM multiplexor in the kernel as diagrammed below::
14 +------------+ +------------+ +------------+ +------------+
16 +------------+ +------------+ +------------+ +------------+
18 +-----------+ | | +----------+
20 +----------------------------------+
22 +----------------------------------+
24 +---------+ | | | ------------+
26 +----------+ +----------+ +----------+ +----------+ +----------+
28 +----------+ +----------+ +----------+ +----------+ +----------+
30 +----------+ +----------+ +----------+ +----------+ +----------+
32 +----------+ +----------+ +----------+ +----------+ +----------+
39 operations in different sockets may be done in parallel without the need for
40 synchronization between threads in userspace.
45 The multiplexor provides the message steering. In the transmit path, messages
47 Similarly, in the receive path, messages are constructed on each TCP socket
71 -------------------
73 Messages are sent over a TCP stream with some application protocol message
75 of a received message can be deduced from the application protocol header
87 ---------------------
93 using the socket. When the application gets the error notification for a
114 ----------------------
120 - type is either SOCK_DGRAM or SOCK_SEQPACKET
121 - protocol is KCMPROTO_CONNECTED
124 -------------------
145 ------------------------
167 - fd: file descriptor for TCP socket being attached
168 - bpf_prog_fd: file descriptor for compiled BPF program downloaded
171 --------------------------
190 -------------------------------
193 When receive is disabled, any pending messages in the socket's
195 if an application thread knows that it will be doing a lot of
204 ------------------------------------
220 Use in applications
223 KCM accelerates application layer protocols. Specifically, it allows
227 in mapping a message based protocol onto the TCP stream. KCM also make
228 application layer messages a unit of work in the kernel for the purposes of
229 steering and scheduling, which in turn allows a simpler networking model in
233 --------------
235 In an Nx1 configuration, KCM logically provides multiple socket handles
236 to the same TCP connection. This allows parallelism between in I/O
238 parallelized). In an application, a KCM socket can be opened for each
242 In a MxN configuration, multiple connections are established to the
246 ----------------
249 threads in a nominal use case. Perfect load balancing, that is steering
255 On transmit, there are three ways an application can batch (pipeline)
258 1) Send multiple messages in a single sendmmsg.
260 except the last have MSG_BATCH in the flags of sendmsg call.
266 changes at each receive ready callback on the KCM socket. The application
270 --------------
272 An application should include a thread to monitor errors raised on
274 TCP socket attached to a KCM multiplexor in epoll set for POLLERR
276 on the socket thus waking up the application thread. When the application
280 may have occurred in the middle of receiving a message).
283 -------------------------
285 In KCM there is no means to correlate a message to the TCP socket that
286 was used to send or receive the message (except in the case there is
287 only one attached TCP socket). However, the application does retain
289 from the socket which can be used in detecting issues (such as high