@@ -141,7 +141,7 @@ Source:
141
141
142
142
</details >
143
143
144
- ![ ] ( https://github. com/ntk148v/til/blob/ master/linux/images/linux -networking-recv.png )
144
+ ![ ] ( https://raw.githubusercontent. com/ntk148v/til/master/linux/imageslinux -networking-recv.png )
145
145
146
146
![ ] ( https://img-blog.csdnimg.cn/20201025161643899.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1JvbmdfVG9h,size_16,color_FFFFFF,t_70 )
147
147
@@ -285,7 +285,7 @@ Source:
285
285
286
286
# ## 1.2. Linux kernel network transmission
287
287
288
- ! [](https://github. com/ntk148v/til/blob/ master/linux/images/linux -networking-send.png)
288
+ ! [](https://raw.githubusercontent. com/ntk148v/til/master/linux/imageslinux -networking-send.png)
289
289
290
290
! [](https://s2.51cto.com/images/blog/202104/15/25012de83ba2d80fcd790b49ff346b62.png? x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=/format,webp/resize,m_fixed,w_1184)
291
291
@@ -997,21 +997,21 @@ Source:
997
997
998
998
- Context switch between kernel and userspace
999
999
1000
- 
1000
+ 
1001
1001
1002
1002
- Packet copy between kernel and userspace
1003
1003
1004
- 
1004
+ 
1005
1005
1006
1006
- Dynamic allocation of `sk_buff`
1007
1007
- Per packet interrupt
1008
1008
- Shared data structures
1009
1009
1010
- 
1010
+ 
1011
1011
1012
1012
- Solution: Why just bypass the kernel?
1013
1013
1014
- 
1014
+ 
1015
1015
1016
1016
- There are many kernel bypass techniques:
1017
1017
- User-space packet processing:
@@ -1138,7 +1138,7 @@ Source:
1138
1138
- In-kernel verifier to ensure safety, security
1139
1139
- JIT (Just-in-time) compiler available for main architecture
1140
1140
1141
- ! [](https://github. com/ntk148v/til/blob/ master/linux/images/ebpf -1.png)
1141
+ ! [](https://raw.githubusercontent. com/ntk148v/til/master/linux/imagesebpf -1.png)
1142
1142
1143
1143
- Features:
1144
1144
- Maps: key-value entries (hash, array,...) shared between eBPF programs or with user user-space
@@ -1217,15 +1217,15 @@ Source:
1217
1217
1218
1218
- ` AF_XDP` :
1219
1219
1220
- ! [](https://github. com/ntk148v/til/blob/ master/linux/images/xdp -flow.png)
1220
+ ! [](https://raw.githubusercontent. com/ntk148v/til/master/linux/imagesxdp -flow.png)
1221
1221
1222
1222
- A new type of socket, presented into the [Linux 4.18](https://www.kernel.org/doc/html/v4.18/networking/af_xdp.html) which does not completely bypass the kernel, but utilizes its functionality and enables to create something alike DPDK or the ` AF_PACKET` .
1223
1223
1224
1224
- An upgraded version of ` AF_PACKET` : Use XDP program to trigger Rx path for selected queue
1225
1225
- XDP programs can redirect frames to a memory buffer in user-space by eBPF -> not bypass the kernel but creates in-kernel fast path.
1226
1226
- DMA transfers use user space memory (zero copy)
1227
1227
1228
- ! [](https://github. com/ntk148v/til/blob/ master/linux/images/xdp .png)
1228
+ ! [](https://raw.githubusercontent. com/ntk148v/til/master/linux/imagesxdp .png)
1229
1229
1230
1230
- Benefits:
1231
1231
- Performance improvement:
@@ -1237,7 +1237,7 @@ Source:
1237
1237
- No change to DPDK apps, kernel driver handles hardware
1238
1238
- Provide a new option for users
1239
1239
1240
- ! [](https://github. com/ntk148v/til/blob/ master/linux/images/xdp -dpdk.png)
1240
+ ! [](https://raw.githubusercontent. com/ntk148v/til/master/linux/imagesxdp -dpdk.png)
1241
1241
1242
1242
- Limitations:
1243
1243
- Quite young project
0 commit comments