{"id":960,"date":"2021-07-15T20:34:58","date_gmt":"2021-07-15T12:34:58","guid":{"rendered":"https:\/\/www.myway5.com\/?p=960"},"modified":"2023-07-05T10:06:19","modified_gmt":"2023-07-05T02:06:19","slug":"linux-network-packet-receive-1","status":"publish","type":"post","link":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/","title":{"rendered":"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09"},"content":{"rendered":"<h2>\u6982\u8ff0<\/h2>\n<p>Linux \u4f5c\u4e3a\u6700\u6d41\u884c\u7684\u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5176\u63d0\u4f9b\u7684\u7f51\u7edc\u80fd\u529b\u4e5f\u662f\u7ecf\u8fc7\u4e86\u5404\u79cd\u5404\u6837\u573a\u666f\u7684\u8003\u9a8c\u3002\u56e0\u6b64\u5982\u679c\u7ecf\u5e38\u548c linux server \u6253\u4ea4\u9053\u7684\u8bdd\uff0c\u4e86\u89e3 linux \u7684\u6570\u636e\u5305\u5904\u7406\u6d41\u7a0b\u4e5f\u662f\u5f88\u6709\u5fc5\u8981\u7684\u3002<\/p>\n<p>\u7f51\u7edc\u6570\u636e\u5305\u7684\u63a5\u6536\u5904\u7406\u53ef\u4ee5\u5206\u6210\u4e24\u4e2a\u90e8\u5206\uff0c\u4e00\u662f\u4ece\u7269\u7406\u7f51\u5361\u8fdb\u5165\u5230\u8fbe linux \u5185\u6838\u7684\u7f51\u7edc\u534f\u8bae\u6808\uff0c\u4e8c\u662f\u7ecf\u7f51\u7edc\u534f\u8bae\u6808\u5904\u7406\u540e\u4ea4\u7ed9\u4e0a\u5c42\u5e94\u7528\u6216\u8005\u8f6c\u53d1\u51fa\u53bb\u3002\u672c\u7bc7\u6587\u6863\u4e3b\u8981\u8bf4\u660e\u7b2c\u4e00\u90e8\u5206\uff0c\u5e76\u4e14\u4e0d\u4f1a\u53bb\u6df1\u5165\u7ec6\u8282\u70b9\uff08\u56e0\u4e3a\u6211\u4e5f\u4e0d\u592a\u719f\uff09\u3002<\/p>\n<h2>\u91cd\u8981\u6982\u5ff5\u548c\u6570\u636e\u7ed3\u6784<\/h2>\n<p>\u5728\u8bf4\u660e\u7f51\u7edc\u6570\u636e\u5305\u7684\u5904\u7406\u6d41\u7a0b\u4e4b\u524d\uff0c\u6709\u5fc5\u8981\u63d0\u524d\u8bb2\u4e00\u4e0b\u4e00\u4e9b\u76f8\u5173\u7684\u6982\u5ff5\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u6982\u5ff5\u51b3\u5b9a\u4e86\u540e\u9762\u7684\u5185\u5bb9\u662f\u5426\u80fd\u591f\u7406\u89e3\u3002<\/p>\n<p><strong><em>\u786c\u4e2d\u65ad<\/em><\/strong><\/p>\n<p>\u786c\u4e2d\u65ad\u662f\u7531\u786c\u4ef6\u5728\u53d1\u751f\u67d0\u4e9b\u4e8b\u4ef6\u540e\u53d1\u51fa\u7684\uff0c\u79f0\u4e3a\u4e2d\u65ad\u8bf7\u6c42\uff08IRQ)\uff0cCPU \u4f1a\u54cd\u5e94\u786c\u4e2d\u65ad\uff0c\u5e76\u6267\u884c\u5bf9\u5e94\u7684 IRQ Handler\u3002\u5bf9\u4e8e\u7f51\u5361\u6765\u8bf4\uff0c\u5728\u6709\u7f51\u7edc\u6d41\u91cf\u8fdb\u5165\u540e\uff0c\u7f51\u5361\u4f1a\u901a\u8fc7\u786c\u4e2d\u65ad\u901a\u77e5 CPU \u6709\u7f51\u7edc\u6d41\u91cf\u8fdb\u6765\u4e86\uff0cCPU \u4f1a\u8c03\u7528\u5bf9\u5e94\u7f51\u5361\u9a71\u52a8\u4e2d\u7684\u5904\u7406\u51fd\u6570\u3002<\/p>\n<p>\u786c\u4e2d\u65ad\u5728\u5904\u7406\u671f\u95f4\uff0c\u662f\u5c4f\u853d\u5916\u90e8\u4e2d\u65ad\u7684\uff0c\u6240\u4ee5\u786c\u4e2d\u65ad\u7684\u5904\u7406\u65f6\u95f4\u8981\u5c3d\u53ef\u80fd\u7684\u77ed\u3002<\/p>\n<p><strong><em>\u8f6f\u4e2d\u65ad<\/em><\/strong><\/p>\n<p>\u8f6f\u4e2d\u65ad\u662f\u7531\u8f6f\u4ef6\u6267\u884c\u6307\u4ee4\u53d1\u51fa\u7684\uff0c\u56e0\u4e3a\u786c\u4e2d\u65ad\u7684\u7279\u70b9\u4e0d\u80fd\u5904\u7406\u8017\u65f6\u7684\u4efb\u52a1\uff0c\u6240\u4ee5\u8f6f\u4e2d\u65ad\u5f80\u5f80\u7528\u6765\u66ff\u4ee3\u786c\u4e2d\u65ad\u6765\u5904\u7406\u8017\u65f6\u4efb\u52a1\u3002<\/p>\n<p>\u6bd4\u5982\u7f51\u7edc\u6d41\u91cf\u7684\u5904\u7406\uff0c\u7f51\u5361\u5728\u53d1\u51fa\u786c\u4e2d\u65ad\u901a\u77e5 CPU \u5904\u7406\u540e\uff0c\u8fd9\u6b21\u786c\u4e2d\u65ad\u7684\u5904\u7406\u65b9\u6cd5\u4e2d\u53c8\u4f1a\u89e6\u53d1\u8f6f\u4e2d\u65ad\uff0c\u7531\u8f6f\u4e2d\u65ad\u63a5\u7740\u53bb\u5904\u7406\u7f51\u7edc\u6d41\u91cf\u6570\u636e\u3002<\/p>\n<p><strong><em>\u7f51\u5361\u9a71\u52a8<\/em><\/strong><\/p>\n<p>\u9a71\u52a8\u662f\u6253\u901a\u786c\u4ef6\u548c\u64cd\u4f5c\u7cfb\u7edf\u7684\u901a\u9053\uff0clinux \u901a\u8fc7\u7f51\u5361\u9a71\u52a8\uff0c\u53ef\u4ee5\u652f\u6301\u4e0d\u540c\u5382\u5546\uff0c\u4e0d\u540c\u578b\u53f7\uff0c\u4e0d\u540c\u7279\u6027\u7684\u7f51\u5361\u3002\u7f51\u5361\u9a71\u52a8\u4e3b\u8981\u8d1f\u8d23\u5c06\u4ece\u7f51\u5361\u4e2d\u8fdb\u6765\u7684\u6d41\u91cf\u89e3\u6790\u5e76\u8f6c\u6362\u6210 sk_buff\uff0c\u4ea4\u7ed9\u5185\u6838\u534f\u8bae\u6808\u3002<\/p>\n<p><strong><em>DMA<\/em><\/strong><\/p>\n<p>DMA\u662f\u4e00\u79cd\u65e0\u9700CPU\u7684\u53c2\u4e0e\u5c31\u53ef\u4ee5\u8ba9\u5916\u8bbe\u548c\u7cfb\u7edf\u5185\u5b58\u4e4b\u95f4\u8fdb\u884c\u53cc\u5411\u6570\u636e\u4f20\u8f93\u7684\u786c\u4ef6\u673a\u5236\u3002\u7f51\u5361\u4f1a\u901a\u8fc7 DMA \u76f4\u63a5\u5c06\u7f51\u7edc\u6d41\u91cf\u6570\u636e\u5b58\u50a8\u5230\u4e00\u5757\u63d0\u524d\u7533\u8bf7\u597d\u7684\u5185\u5b58\u533a\u57df\u4e2d\u3002<\/p>\n<p><strong><em>NAPI<\/em><\/strong><\/p>\n<p>\u5168\u79f0 New API\uff0c\u56e0\u4e3a\u6ca1\u6709\u66f4\u597d\u7684\u540d\u5b57\uff0c\u6240\u4ee5\u5c31\u76f4\u63a5\u7528 NAPI \u4e86\u3002\u8fd9\u662f\u7528\u4e8e\u652f\u6301\u9ad8\u901f\u7f51\u5361\u5904\u7406\u7f51\u7edc\u6570\u636e\u5305\u7684\u4e00\u79cd\u673a\u5236\u3002\u975e NAPI \u5f80\u5f80\u662f\u53ea\u4f9d\u9760\u786c\u4e2d\u65ad\u7684\u65b9\u5f0f\u8ba9 CPU \u6765\u5904\u7406\u6570\u636e\u5305\uff0cNAPI \u5f15\u5165\u4e86\u786c\u4e2d\u65ad+\u8f6e\u8be2\u7684\u65b9\u5f0f\uff0c\u6709\u6548\u7684\u7f13\u89e3\u4e86\u786c\u4e2d\u65ad\u5e26\u6765\u7684\u6027\u80fd\u95ee\u9898\u3002<\/p>\n<p><strong><em>sk_buff<\/em><\/strong><\/p>\n<p>sk_buff \u662f\u4e00\u4e2a\u975e\u5e38\u5927\u800c\u901a\u7528\u7684 struct\uff0c\u53ef\u4ee5\u7528\u6765\u8868\u793a2,3,4\u5c42\u7684\u6570\u636e\u5305\u3002\u5b83\u88ab\u5206\u6210\u4e24\u4e2a\u90e8\u5206\uff1ahead \u548c data\u3002<\/p>\n<p>head \u90e8\u5206\u6709\u5355\u72ec\u7684\u5b57\u6bb5\u8868\u793a\u4e0d\u540c\u5c42\u7684\u7f51\u7edc\u5934\uff1a<\/p>\n<ul>\n<li>transport_header\uff1a\u7528\u6765\u8868\u793a\u4f20\u8f93\u5c42\uff084\u5c42\uff09\u7684 header\uff0c\u5305\u62ec tcp, udp, icmp \u7b49\u534f\u8bae\u5934<\/li>\n<li>network_header\uff1a\u7528\u6765\u8868\u793a\u7f51\u7edc\u5c42\uff083\u5c42\uff09\u7684 header\uff0c\u5305\u62ec ip, ipv6, arp \u7b49\u534f\u8bae\u5934<\/li>\n<li>mac_header\uff1a\u7528\u6765\u8868\u793a\u94fe\u8def\u5c42\uff082\u5c42\uff09\u7684 header\u3002<\/li>\n<\/ul>\n<p>\u5f53\u6570\u636e\u5305\u8fdb\u5165\u7f51\u7edc\u534f\u8bae\u6808\u4e4b\u524d\uff0c\u9700\u8981\u5148\u88ab\u8f6c\u6362\u6210 sk_buff\u3002<\/p>\n<h2>\u6d41\u7a0b\u68b3\u7406<\/h2>\n<p><strong><em>\u6570\u636e\u5305\u8fdb\u5165\u89e6\u53d1\u786c\u4e2d\u65ad<\/em><\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/07\/\u6d41\u91cf\u8fdb\u5165\u5230\u786c\u4ef6\u4e2d\u65ad.jpg\" alt=\"\u6d41\u91cf\u8fdb\u5165\u5230\u786c\u4ef6\u4e2d\u65ad\" \/><\/p>\n<ol>\n<li>\u6570\u636e\u5305\u8fdb\u5165\u7f51\u5361\u8bbe\u5907<\/p>\n<\/li>\n<li>\n<p>\u7f51\u5361\u8bbe\u5907\u901a\u8fc7 DMA \u76f4\u63a5\u5199\u5165\u7684\u5185\u5b58\u4e2d\u3002\u5982\u679c\u5199\u4e0d\u4e0b\u5c31\u76f4\u63a5 drop \u6389<\/p>\n<\/li>\n<li>\n<p>\u7f51\u5361\u4ea7\u751f\u786c\u4e2d\u65ad<\/p>\n<\/li>\n<li>\n<p>CPU \u6536\u5230\u786c\u4e2d\u65ad\u540e\uff0c\u4f1a\u76f4\u63a5\u63d0\u524d\u6ce8\u518c\u597d\u7684\u8be5\u786c\u4e2d\u65ad\u7684 handler\u3002\u8fd9\u4e2a handler \u662f\u5199\u5728\u7f51\u5361\u9a71\u52a8\u4e2d\u7684\u4e00\u4e2a\u65b9\u6cd5<\/p>\n<\/li>\n<li>\n<p>IRQ handler \u7981\u7528\u7f51\u5361\u7684 IRQ\u3002\u8fd9\u662f\u540e\u9762\u5904\u7406\u5185\u5b58\u4e2d\u7684\u6570\u636e\u5305\u662f\u91c7\u7528\u7684 poll \u6a21\u5f0f\u3002\u4e5f\u5c31\u662f\u8bf4 cpu \u4f1a\u81ea\u5df1\u53bb\u5185\u5b58\u4e2d\u8f6e\u8be2\u6570\u636e\u5305\uff0c\u76f4\u5230\u4e00\u5b9a\u65f6\u95f4\/\u6570\u91cf\uff0c\u6216\u8005\u5168\u90e8\u5904\u7406\u5b8c\u4e4b\u540e\u3002\u8fd9\u6bb5\u65f6\u95f4\u5185\u5c31\u4e0d\u9700\u8981\u7f51\u5361\u901a\u8fc7\u786c\u4e2d\u65ad\u6765\u901a\u77e5 CPU \u4e86\uff0c\u5e76\u4e14\u786c\u4e2d\u65ad\u4f1a\u6253\u65ad CPU \u7684\u5de5\u4f5c\uff0c\u5e26\u6765\u4e00\u5b9a\u7684\u6027\u80fd\u95ee\u9898\u3002<\/p>\n<\/li>\n<li>\n<p>\u7f51\u5361\u9a71\u52a8\u4ea7\u751f\u8f6f\u4e2d\u65ad\u3002<\/p>\n<\/li>\n<\/ol>\n<p><strong><em>\u8f6f\u4e2d\u65ad\u89e6\u53d1\u6570\u636e\u5305\u7684\u5904\u7406<\/em><\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/07\/\u8f6f\u4e2d\u65ad\u89e6\u53d1\u6570\u636e\u5305\u7684\u5904\u7406.jpg\" alt=\"\u8f6f\u4e2d\u65ad\u89e6\u53d1\u6570\u636e\u5305\u7684\u5904\u7406\" \/><\/p>\n<p>\u8fd9\u91cc\u4e3a\u4e86\u65b9\u4fbf\u8868\u8ff0\uff0c\u4f7f\u7528\u76ee\u524d\u6700\u5e38\u7528\u7684 NAPI \u7684\u5904\u7406\u6d41\u7a0b\u8fdb\u884c\u8bf4\u660e\u3002<\/p>\n<ol>\n<li>\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\uff0cnet_dev_init \u65b9\u6cd5\u4e2d\u6ce8\u518c\u4e86 NET_RX_SOFTIRQ \u5bf9\u5e94\u7684 handler \u662f net_rx_action\u3002\u4e0a\u9762\u89e6\u53d1\u8f6f\u4e2d\u65ad\u7684\u65b9\u5f0f\u662f __raise_softirq_irqoff(NET_RX_SOFTIRQ)\u3002\u6240\u4ee5\u5f00\u59cb\u6267\u884c net_rx_action<\/li>\n<li>net_rx_action \u4f1a\u4ece poll_list \u94fe\u8868\u4e2d\u83b7\u53d6\u7b2c\u4e00\u4e2a poll\uff0c\u4f7f\u7528 napi_poll \u8f6e\u8be2\u5185\u5b58\u4e2d\u7684\u6570\u636e\u5305\u3002napi_poll \u8c03\u7528\u5230\u7f51\u5361\u9a71\u52a8\u63d0\u4f9b\u7684 poll \u65b9\u6cd5<\/li>\n<li>poll \u65b9\u6cd5\u4e2d\u4ece\u5185\u5b58\u4e2d\u53d6\u51fa\u6570\u636e\u5305<\/li>\n<li>\u7f51\u5361\u9a71\u52a8\u8c03\u7528 napi_gro_receive \u6765\u5904\u7406\u6570\u636e\u5305<\/li>\n<li>napi gro \u4f1a\u5408\u5e76\u591a\u4e2a skb \u6570\u636e\u5305\uff0c\u6bd4\u5982\u4e00\u4e2a IP \u5305\u4f1a\u88ab\u5206\u6210\u591a\u4e2a frame \u8fd9\u79cd\u3002\u90a3\u4e48\u5982\u679c\u5728\u63a5\u6536\u7684\u65f6\u5019\uff0c\u5728\u5230\u8fbe\u534f\u8bae\u6808\u4e4b\u524d\u76f4\u63a5\u5408\u5e76\uff0c\u4f1a\u6709\u4e00\u5b9a\u7684\u6027\u80fd\u63d0\u5347\u3002\u8fd9\u91cc\u6700\u7ec8\u4f1a\u8c03\u7528\u5230 gro_normal_list \u6765\u6279\u91cf\u5904\u7406 skb\u3002<\/li>\n<li>\u6700\u7ec8\u8c03\u7528\u5230 netif_receive_skb_list_internal\uff0c\u4ece napi.rx_list \u4e0a\u5904\u7406 sk_buff \u94fe\u8868\u3002<\/li>\n<li>\u5982\u679c\u5f00\u542f\u4e86 RPS\uff0c\u4f1a\u6839\u636e skb \u7684 hash \u503c\u627e\u5230\u5bf9\u5e94\u7684 cpu\uff0c\u5c06 skb \u5b58\u50a8\u5230\u8be5 cpu \u4e0a\u7684 backlog \u961f\u5217\u3002backlog \u961f\u5217\u662f\u4e00\u79cd\u7528\u8f6f\u4ef6\u65b9\u5f0f\u5c06\u6570\u636e\u5305\u5904\u7406\u8d1f\u8f7d\u5747\u8861\u5230\u591a\u4e2a cpu \u4e0a\u7684\u4e00\u79cd\u65b9\u6cd5\u3002<\/li>\n<li>\u6700\u7ec8\u90fd\u4f1a\u8c03\u7528\u5230 __netif_receive_skb_core\u3002<\/li>\n<li>\u5982\u679c\u6709 AF_PACKET \u7684 socket\uff0c\u8fd8\u4f1a\u62f7\u8d1d\u4e00\u4efd\u7ed9\u5b83\uff08tcpdump \u7684\u5b9e\u73b0\u539f\u7406\uff09\u3002<\/li>\n<li>\u6700\u540e\u9012\u4ea4\u7ed9\u5185\u6838\u534f\u8bae\u6808<\/li>\n<\/ol>\n<h2>\u53c2\u8003<\/h2>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"http:\/\/cxd2014.github.io\/2017\/10\/15\/linux-napi\/\">Linux\u534f\u8bae\u6808&#8211;NAPI\u673a\u5236<\/a><\/p>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/blog.packagecloud.io\/eng\/2016\/06\/22\/monitoring-tuning-linux-networking-stack-receiving-data\/#receive-packet-steering-rps\">Monitoring and Tuning the Linux Networking Stack: Receiving Data<\/a><\/p>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/abcdxyzk.github.io\/blog\/2015\/04\/18\/kernel-net-gro\/\">linux kernel \u7f51\u7edc\u534f\u8bae\u6808\u4e4bGRO(Generic receive offload)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8ff0 Linux \u4f5c\u4e3a\u6700\u6d41\u884c\u7684\u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5176\u63d0\u4f9b\u7684\u7f51\u7edc\u80fd\u529b\u4e5f\u662f\u7ecf\u8fc7\u4e86\u5404\u79cd\u5404\u6837\u573a\u666f\u7684\u8003\u9a8c\u3002\u56e0\u6b64\u5982\u679c\u7ecf\u5e38\u548c l &hellip; <a href=\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,101],"tags":[],"class_list":["post-960","post","type-post","status-publish","format-standard","hentry","category-linux","category-network"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09 - \u4e00\u53ea\u5b89\u9759\u7684\u732b<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"og:description\" content=\"\u6982\u8ff0 Linux \u4f5c\u4e3a\u6700\u6d41\u884c\u7684\u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5176\u63d0\u4f9b\u7684\u7f51\u7edc\u80fd\u529b\u4e5f\u662f\u7ecf\u8fc7\u4e86\u5404\u79cd\u5404\u6837\u573a\u666f\u7684\u8003\u9a8c\u3002\u56e0\u6b64\u5982\u679c\u7ecf\u5e38\u548c l &hellip; \u7ee7\u7eed\u9605\u8bfblinux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/\" \/>\n<meta property=\"og:site_name\" content=\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-15T12:34:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-05T02:06:19+00:00\" \/>\n<meta name=\"author\" content=\"jiangpengfei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"jiangpengfei\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/\"},\"author\":{\"name\":\"jiangpengfei\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"headline\":\"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09\",\"datePublished\":\"2021-07-15T12:34:58+00:00\",\"dateModified\":\"2023-07-05T02:06:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/\"},\"wordCount\":152,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"articleSection\":[\"linux\",\"\u7f51\u7edc\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/\",\"url\":\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/\",\"name\":\"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/#website\"},\"datePublished\":\"2021-07-15T12:34:58+00:00\",\"dateModified\":\"2023-07-05T02:06:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.myway5.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.myway5.com\/#website\",\"url\":\"https:\/\/www.myway5.com\/\",\"name\":\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"description\":\"\u60f3\u5565\u5462\",\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.myway5.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\",\"name\":\"jiangpengfei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"caption\":\"jiangpengfei\"},\"logo\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.myway5.com\/index.php\/author\/joyme\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/","og_locale":"zh_CN","og_type":"article","og_title":"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","og_description":"\u6982\u8ff0 Linux \u4f5c\u4e3a\u6700\u6d41\u884c\u7684\u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5176\u63d0\u4f9b\u7684\u7f51\u7edc\u80fd\u529b\u4e5f\u662f\u7ecf\u8fc7\u4e86\u5404\u79cd\u5404\u6837\u573a\u666f\u7684\u8003\u9a8c\u3002\u56e0\u6b64\u5982\u679c\u7ecf\u5e38\u548c l &hellip; \u7ee7\u7eed\u9605\u8bfblinux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09","og_url":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/","og_site_name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","article_published_time":"2021-07-15T12:34:58+00:00","article_modified_time":"2023-07-05T02:06:19+00:00","author":"jiangpengfei","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"jiangpengfei","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/#article","isPartOf":{"@id":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/"},"author":{"name":"jiangpengfei","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"headline":"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09","datePublished":"2021-07-15T12:34:58+00:00","dateModified":"2023-07-05T02:06:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/"},"wordCount":152,"commentCount":1,"publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"articleSection":["linux","\u7f51\u7edc"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/","url":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/","name":"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","isPartOf":{"@id":"https:\/\/www.myway5.com\/#website"},"datePublished":"2021-07-15T12:34:58+00:00","dateModified":"2023-07-05T02:06:19+00:00","breadcrumb":{"@id":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.myway5.com\/index.php\/2021\/07\/15\/linux-network-packet-receive-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.myway5.com\/"},{"@type":"ListItem","position":2,"name":"linux \u7f51\u7edc\u6570\u636e\u5305\u63a5\u6536\u6d41\u7a0b\uff08\u4e00\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.myway5.com\/#website","url":"https:\/\/www.myway5.com\/","name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","description":"\u60f3\u5565\u5462","publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.myway5.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685","name":"jiangpengfei","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","caption":"jiangpengfei"},"logo":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/"},"url":"https:\/\/www.myway5.com\/index.php\/author\/joyme\/"}]}},"views":10246,"_links":{"self":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/comments?post=960"}],"version-history":[{"count":1,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/960\/revisions"}],"predecessor-version":[{"id":961,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/960\/revisions\/961"}],"wp:attachment":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/media?parent=960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/categories?post=960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/tags?post=960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}