{"id":5132,"date":"2021-03-27T20:59:18","date_gmt":"2021-03-27T12:59:18","guid":{"rendered":"https:\/\/damogame.cn\/wordpress\/?p=5132"},"modified":"2021-03-27T20:59:18","modified_gmt":"2021-03-27T12:59:18","slug":"%e6%b7%b1%e5%85%a5%e7%90%86%e8%a7%a3-bpf%ef%bc%9a%e4%b8%80%e4%b8%aa%e9%98%85%e8%af%bb%e6%b8%85%e5%8d%95","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/5132","title":{"rendered":"\u6df1\u5165\u7406\u89e3 BPF\uff1a\u4e00\u4e2a\u9605\u8bfb\u6e05\u5355"},"content":{"rendered":"<div class=\"h hm bm\">\n<p id=\"article_title\" class=\"ph\"><a href=\"https:\/\/linux.cn\/article-9507-1.html\">\u539f\u6587\u5730\u5740<\/a><\/p>\n<p>&nbsp;<\/p>\n<div id=\"article_copyright\" class=\"ph\">\u4f5c\u8005\uff1a\u00a0<span class=\"textcut\"><a href=\"https:\/\/qmonnet.github.io\/whirl-offload\/2016\/09\/01\/dive-into-bpf\/\" target=\"_blank\" rel=\"noopener\">Quentin Monnet<\/a><\/span>\u00a0\u8bd1\u8005\uff1a\u00a0<a href=\"https:\/\/linux.cn\/lctt\/\" target=\"_blank\" rel=\"noopener\">LCTT<\/a>\u00a0<a href=\"https:\/\/linux.cn\/lctt\/qhwdw\" target=\"_blank\" rel=\"noopener\">qhwdw<\/a><\/p>\n<p id=\"article_date\">| 2018-04-03 12:25<\/p>\n<\/div>\n<\/div>\n<div class=\"d\">\n<div id=\"article_content\">\n<p><em>~\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/qmonnet\/whirl-offload\/commits\/gh-pages\/_posts\/2016-09-01-dive-into-bpf.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u66f4\u65b0\u4e8e<\/a>\u00a02017-11-02 ~<\/em><\/p>\n<h2 id=\"toc_1\">\u4ec0\u4e48\u662f BPF?<\/h2>\n<p>BPF\uff0c\u53ca<ruby>\u4f2f\u514b\u5229\u5305\u8fc7\u6ee4\u5668<rt><strong>B<\/strong>erkeley\u00a0<strong>P<\/strong>acket\u00a0<strong>F<\/strong>ilter<\/rt><\/ruby>\uff0c\u6700\u521d\u6784\u60f3\u63d0\u51fa\u4e8e 1992 \u5e74\uff0c\u5176\u76ee\u7684\u662f\u4e3a\u4e86\u63d0\u4f9b\u4e00\u79cd\u8fc7\u6ee4\u5305\u7684\u65b9\u6cd5\uff0c\u5e76\u4e14\u8981\u907f\u514d\u4ece\u5185\u6838\u7a7a\u95f4\u5230\u7528\u6237\u7a7a\u95f4\u7684\u65e0\u7528\u7684\u6570\u636e\u5305\u590d\u5236\u884c\u4e3a\u3002\u5b83\u6700\u521d\u662f\u7531\u4ece\u7528\u6237\u7a7a\u95f4\u6ce8\u5165\u5230\u5185\u6838\u7684\u4e00\u4e2a\u7b80\u5355\u7684\u5b57\u8282\u7801\u6784\u6210\uff0c\u5b83\u5728\u90a3\u4e2a\u4f4d\u7f6e\u5229\u7528\u4e00\u4e2a\u6821\u9a8c\u5668\u8fdb\u884c\u68c0\u67e5 \u2014\u2014 \u4ee5\u907f\u514d\u5185\u6838\u5d29\u6e83\u6216\u8005\u5b89\u5168\u95ee\u9898 \u2014\u2014 \u5e76\u9644\u7740\u5230\u4e00\u4e2a\u5957\u63a5\u5b57\u4e0a\uff0c\u63a5\u7740\u5728\u6bcf\u4e2a\u63a5\u6536\u5230\u7684\u5305\u4e0a\u8fd0\u884c\u3002\u51e0\u5e74\u540e\u5b83\u88ab\u79fb\u690d\u5230 Linux \u4e0a\uff0c\u5e76\u4e14\u5e94\u7528\u4e8e\u4e00\u5c0f\u90e8\u5206\u5e94\u7528\u7a0b\u5e8f\u4e0a\uff08\u4f8b\u5982\uff0c<code>tcpdump<\/code>\uff09\u3002\u5176\u7b80\u5316\u7684\u8bed\u8a00\u4ee5\u53ca\u5b58\u5728\u4e8e\u5185\u6838\u4e2d\u7684\u5373\u65f6\u7f16\u8bd1\u5668\uff08JIT\uff09\uff0c\u4f7f BPF \u6210\u4e3a\u4e00\u4e2a\u6027\u80fd\u5353\u8d8a\u7684\u5de5\u5177\u3002<\/p>\n<p>\u7136\u540e\uff0c\u5728 2013 \u5e74\uff0cAlexei Starovoitov \u5bf9 BPF \u8fdb\u884c\u5f7b\u5e95\u5730\u6539\u9020\uff0c\u5e76\u589e\u52a0\u4e86\u65b0\u7684\u529f\u80fd\uff0c\u6539\u5584\u4e86\u5b83\u7684\u6027\u80fd\u3002\u8fd9\u4e2a\u65b0\u7248\u672c\u88ab\u547d\u540d\u4e3a eBPF \uff08\u610f\u601d\u662f \u201cextended BPF\u201d\uff09\uff0c\u4e0e\u6b64\u540c\u65f6\uff0c\u5c06\u4ee5\u524d\u7684 BPF \u53d8\u6210 cBPF\uff08\u610f\u601d\u662f \u201cclassic\u201d BPF\uff09\u3002\u65b0\u7248\u672c\u51fa\u73b0\u4e86\u5982\u6620\u5c04\u548c<ruby>\u5c3e\u8c03\u7528<rt>tail call<\/rt><\/ruby>\u8fd9\u6837\u7684\u65b0\u7279\u6027\uff0c\u5e76\u4e14 JIT \u7f16\u8bd1\u5668\u4e5f\u88ab\u91cd\u5199\u4e86\u3002\u65b0\u7684\u8bed\u8a00\u6bd4 cBPF \u66f4\u63a5\u8fd1\u4e8e\u539f\u751f\u673a\u5668\u8bed\u8a00\u3002\u5e76\u4e14\uff0c\u5728\u5185\u6838\u4e2d\u521b\u5efa\u4e86\u65b0\u7684\u9644\u7740\u70b9\u3002<\/p>\n<p>\u611f\u8c22\u90a3\u4e9b\u65b0\u7684\u94a9\u5b50\uff0ceBPF \u7a0b\u5e8f\u624d\u53ef\u4ee5\u88ab\u8bbe\u8ba1\u7528\u4e8e\u5404\u79cd\u5404\u6837\u7684\u60c5\u5f62\u4e0b\uff0c\u5176\u5206\u4e3a\u4e24\u4e2a\u5e94\u7528\u9886\u57df\u3002\u5176\u4e2d\u4e00\u4e2a\u5e94\u7528\u9886\u57df\u662f\u5185\u6838\u8ddf\u8e2a\u548c\u4e8b\u4ef6\u76d1\u63a7\u3002BPF \u7a0b\u5e8f\u53ef\u4ee5\u88ab\u9644\u7740\u5230\u63a2\u9488\uff08kprobe\uff09\uff0c\u800c\u4e14\u5b83\u4e0e\u5176\u5b83\u8ddf\u8e2a\u6a21\u5f0f\u76f8\u6bd4\uff0c\u6709\u5f88\u591a\u7684\u4f18\u70b9\uff08\u6709\u65f6\u4e5f\u6709\u4e00\u4e9b\u7f3a\u70b9\uff09\u3002<\/p>\n<p>\u53e6\u5916\u4e00\u4e2a\u5e94\u7528\u9886\u57df\u662f\u7f51\u7edc\u7f16\u7a0b\u3002\u9664\u4e86\u5957\u63a5\u5b57\u8fc7\u6ee4\u5668\u5916\uff0ceBPF \u7a0b\u5e8f\u8fd8\u53ef\u4ee5\u9644\u52a0\u5230 tc\uff08Linux \u6d41\u91cf\u63a7\u5236\u5de5\u5177\uff09\u7684\u5165\u7ad9\u6216\u8005\u51fa\u7ad9\u63a5\u53e3\u4e0a\uff0c\u4ee5\u4e00\u79cd\u5f88\u9ad8\u6548\u7684\u65b9\u5f0f\u53bb\u6267\u884c\u5404\u79cd\u5305\u5904\u7406\u4efb\u52a1\u3002\u8fd9\u79cd\u4f7f\u7528\u65b9\u5f0f\u5728\u8fd9\u4e2a\u9886\u57df\u5f00\u521b\u4e86\u4e00\u4e2a\u65b0\u7684\u5929\u5730\u3002<\/p>\n<p>\u5e76\u4e14 eBPF \u901a\u8fc7\u4f7f\u7528\u4e3a IO Visor \u9879\u76ee\u5f00\u53d1\u7684\u6280\u672f\uff0c\u4f7f\u5b83\u7684\u6027\u80fd\u8fdb\u4e00\u6b65\u5f97\u5230\u63d0\u5347\uff1a\u4e5f\u4e3a XDP\uff08\u201ceXpress Data Path\u201d\uff09\u6dfb\u52a0\u4e86\u65b0\u7684\u94a9\u5b50\uff0cXDP \u662f\u4e0d\u4e45\u524d\u6dfb\u52a0\u5230\u5185\u6838\u4e2d\u7684\u4e00\u79cd\u65b0\u5f0f\u5feb\u901f\u8def\u5f84\u3002XDP \u4e0e Linux \u6808\u7ec4\u5408\uff0c\u7136\u540e\u4f7f\u7528 BPF \uff0c\u4f7f\u5305\u5904\u7406\u7684\u901f\u5ea6\u66f4\u5feb\u3002<\/p>\n<p>\u751a\u81f3\u4e00\u4e9b\u9879\u76ee\uff0c\u5982 P4\u3001Open vSwitch\uff0c<a class=\"ext\" href=\"http:\/\/openvswitch.org\/pipermail\/dev\/2014-October\/047421.html\" target=\"_blank\" rel=\"external nofollow noopener\">\u8003\u8651<\/a>\u00a0\u6216\u8005\u5f00\u59cb\u53bb\u63a5\u6d3d\u4f7f\u7528 BPF\u3002\u5176\u5b83\u7684\u4e00\u4e9b\uff0c\u5982 CETH\u3001Cilium\uff0c\u5219\u662f\u5b8c\u5168\u57fa\u4e8e\u5b83\u7684\u3002BPF \u662f\u5982\u6b64\u6d41\u884c\uff0c\u56e0\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u9884\u8ba1\uff0c\u4e0d\u4e45\u4e4b\u540e\uff0c\u5c06\u56f4\u7ed5\u5b83\u6709\u66f4\u591a\u5de5\u5177\u548c\u9879\u76ee\u51fa\u73b0 \u2026<\/p>\n<h2 id=\"toc_2\">\u6df1\u5165\u7406\u89e3\u5b57\u8282\u7801<\/h2>\n<p>\u5c31\u50cf\u6211\u4e00\u6837\uff1a\u6211\u7684\u4e00\u4e9b\u5de5\u4f5c\uff08\u5305\u62ec\u00a0<a class=\"ext\" href=\"https:\/\/qmonnet.github.io\/whirl-offload\/2016\/07\/15\/beba-research-project\/\" target=\"_blank\" rel=\"external nofollow noopener\">BEBA<\/a>\uff09\u662f\u975e\u5e38\u4f9d\u8d56 eBPF \u7684\uff0c\u5e76\u4e14\u5728\u8fd9\u4e2a\u7f51\u7ad9\u4e0a\u4ee5\u540e\u7684\u51e0\u7bc7\u6587\u7ae0\u5c06\u5173\u6ce8\u4e8e\u8fd9\u4e2a\u4e3b\u9898\u3002\u6309\u7406\u8bf4\uff0c\u5728\u6df1\u5165\u5230\u7ec6\u8282\u4e4b\u524d\uff0c\u6211\u5e94\u8be5\u4ee5\u67d0\u79cd\u65b9\u5f0f\u53bb\u4ecb\u7ecd BPF \u2014\u2014 \u6211\u7684\u610f\u601d\u662f\uff0c\u771f\u6b63\u7684\u4ecb\u7ecd\uff0c\u5728\u7b2c\u4e00\u8282\u6240\u63d0\u4f9b\u7684\u7b80\u8981\u4ecb\u7ecd\u4e0a\u66f4\u591a\u5730\u4ecb\u7ecd\u5728 BPF \u4e0a\u5f00\u53d1\u7684\u65b0\u529f\u80fd\uff1a\u4ec0\u4e48\u662f BPF \u6620\u5c04\uff1f\u5c3e\u8c03\u7528\uff1f\u5185\u90e8\u7ed3\u6784\u662f\u4ec0\u4e48\u6837\u5b50\uff1f\u7b49\u7b49\u3002\u4f46\u662f\uff0c\u5728\u8fd9\u4e2a\u7f51\u7ad9\u4e0a\u5df2\u7ecf\u6709\u5f88\u591a\u8fd9\u4e2a\u4e3b\u9898\u7684\u4ecb\u7ecd\u4e86\uff0c\u800c\u4e14\uff0c\u6211\u4e5f\u4e0d\u5e0c\u671b\u53bb\u5199\u53e6\u4e00\u7bc7 \u201cBPF \u4ecb\u7ecd\u201d \u7684\u91cd\u590d\u6587\u7ae0\u3002<\/p>\n<p>\u6bd5\u7adf\uff0c\u6211\u82b1\u8d39\u4e86\u5f88\u591a\u7684\u65f6\u95f4\u53bb\u9605\u8bfb\u548c\u5b66\u4e60\u5173\u4e8e BPF \u7684\u77e5\u8bc6\uff0c\u56e0\u6b64\uff0c\u5728\u8fd9\u91cc\u6211\u4eec\u5c06\u8981\u505a\u4ec0\u4e48\u5462\uff0c\u6211\u6536\u96c6\u4e86\u975e\u5e38\u591a\u7684\u5173\u4e8e BPF \u7684\u9605\u8bfb\u6750\u6599\uff1a\u4ecb\u7ecd\u3001\u6587\u6863\uff0c\u4e5f\u6709\u6559\u7a0b\u6216\u8005\u793a\u4f8b\u3002\u8fd9\u91cc\u6709\u5f88\u591a\u7684\u6750\u6599\u53ef\u4ee5\u53bb\u9605\u8bfb\uff0c\u4f46\u662f\uff0c\u4e3a\u4e86\u53bb\u9605\u8bfb\u5b83\uff0c\u9996\u5148\u8981\u53bb\u00a0<em>\u627e\u5230<\/em>\u00a0\u5b83\u3002\u56e0\u6b64\uff0c\u4e3a\u4e86\u80fd\u591f\u5e2e\u52a9\u66f4\u591a\u60f3\u53bb\u5b66\u4e60\u548c\u4f7f\u7528 BPF \u7684\u4eba\uff0c\u73b0\u5728\u7684\u8fd9\u7bc7\u6587\u7ae0\u7ed9\u51fa\u4e86\u4e00\u4e2a\u8d44\u6e90\u6e05\u5355\u3002\u8fd9\u91cc\u6709\u5404\u79cd\u9605\u8bfb\u6750\u6599\uff0c\u5b83\u53ef\u4ee5\u5e2e\u4f60\u6df1\u5165\u7406\u89e3\u5185\u6838\u5b57\u8282\u7801\u7684\u673a\u5236\u3002<\/p>\n<h2 id=\"toc_3\">\u8d44\u6e90<\/h2>\n<h3 id=\"toc_4\">\u7b80\u4ecb<\/h3>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u4e2d\u4e0b\u9762\u7684\u94fe\u63a5\u63d0\u4f9b\u4e86 BPF \u7684\u57fa\u672c\u6982\u8ff0\uff0c\u6216\u8005\uff0c\u4e00\u4e9b\u4e0e\u5b83\u5bc6\u5207\u76f8\u5173\u7684\u4e00\u4e9b\u4e3b\u9898\u3002\u5982\u679c\u4f60\u5bf9 BPF \u975e\u5e38\u964c\u751f\uff0c\u4f60\u53ef\u4ee5\u5728\u8fd9\u4e9b\u4ecb\u7ecd\u6587\u7ae0\u4e2d\u6311\u9009\u51fa\u4e00\u7bc7\u4f60\u559c\u6b22\u7684\u6587\u7ae0\u53bb\u9605\u8bfb\u3002\u5982\u679c\u4f60\u5df2\u7ecf\u7406\u89e3\u4e86 BPF\uff0c\u4f60\u53ef\u4ee5\u9488\u5bf9\u7279\u5b9a\u7684\u4e3b\u9898\u53bb\u9605\u8bfb\uff0c\u4e0b\u9762\u662f\u9605\u8bfb\u6e05\u5355\u3002<\/p>\n<h4 id=\"toc_5\">\u5173\u4e8e BPF<\/h4>\n<p><strong>\u5173\u4e8e eBPF \u7684\u5e38\u89c4\u4ecb\u7ecd<\/strong>\uff1a<\/p>\n<ul>\n<li><a class=\"ext\" href=\"https:\/\/lwn.net\/Articles\/740157\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u5168\u9762\u4ecb\u7ecd eBPF<\/a>\uff08Matt Flemming\uff0con LWN.net\uff0cDecember 2017\uff09\uff1a\u4e00\u7bc7\u5199\u7684\u5f88\u597d\u7684\uff0c\u5e76\u4e14\u6613\u4e8e\u7406\u89e3\u7684\uff0c\u4ecb\u7ecd eBPF \u5b50\u7cfb\u7edf\u7ec4\u4ef6\u7684\u6982\u8ff0\u6587\u7ae0\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/schd.ws\/hosted_files\/ossna2017\/da\/BPFandXDP.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5229\u7528 BPF \u548c XDP \u5b9e\u73b0\u53ef\u7f16\u7a0b\u7684\u5185\u6838\u7f51\u7edc\u6570\u636e\u8def\u5f84<\/a>\u00a0\u00a0(Daniel Borkmann, OSSNA17, Los Angeles, September 2017)\uff1a\u5feb\u901f\u7406\u89e3\u6240\u6709\u7684\u5173\u4e8e eBPF \u548c XDP \u7684\u57fa\u7840\u6982\u5ff5\u7684\u6700\u597d\u8bb2\u7a3f\u4e2d\u7684\u4e00\u7bc7\uff08\u4e3b\u8981\u662f\u5173\u4e8e\u7f51\u7edc\u5904\u7406\u7684\uff09<\/li>\n<li><a class=\"ext\" href=\"https:\/\/speakerdeck.com\/tuxology\/the-bsd-packet-filter\" target=\"_blank\" rel=\"external nofollow noopener\">BSD \u5305\u8fc7\u6ee4\u5668<\/a>\u00a0\uff08Suchakra Sharma, June 2017\uff09\uff1a\u4e00\u7bc7\u975e\u5e38\u597d\u7684\u4ecb\u7ecd\u6587\u7ae0\uff0c\u4e3b\u8981\u662f\u5173\u4e8e\u8ddf\u8e2a\u65b9\u9762\u7684\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/brendangregg\/bpf-tracing-and-more\" target=\"_blank\" rel=\"external nofollow noopener\">BPF\uff1a\u8ddf\u8e2a\u53ca\u66f4\u591a<\/a>\uff08Brendan Gregg, January 2017\uff09\uff1a\u4e3b\u8981\u5185\u5bb9\u662f\u8ddf\u8e2a\u4f7f\u7528\u6848\u4f8b\u76f8\u5173\u7684\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/fr.slideshare.net\/brendangregg\/linux-bpf-superpowers\" target=\"_blank\" rel=\"external nofollow noopener\">Linux BPF \u7684\u8d85\u5f3a\u529f\u80fd<\/a>\u00a0\uff08Brendan Gregg, March 2016\uff09\uff1a\u7b2c\u4e00\u90e8\u5206\u662f\u5173\u4e8e<ruby>\u706b\u7130\u56fe<rt>flame graph<\/rt><\/ruby>\u7684\u4f7f\u7528\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/www.socallinuxexpo.org\/sites\/default\/files\/presentations\/Room%20211%20-%20IOVisor%20-%20SCaLE%2014x.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">IO Visor<\/a>\uff08Brenden Blanco, SCaLE 14x, January 2016\uff09\uff1a\u4ecb\u7ecd\u4e86\u00a0<strong>IO Visor \u9879\u76ee<\/strong>\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/events.linuxfoundation.org\/sites\/events\/files\/slides\/ebpf_on_the_mainframe_lcon_2015.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5927\u578b\u673a\u4e0a\u7684 eBPF<\/a>\uff08Michael Holzheu, LinuxCon, Dubin, October 2015\uff09<\/li>\n<li><a class=\"ext\" href=\"https:\/\/events.linuxfoundation.org\/sites\/events\/files\/slides\/tracing-linux-ezannoni-linuxcon-ja-2015_0.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728 Linux \u4e0a\u65b0\u7684\uff08\u4ee4\u4eba\u6fc0\u52a8\u7684\uff09\u8ddf\u8e2a\u65b0\u4ea7\u54c1<\/a>\uff08Elena Zannoni, LinuxCon, Japan, 2015\uff09<\/li>\n<li><a class=\"ext\" href=\"https:\/\/events.linuxfoundation.org\/sites\/events\/files\/slides\/bpf_collabsummit_2015feb20.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">BPF \u2014 \u5185\u6838\u4e2d\u7684\u865a\u62df\u673a<\/a>\uff08Alexei Starovoitov, February 2015\uff09\uff1aeBPF \u7684\u4f5c\u8005\u5199\u7684\u4e00\u7bc7\u8bb2\u7a3f\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/lwn.net\/Articles\/603983\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u6269\u5c55 extended BPF<\/a>\u00a0\uff08Jonathan Corbet, July 2014\uff09<\/li>\n<\/ul>\n<p><strong>BPF \u5185\u90e8\u7ed3\u6784<\/strong>\uff1a<\/p>\n<ul>\n<li>Daniel Borkmann \u6b63\u5728\u505a\u7684\u4e00\u9879\u4ee4\u4eba\u79f0\u5947\u7684\u5de5\u4f5c\uff0c\u5b83\u7528\u4e8e\u53bb\u5c55\u73b0 eBPF \u7684\u00a0<strong>\u5185\u90e8\u7ed3\u6784<\/strong>\uff0c\u5c24\u5176\u662f\uff0c\u5b83\u7684\u5173\u4e8e\u00a0<strong>\u968f\u540c tc \u4f7f\u7528<\/strong>\u00a0\u7684\u51e0\u6b21\u6f14\u8bb2\u548c\u8bba\u6587\u3002\n<ul>\n<li><a class=\"ext\" href=\"http:\/\/netdevconf.org\/1.2\/session.html?daniel-borkmann\" target=\"_blank\" rel=\"external nofollow noopener\">\u4f7f\u7528 tc \u7684 cls_bpf \u7684\u9ad8\u7ea7\u53ef\u7f16\u7a0b\u548c\u5b83\u7684\u6700\u65b0\u66f4\u65b0<\/a>\uff08netdev 1.2, Tokyo, October 2016\uff09\uff1aDaniel \u4ecb\u7ecd\u4e86 eBPF \u7684\u7ec6\u8282\uff0c\u53ca\u5176\u7528\u4e8e\u96a7\u9053\u548c\u5c01\u88c5\u3001\u76f4\u63a5\u5305\u8bbf\u95ee\u548c\u5176\u5b83\u7279\u6027\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/netdevconf.org\/1.2\/slides\/oct5\/07_tcws_daniel_borkmann_2016_tcws.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u81ea netdev 1.1 \u4ee5\u6765\u7684 cls_bpf\/eBPF \u66f4\u65b0<\/a>\u00a0\u00a0\uff08netdev 1.2, Tokyo, October 2016, part of\u00a0<a class=\"ext\" href=\"http:\/\/netdevconf.org\/1.2\/session.html?jamal-tc-workshop\" target=\"_blank\" rel=\"external nofollow noopener\">this tc workshop<\/a>\uff09<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.netdevconf.org\/1.1\/proceedings\/slides\/borkmann-tc-classifier-cls-bpf.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u4f7f\u7528 cls_bpf \u5b9e\u73b0\u5b8c\u5168\u53ef\u7f16\u7a0b\u7684 tc \u5206\u7c7b\u5668<\/a>\u00a0\u00a0\uff08netdev 1.1, Sevilla, February 2016\uff09\uff1a\u4ecb\u7ecd eBPF \u4e4b\u540e\uff0c\u5b83\u63d0\u4f9b\u4e86\u8bb8\u591a BPF \u5185\u90e8\u673a\u5236\uff08\u6620\u5c04\u7ba1\u7406\u3001\u5c3e\u8c03\u7528\u3001\u6821\u9a8c\u5668\uff09\u7684\u89c1\u89e3\u3002\u5bf9\u4e8e\u5927\u591a\u6570\u6709\u5fd7\u4e8e BPF \u7684\u4eba\u6765\u8bf4\uff0c\u8fd9\u662f\u5fc5\u8bfb\u7684\uff01<a class=\"ext\" href=\"http:\/\/www.netdevconf.org\/1.1\/proceedings\/papers\/On-getting-tc-classifier-fully-programmable-with-cls-bpf.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5168\u6587\u5728\u8fd9\u91cc<\/a>\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/archive.fosdem.org\/2016\/schedule\/event\/ebpf\/attachments\/slides\/1159\/export\/events\/attachments\/ebpf\/slides\/1159\/ebpf.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">Linux tc \u548c eBPF<\/a>\u00a0\uff08fosdem16, Brussels, Belgium, January 2016\uff09<\/li>\n<li><a class=\"ext\" href=\"https:\/\/fosdem.org\/2017\/schedule\/event\/ebpf_xdp\/\" target=\"_blank\" rel=\"external nofollow noopener\">eBPF \u548c XDP \u653b\u7565\u548c\u6700\u65b0\u66f4\u65b0<\/a>\u00a0\uff08fosdem17, Brussels, Belgium, February 2017\uff09\u8fd9\u4e9b\u4ecb\u7ecd\u53ef\u80fd\u662f\u7406\u89e3 eBPF \u5185\u90e8\u673a\u5236\u8bbe\u8ba1\u4e0e\u5b9e\u73b0\u7684\u6700\u4f73\u6587\u6863\u8d44\u6e90\u4e4b\u4e00\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a class=\"ext\" href=\"https:\/\/www.iovisor.org\/resources\/blog\" target=\"_blank\" rel=\"external nofollow noopener\">IO Visor \u535a\u5ba2<\/a>\u00a0\u6709\u4e00\u4e9b\u5173\u4e8e BPF \u7684\u503c\u5f97\u5173\u6ce8\u6280\u672f\u6587\u7ae0\u3002\u5b83\u4eec\u4e2d\u7684\u4e00\u4e9b\u5305\u542b\u4e86\u4e00\u70b9\u8425\u9500\u8ba8\u8bba\u3002<\/p>\n<p><strong>\u5185\u6838\u8ddf\u8e2a<\/strong>\uff1a\u603b\u7ed3\u4e86\u6240\u6709\u7684\u5df2\u6709\u7684\u65b9\u6cd5\uff0c\u5305\u62ec BPF\uff1a<\/p>\n<ul>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/vh21\/meet-cutebetweenebpfandtracing\" target=\"_blank\" rel=\"external nofollow noopener\">\u9082\u9005 eBPF \u548c\u5185\u6838\u8ddf\u8e2a<\/a>\u00a0\uff08Viller Hsiao, July 2016\uff09\uff1aKprobes\u3001uprobes\u3001ftrace<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/vh21\/linux-kernel-tracing\" target=\"_blank\" rel=\"external nofollow noopener\">Linux \u5185\u6838\u8ddf\u8e2a<\/a>\uff08Viller Hsiao, July 2016\uff09\uff1aSystemtap\u3001Kernelshark\u3001trace-cmd\u3001LTTng\u3001perf-tool\u3001ftrace\u3001hist-trigger\u3001perf\u3001function tracer\u3001tracepoint\u3001kprobe\/uprobe \u2026<\/li>\n<\/ul>\n<p>\u5173\u4e8e\u00a0<strong>\u4e8b\u4ef6\u8ddf\u8e2a\u548c\u76d1\u89c6<\/strong>\uff0cBrendan Gregg \u5927\u91cf\u4f7f\u7528\u4e86 eBPF\uff0c\u5e76\u4e14\u5c31\u5176\u4f7f\u7528 eBPFR \u7684\u4e00\u4e9b\u6848\u4f8b\u5199\u4e86\u6781\u597d\u7684\u6587\u6863\u3002\u5982\u679c\u4f60\u6b63\u5728\u505a\u4e00\u4e9b\u5185\u6838\u8ddf\u8e2a\u65b9\u9762\u7684\u5de5\u4f5c\uff0c\u4f60\u5e94\u8be5\u53bb\u770b\u4e00\u4e0b\u4ed6\u7684\u5173\u4e8e eBPF \u548c\u706b\u7130\u56fe\u76f8\u5173\u7684\u535a\u5ba2\u6587\u7ae0\u3002\u5176\u4e2d\u7684\u5927\u591a\u6570\u90fd\u53ef\u4ee5\u00a0<a class=\"ext\" href=\"http:\/\/www.brendangregg.com\/blog\/2016-03-05\/linux-bpf-superpowers.html\" target=\"_blank\" rel=\"external nofollow noopener\">\u4ece\u8fd9\u7bc7\u6587\u7ae0\u4e2d<\/a>\u00a0\u8bbf\u95ee\uff0c\u6216\u8005\u6d4f\u89c8\u4ed6\u7684\u535a\u5ba2\u3002<\/p>\n<p>\u4ecb\u7ecd BPF\uff0c\u4e5f\u4ecb\u7ecd\u00a0<strong>Linux \u7f51\u7edc\u7684\u4e00\u822c\u6982\u5ff5<\/strong>\uff1a<\/p>\n<ul>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/ThomasGraf5\/linux-networking-explained\" target=\"_blank\" rel=\"external nofollow noopener\">Linux \u7f51\u7edc\u8be6\u89e3<\/a>\u00a0\uff08Thomas Graf, LinuxCon, Toronto, August 2016\uff09<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/ThomasGraf5\/linuxcon-2015-linux-kernel-networking-walkthrough\" target=\"_blank\" rel=\"external nofollow noopener\">\u5185\u6838\u7f51\u7edc\u653b\u7565<\/a>\u00a0\u00a0(Thomas Graf, LinuxCon, Seattle, August 2015)<\/li>\n<\/ul>\n<p><strong>\u786c\u4ef6<ruby>\u5378\u8f7d<rt>offload<\/rt><\/ruby><\/strong>\uff08LCTT \u8bd1\u6ce8\uff1a\u201c\u5378\u8f7d\u201d\u662f\u6307\u539f\u672c\u7531\u8f6f\u4ef6\u6765\u5904\u7406\u7684\u4e00\u4e9b\u64cd\u4f5c\u4ea4\u7531\u786c\u4ef6\u6765\u5b8c\u6210\uff0c\u4ee5\u63d0\u5347\u541e\u5410\u91cf\uff0c\u964d\u4f4e CPU \u8d1f\u8377\u3002\uff09\uff1a<\/p>\n<ul>\n<li>eBPF \u4e0e tc \u6216\u8005 XDP \u4e00\u8d77\u652f\u6301\u786c\u4ef6\u5378\u8f7d\uff0c\u5f00\u59cb\u4e8e Linux \u5185\u6838\u7248\u672c 4.9\uff0c\u662f\u7531 Netronome \u63d0\u51fa\u7684\u3002\u8fd9\u91cc\u662f\u5173\u4e8e\u8fd9\u4e2a\u7279\u6027\u7684\u4ecb\u7ecd\uff1a<a class=\"ext\" href=\"http:\/\/netdevconf.org\/1.2\/session.html?jakub-kicinski\" target=\"_blank\" rel=\"external nofollow noopener\">eBPF\/XDP \u786c\u4ef6\u5378\u8f7d\u5230 SmartNICs<\/a>\uff08Jakub Kicinski \u548c Nic Viljoen, netdev 1.2, Tokyo, October 2016\uff09<\/li>\n<li>\u4e00\u5e74\u540e\u51fa\u73b0\u7684\u66f4\u65b0\u7248\uff1a<a class=\"ext\" href=\"https:\/\/www.netdevconf.org\/2.2\/session.html?viljoen-xdpoffload-talk\" target=\"_blank\" rel=\"external nofollow noopener\">\u7efc\u5408 XDP \u5378\u8f7d\u2014\u2014\u5904\u7406\u8fb9\u754c\u6848\u4f8b<\/a>\uff08Jakub Kicinski \u548c Nic Viljoen\uff0cnetdev 2.2 \uff0cSeoul\uff0cNovember 2017\uff09<\/li>\n<li>\u6211\u73b0\u5728\u6709\u4e00\u4e2a\u7b80\u77ed\u7684\uff0c\u4f46\u662f\u5728 2018 \u5e74\u7684 FOSDEM \u4e0a\u6709\u4e00\u4e2a\u66f4\u65b0\u7248\uff1a<a class=\"ext\" href=\"https:\/\/fosdem.org\/2018\/schedule\/event\/xdp\/\" target=\"_blank\" rel=\"external nofollow noopener\">XDP \u786c\u4ef6\u5378\u8f7d\u7684\u6311\u6218<\/a>\uff08Quentin Monnet\uff0cFOSDEM 2018\uff0cBrussels\uff0cFebruary 2018\uff09<\/li>\n<\/ul>\n<p>\u5173\u4e8e\u00a0<strong>cBPF<\/strong>\uff1a<\/p>\n<ul>\n<li><a class=\"ext\" href=\"http:\/\/www.tcpdump.org\/papers\/bpf-usenix93.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">BSD \u5305\u8fc7\u6ee4\u5668\uff1a\u4e00\u4e2a\u7528\u6237\u7ea7\u5305\u6355\u83b7\u7684\u65b0\u67b6\u6784<\/a>\u00a0\uff08Steven McCanne \u548c Van Jacobson, 1992\uff09\uff1a\u5b83\u662f\u5173\u4e8e\uff08\u7ecf\u5178\uff09BPF \u7684\u6700\u65e9\u7684\u8bba\u6587\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.gsp.com\/cgi-bin\/man.cgi?topic=bpf\" target=\"_blank\" rel=\"external nofollow noopener\">BPF \u7684 FreeBSD \u624b\u518c<\/a>\u00a0\u662f\u7406\u89e3 cBPF \u7a0b\u5e8f\u6709\u7528\u7684\u8d44\u6e90\u3002<\/li>\n<li>\u5173\u4e8e cBPF\uff0cDaniel Borkmann \u505a\u81f3\u5c11\u4e24\u4e2a\u6f14\u8bb2\uff0c<a class=\"ext\" href=\"http:\/\/borkmann.ch\/talks\/2013_devconf.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e00\u662f\uff0c\u5728 2013 \u5e74 mmap \u4e2d\uff0cBPF \u548c Netsniff-NG<\/a>\uff0c\u4ee5\u53ca\u00a0<a class=\"ext\" href=\"http:\/\/borkmann.ch\/talks\/2014_devconf.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728 2014 \u4e2d\u5173\u4e8e tc \u548c cls_bpf \u7684\u7684\u4e00\u4e2a\u975e\u5e38\u5b8c\u6574\u7684\u6f14\u8bb2<\/a>\u3002<\/li>\n<li>\u5728 Cloudflare \u7684\u535a\u5ba2\u4e0a\uff0cMarek Majkowski \u63d0\u51fa\u7684\u4ed6\u7684\u00a0<a class=\"ext\" href=\"https:\/\/blog.cloudflare.com\/introducing-the-bpf-tools\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e0e iptables \u7684\u00a0<code>xt_bpf<\/code>\u00a0\u6a21\u5757\u4e00\u8d77\u4f7f\u7528 BPF \u5b57\u8282\u7801<\/a>\u3002\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u4ece Linux \u5185\u6838 4.10 \u5f00\u59cb\uff0ceBPF \u4e5f\u662f\u901a\u8fc7\u8fd9\u4e2a\u6a21\u5757\u652f\u6301\u7684\u3002\uff08\u867d\u7136\uff0c\u6211\u5e76\u4e0d\u77e5\u9053\u5173\u4e8e\u8fd9\u4ef6\u4e8b\u7684\u4efb\u4f55\u8ba8\u8bba\u6216\u8005\u6587\u7ae0\uff09<\/li>\n<li><a class=\"ext\" href=\"http:\/\/biot.com\/capstats\/bpf.html\" target=\"_blank\" rel=\"external nofollow noopener\">Libpcap \u8fc7\u6ee4\u5668\u8bed\u6cd5<\/a><\/li>\n<\/ul>\n<h4 id=\"toc_6\">\u5173\u4e8e XDP<\/h4>\n<ul>\n<li>\u5728 IO Visor \u7f51\u7ad9\u4e0a\u7684\u00a0<a class=\"ext\" href=\"https:\/\/www.iovisor.org\/technology\/xdp\" target=\"_blank\" rel=\"external nofollow noopener\">XDP \u6982\u8ff0<\/a>\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bpf-docs\/raw\/master\/Express_Data_Path.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">eXpress Data Path (XDP)<\/a>\u00a0\u00a0\uff08Tom Herbert, Alexei Starovoitov, March 2016\uff09\uff1a\u8fd9\u662f\u7b2c\u4e00\u4e2a\u5173\u4e8e XDP \u7684\u6f14\u8bb2\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/events.linuxfoundation.org\/sites\/events\/files\/slides\/iovisor-lc-bof-2016.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">BoF &#8211; BPF \u80fd\u4e3a\u4f60\u505a\u4ec0\u4e48\uff1f<\/a>\u00a0\u00a0\uff08Brenden Blanco, LinuxCon, Toronto, August 2016\uff09\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/IOVisor\/express-data-path-linux-meetup-santa-clara-july-2016\" target=\"_blank\" rel=\"external nofollow noopener\">eXpress Data Path<\/a>\u00a0\uff08Brenden Blanco, Linux Meetup at Santa Clara, July 2016\uff09\uff1a\u5305\u542b\u4e00\u4e9b\uff08\u6709\u70b9\u8425\u9500\u7684\u610f\u601d\uff1f\uff09<strong>\u57fa\u51c6\u6d4b\u8bd5\u7ed3\u679c<\/strong>\uff01\u4f7f\u7528\u5355\u4e00\u6838\u5fc3\uff1a\n<ul>\n<li>ip \u8def\u7531\u4e22\u5f03\uff1a ~3.6 \u767e\u4e07\u5305\u6bcf\u79d2\uff08Mpps\uff09<\/li>\n<li>\u4f7f\u7528 BPF\uff0ctc\uff08\u4f7f\u7528 clsact qdisc\uff09\u4e22\u5f03\uff1a ~4.2 Mpps<\/li>\n<li>\u4f7f\u7528 BPF\uff0cXDP \u4e22\u5f03\uff1a20 Mpps \uff08CPU \u5229\u7528\u7387 &lt; 10%\uff09<\/li>\n<li>XDP \u91cd\u5199\u8f6c\u53d1\uff08\u5728\u7aef\u53e3\u4e0a\u5b83\u63a5\u6536\u5230\u7684\u5305\uff09\uff1a10 Mpps<\/li>\n<\/ul>\n<p>\uff08\u6d4b\u8bd5\u662f\u7528 mlx4 \u9a71\u52a8\u7a0b\u5e8f\u6267\u884c\u7684\uff09\u3002<\/li>\n<li>Jesper Dangaard Brouer \u6709\u51e0\u4e2a\u975e\u5e38\u597d\u7684\u5e7b\u706f\u7247\uff0c\u5b83\u53ef\u4ee5\u4ece\u672c\u8d28\u4e0a\u53bb\u7406\u89e3 XDP \u7684\u5185\u90e8\u7ed3\u6784\u3002\n<ul>\n<li><a class=\"ext\" href=\"http:\/\/people.netfilter.org\/hawk\/presentations\/xdp2016\/xdp_intro_and_use_cases_sep2016.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">XDP \u2212 eXpress Data Path\uff0c\u4ecb\u7ecd\u53ca\u5c06\u6765\u7684\u7528\u6cd5<\/a>\u00a0\uff08September 2016\uff09\uff1a\u201cLinux \u5185\u6838\u4e0e DPDK \u7684\u6597\u4e89\u201d \u3002<strong>\u672a\u6765\u7684\u8ba1\u5212<\/strong>\uff08\u5728\u5199\u8fd9\u7bc7\u6587\u7ae0\u65f6\uff09\u5b83\u7528 XDP \u548c DPDK \u8fdb\u884c\u6bd4\u8f83\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/netdevconf.org\/1.2\/session.html?jesper-performance-workshop\" target=\"_blank\" rel=\"external nofollow noopener\">\u7f51\u7edc\u6027\u80fd\u7814\u8ba8<\/a>\u00a0\u00a0\uff08netdev 1.2, Tokyo, October 2016\uff09\uff1a\u5173\u4e8e XDP \u5185\u90e8\u7ed3\u6784\u548c\u9884\u671f\u6f14\u5316\u7684\u9644\u52a0\u63d0\u793a\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/people.netfilter.org\/hawk\/presentations\/OpenSourceDays2017\/XDP_DDoS_protecting_osd2017.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">XDP \u2013 eXpress Data Path, \u53ef\u7528\u4e8e DDoS \u9632\u62a4<\/a>\u00a0\uff08OpenSourceDays, March 2017\uff09\uff1a\u5305\u542b\u4e86\u5173\u4e8e XDP \u7684\u8be6\u7ec6\u60c5\u51b5\u548c\u4f7f\u7528\u6848\u4f8b\uff0c\u4ee5\u53ca\u00a0<strong>\u6027\u80fd\u6d4b\u8bd5<\/strong>\u00a0\u7684\u00a0<strong>\u6027\u80fd\u6d4b\u8bd5\u7ed3\u679c<\/strong>\u00a0\u548c\u00a0<strong>\u4ee3\u7801\u7247\u65ad<\/strong>\uff0c\u4ee5\u53ca\u4f7f\u7528 eBPF\/XDP\uff08\u57fa\u4e8e\u4e00\u4e2a IP \u9ed1\u540d\u5355\u6a21\u5f0f\uff09\u7684\u7528\u4e8e\u00a0<strong>\u57fa\u672c\u7684 DDoS \u9632\u62a4<\/strong>\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/people.netfilter.org\/hawk\/presentations\/MM-summit2017\/MM-summit2017-JesperBrouer.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5185\u5b58 vs. \u7f51\u7edc\uff0c\u6fc0\u53d1\u548c\u4fee\u590d\u5185\u5b58\u74f6\u9888<\/a>\u00a0\uff08LSF Memory Management Summit, March 2017\uff09\uff1a\u63d0\u4f9b\u4e86\u8bb8\u591a XDP \u5f00\u53d1\u8005\u5f53\u524d\u6240\u9762\u5bf9\u00a0<strong>\u5185\u5b58\u95ee\u9898<\/strong>\u00a0\u7684\u8bb8\u591a\u7ec6\u8282\u3002\u4e0d\u8981\u4ece\u8fd9\u4e00\u4e2a\u5f00\u59cb\uff0c\u4f46\u5982\u679c\u4f60\u5df2\u7ecf\u7406\u89e3\u4e86 XDP\uff0c\u5e76\u4e14\u60f3\u53bb\u4e86\u89e3\u5b83\u5728\u9875\u9762\u5206\u914d\u65b9\u9762\u7684\u771f\u5b9e\u5de5\u4f5c\u65b9\u5f0f\uff0c\u8fd9\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u8d44\u6e90\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/netdevconf.org\/2.1\/session.html?gospodarek\" target=\"_blank\" rel=\"external nofollow noopener\">XDP \u80fd\u4e3a\u5176\u5b83\u4eba\u505a\u4ec0\u4e48<\/a>\uff08netdev 2.1, Montreal, April 2017\uff09\uff0c\u53ca Andy Gospodarek\uff1a\u666e\u901a\u4eba\u600e\u4e48\u5f00\u59cb\u4f7f\u7528 eBPF \u548c XDP\u3002\u8fd9\u4e2a\u6f14\u8bb2\u4e5f\u7531 Julia Evans \u5728\u00a0<a class=\"ext\" href=\"http:\/\/jvns.ca\/blog\/2017\/04\/07\/xdp-bpf-tutorial\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u5979\u7684\u535a\u5ba2<\/a>\u00a0\u4e0a\u505a\u4e86\u603b\u7ed3\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/www.netdevconf.org\/2.2\/session.html?gospodarek-xdp-workshop\" target=\"_blank\" rel=\"external nofollow noopener\">XDP \u80fd\u4e3a\u5176\u5b83\u4eba\u505a\u4ec0\u4e48<\/a>\uff0c\u7b2c\u4e8c\u7248\uff08netdev 2.2, Seoul, November 2017\uff09\uff0c\u540c\u4e00\u4e2a\u4f5c\u8005\uff1a\u8be5\u6f14\u8bb2\u7684\u4fee\u8ba2\u7248\u672c\uff0c\u5305\u542b\u4e86\u65b0\u7684\u5185\u5bb9\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\uff08Jesper \u4e5f\u521b\u5efa\u4e86\u5e76\u4e14\u5c1d\u8bd5\u53bb\u6269\u5c55\u4e86\u6709\u5173 eBPF \u548c XDP \u7684\u4e00\u4e9b\u6587\u6863\uff0c\u67e5\u770b\u00a0<a class=\"ext\" href=\"https:\/\/qmonnet.github.io\/whirl-offload\/2016\/09\/01\/dive-into-bpf\/#about-xdp-1\" target=\"_blank\" rel=\"external nofollow noopener\">\u76f8\u5173\u8282<\/a>\u3002\uff09<\/p>\n<ul>\n<li><a class=\"ext\" href=\"http:\/\/netdevconf.org\/1.2\/session.html?herbert-xdp-workshop\" target=\"_blank\" rel=\"external nofollow noopener\">XDP \u7814\u8ba8 \u2014 \u4ecb\u7ecd\u3001\u4f53\u9a8c\u548c\u672a\u6765\u53d1\u5c55<\/a>\uff08Tom Herbert, netdev 1.2, Tokyo, October 2016\uff09\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u53ea\u6709\u89c6\u9891\u53ef\u7528\uff0c\u6211\u4e0d\u77e5\u9053\u662f\u5426\u6709\u5e7b\u706f\u7247\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0177\/9886\/files\/phv2017-gbertin.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728 Linux \u4e0a\u8fdb\u884c\u9ad8\u901f\u5305\u8fc7\u6ee4<\/a>\u00a0\uff08Gilberto Bertin, DEF CON 25, Las Vegas, July 2017\uff09\u5728 Linux \u4e0a\u7684\u6700\u5148\u8fdb\u7684\u5305\u8fc7\u6ee4\u7684\u4ecb\u7ecd\uff0c\u9762\u5411 DDoS \u7684\u4fdd\u62a4\u3001\u8ba8\u8bba\u4e86\u5173\u4e8e\u5728\u5185\u6838\u4e2d\u8fdb\u884c\u5305\u5904\u7406\u3001\u5185\u6838\u65c1\u901a\u3001XDP \u548c eBPF\u3002<\/li>\n<\/ul>\n<h4 id=\"toc_7\">\u5173\u4e8e \u57fa\u4e8e eBPF \u6216\u8005 eBPF \u76f8\u5173\u7684\u5176\u5b83\u7ec4\u4ef6<\/h4>\n<ul>\n<li><a class=\"ext\" href=\"https:\/\/schd.ws\/hosted_files\/2016p4workshop\/1d\/Intel%20Fastabend-P4%20on%20the%20Edge.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728\u8fb9\u754c\u4e0a\u7684 P4<\/a>\u00a0\uff08John Fastabend, May 2016\uff09\uff1a\u63d0\u51fa\u4e86\u4f7f\u7528\u00a0<strong>P4<\/strong>\uff0c\u4e00\u4e2a\u5305\u5904\u7406\u7684\u63cf\u8ff0\u8bed\u8a00\uff0c\u4f7f\u7528 BPF \u53bb\u521b\u5efa\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684\u53ef\u7f16\u7a0b\u4ea4\u6362\u673a\u3002<\/li>\n<li>\u5982\u679c\u4f60\u559c\u6b22\u97f3\u9891\u7684\u6f14\u8bb2\uff0c\u8fd9\u91cc\u6709\u4e00\u4e2a\u76f8\u5173\u7684\u00a0<a class=\"ext\" href=\"https:\/\/ovsorbit.benpfaff.org\/#e11\" target=\"_blank\" rel=\"external nofollow noopener\">OvS Orbit \u7247\u65ad(#11)\uff0c\u53eb\u505a \u5728\u8fb9\u754c\u4e0a\u7684 P4<\/a>\uff0c\u65e5\u671f\u662f 2016 \u5e74 8 \u6708\u3002OvS Orbit \u662f\u5bf9 Ben Pfaff \u7684\u8bbf\u8c08\uff0c\u5b83\u662f Open vSwitch \u7684\u5176\u4e2d\u4e00\u4e2a\u6838\u5fc3\u7ef4\u62a4\u8005\u3002\u5728\u8fd9\u4e2a\u573a\u666f\u4e2d\uff0cJohn Fastabend \u662f\u88ab\u8bbf\u8c08\u8005\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/open-nfp.org\/media\/pdfs\/Open_NFP_P4_EBPF_Linux_TC_Offload_FINAL.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">P4, EBPF \u548c Linux TC \u5378\u8f7d<\/a>\u00a0\uff08Dinan Gunawardena \u548c Jakub Kicinski, August 2016\uff09\uff1a\u53e6\u4e00\u4e2a\u00a0<strong>P4<\/strong>\u00a0\u7684\u6f14\u8bb2\uff0c\u4e00\u4e9b\u6709\u5173\u4e8e Netronome \u7684\u00a0<strong>NFP<\/strong>\uff08\u7f51\u7edc\u6d41\u5904\u7406\u5668\uff09\u67b6\u6784\u4e0a\u7684 eBPF \u786c\u4ef6\u5378\u8f7d\u7684\u56e0\u7d20\u3002<\/li>\n<li><strong>Cilium<\/strong>\u00a0\u662f\u4e00\u4e2a\u7531 Cisco \u6700\u5148\u53d1\u8d77\u7684\u6280\u672f\uff0c\u5b83\u4f9d\u8d56 BPF \u548c XDP \u53bb\u63d0\u4f9b \u201c\u57fa\u4e8e eBPF \u7a0b\u5e8f\u5373\u65f6\u751f\u6210\u7684\uff0c\u7528\u4e8e\u5bb9\u5668\u7684\u5feb\u901f\u5185\u6838\u5f3a\u5236\u7684\u7f51\u7edc\u548c\u5b89\u5168\u7b56\u7565\u201d\u3002<a class=\"ext\" href=\"https:\/\/github.com\/cilium\/cilium\" target=\"_blank\" rel=\"external nofollow noopener\">\u8fd9\u4e2a\u9879\u76ee\u7684\u4ee3\u7801<\/a>\u00a0\u5728 GitHub \u4e0a\u53ef\u4ee5\u8bbf\u95ee\u5230\u3002Thomas Graf \u5bf9\u8fd9\u4e2a\u4e3b\u9898\u505a\u4e86\u5f88\u591a\u7684\u6f14\u8bb2\uff1a\n<ul>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/ThomasGraf5\/clium-container-networking-with-bpf-xdp\" target=\"_blank\" rel=\"external nofollow noopener\">Cilium\uff1a\u5bf9\u5bb9\u5668\u5229\u7528 BPF &amp; XDP \u5b9e\u73b0\u7f51\u7edc &amp; \u5b89\u5168<\/a>\uff0c\u4e5f\u7279\u522b\u5c55\u793a\u4e86\u4e00\u4e2a\u8d1f\u8f7d\u5747\u8861\u7684\u4f7f\u7528\u6848\u4f8b\uff08Linux Plumbers conference, Santa Fe, November 2016\uff09<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/Docker\/cilium-bpf-xdp-for-containers-66969823\" target=\"_blank\" rel=\"external nofollow noopener\">Cilium\uff1a\u5bf9\u5bb9\u5668\u5229\u7528 BPF &amp; XDP \u5b9e\u73b0\u7f51\u7edc &amp; \u5b89\u5168<\/a>\u00a0\uff08Docker Distributed Systems Summit, October 2016 \u2014\u00a0<a class=\"ext\" href=\"https:\/\/www.youtube.com\/watch?v=TnJF7ht3ZYc&amp;amp;amp;amp;list=PLkA60AVN3hh8oPas3cq2VA9xB7WazcIgs\" target=\"_blank\" rel=\"external nofollow noopener\">video<\/a>\uff09<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/ThomasGraf5\/cilium-fast-ipv6-container-networking-with-bpf-and-xdp\" target=\"_blank\" rel=\"external nofollow noopener\">Cilium\uff1a\u4f7f\u7528 BPF \u548c XDP \u7684\u5feb\u901f IPv6 \u5bb9\u5668\u7f51\u7edc<\/a>\u00a0\uff08LinuxCon, Toronto, August 2016\uff09<\/li>\n<li><a class=\"ext\" href=\"https:\/\/fosdem.org\/2017\/schedule\/event\/cilium\/\" target=\"_blank\" rel=\"external nofollow noopener\">Cilium\uff1a \u7528\u4e8e\u5bb9\u5668\u7684 BPF &amp; XDP<\/a>\u00a0\uff08fosdem17, Brussels, Belgium, February 2017\uff09<\/li>\n<\/ul>\n<p>\u5728\u4e0a\u8ff0\u4e0d\u540c\u7684\u6f14\u8bb2\u4e2d\u91cd\u590d\u4e86\u5927\u91cf\u7684\u5185\u5bb9\uff1b\u5acc\u9ebb\u70e6\u5c31\u9009\u6700\u8fd1\u7684\u4e00\u4e2a\u3002Daniel Borkmann \u4f5c\u4e3a Google \u5f00\u6e90\u535a\u5ba2\u7684\u7279\u9080\u4f5c\u8005\uff0c\u4e5f\u5199\u4e86\u00a0<a class=\"ext\" href=\"https:\/\/opensource.googleblog.com\/2016\/11\/cilium-networking-and-security.html\" target=\"_blank\" rel=\"external nofollow noopener\">Cilium \u7b80\u4ecb<\/a>\u3002<\/li>\n<li>\u8fd9\u91cc\u4e5f\u6709\u4e00\u4e2a\u5173\u4e8e\u00a0<strong>Cilium<\/strong>\u00a0\u7684\u64ad\u5ba2\u8282\u76ee\uff1a\u4e00\u4e2a\u662f\u00a0<a class=\"ext\" href=\"https:\/\/ovsorbit.benpfaff.org\/\" target=\"_blank\" rel=\"external nofollow noopener\">OvS Orbit episode (#4)<\/a>\uff0c\u5b83\u662f Ben Pfaff \u8bbf\u8c08 Thomas Graf \uff082016 \u5e74 5 \u6708\uff09\uff0c\u548c\u00a0<a class=\"ext\" href=\"http:\/\/blog.ipspace.net\/2016\/10\/fast-linux-packet-forwarding-with.html\" target=\"_blank\" rel=\"external nofollow noopener\">\u53e6\u5916\u4e00\u4e2a Ivan Pepelnjak \u7684\u64ad\u5ba2<\/a>\uff0c\u4ecd\u7136\u662f Thomas Graf \u5173\u4e8e eBPF\u3001P4\u3001XDP \u548c Cilium \u65b9\u9762\u7684\uff082016 \u5e74 10 \u6708\uff09\u3002<\/li>\n<li><strong>Open vSwitch<\/strong>\u00a0(OvS)\uff0c\u5b83\u662f\u00a0<strong>Open Virtual Network<\/strong>\uff08OVN\uff0c\u4e00\u4e2a\u5f00\u6e90\u7684\u7f51\u7edc\u865a\u62df\u5316\u89e3\u51b3\u65b9\u6848\uff09\u76f8\u5173\u7684\u9879\u76ee\uff0c\u6b63\u5728\u8003\u8651\u5728\u4e0d\u540c\u7684\u5c42\u6b21\u4e0a\u4f7f\u7528 eBPF\uff0c\u5b83\u5df2\u7ecf\u5b9e\u73b0\u4e86\u51e0\u4e2a\u6982\u5ff5\u9a8c\u8bc1\u539f\u578b\uff1a\n<ul>\n<li><a class=\"ext\" href=\"http:\/\/openvswitch.org\/support\/ovscon2016\/7\/1120-tu.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u4f7f\u7528 eBPF \u5378\u8f7d OVS \u6d41\u5904\u7406\u5668<\/a>\u00a0\uff08William (Cheng-Chun) Tu, OvS conference, San Jose, November 2016\uff09<\/li>\n<li><a class=\"ext\" href=\"http:\/\/openvswitch.org\/support\/ovscon2016\/7\/1245-bertrone.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5c06 OVN \u7684\u7075\u6d3b\u6027\u4e0e IOVisor \u7684\u9ad8\u6548\u7387\u76f8\u7ed3\u5408<\/a>\u00a0\uff08Fulvio Risso, Matteo Bertrone \u548c Mauricio Vasquez Bernal, OvS conference, San Jose, November 2016\uff09<\/li>\n<\/ul>\n<p>\u636e\u6211\u6240\u77e5\uff0c\u8fd9\u4e9b eBPF \u7684\u4f7f\u7528\u6848\u4f8b\u770b\u4e0a\u53bb\u4ec5\u5904\u4e8e\u63d0\u8bae\u9636\u6bb5\uff08\u5e76\u6ca1\u6709\u5408\u5e76\u5230 OvS \u7684\u4e3b\u5206\u652f\u4e2d\uff09\uff0c\u4f46\u662f\uff0c\u770b\u5b83\u5e26\u6765\u4e86\u4ec0\u4e48\u5c06\u662f\u975e\u5e38\u503c\u5f97\u5173\u6ce8\u7684\u4e8b\u60c5\u3002<\/li>\n<li>XDP \u7684\u8bbe\u8ba1\u5bf9\u5206\u5e03\u5f0f\u62d2\u7edd\u8bbf\u95ee\uff08DDoS\uff09\u653b\u51fb\u662f\u975e\u5e38\u6709\u7528\u7684\u3002\u8d8a\u6765\u8d8a\u591a\u7684\u6f14\u8bb2\u90fd\u5173\u6ce8\u4e8e\u5b83\u3002\u4f8b\u5982\uff0c\u5728 2017 \u5e74 4 \u6708\u52a0\u62ff\u5927\u8499\u7279\u5229\u5c14\u4e3e\u529e\u7684 netdev 2.1 \u4f1a\u8bae\u4e0a\uff0c\u6765\u81ea Cloudflare \u7684\u4eba\u4eec\u7684\u8bb2\u8bdd\uff08<a class=\"ext\" href=\"http:\/\/netdevconf.org\/2.1\/session.html?bertin\" target=\"_blank\" rel=\"external nofollow noopener\">XDP \u5b9e\u8df5\uff1a\u5c06 XDP \u96c6\u6210\u5230\u6211\u4eec\u7684 DDoS \u7f13\u89e3\u7ba1\u9053<\/a>\uff09\u6216\u8005\u6765\u81ea Facebook \u7684\uff08<a class=\"ext\" href=\"http:\/\/netdevconf.org\/2.1\/session.html?zhou\" target=\"_blank\" rel=\"external nofollow noopener\">Droplet\uff1a\u7531 BPF + XDP \u9a71\u52a8\u7684 DDoS \u5bf9\u7b56<\/a>\uff09\u90fd\u5b58\u5728\u8fd9\u6837\u7684\u5f88\u591a\u4f7f\u7528\u6848\u4f8b\u3002<\/li>\n<li>Kubernetes \u53ef\u4ee5\u7528\u5f88\u591a\u79cd\u65b9\u5f0f\u4e0e eBPF \u4ea4\u4e92\u3002\u8fd9\u91cc\u6709\u4e00\u7bc7\u5173\u4e8e\u00a0<a class=\"ext\" href=\"http:\/\/blog.kubernetes.io\/2017\/12\/using-ebpf-in-kubernetes.html\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728 Kubernetes \u4e2d\u4f7f\u7528 eBPF<\/a>\u00a0\u7684\u6587\u7ae0\uff0c\u5b83\u89e3\u91ca\u4e86\u73b0\u6709\u7684\u4ea7\u54c1\uff08Cilium\u3001Weave Scope\uff09\u5982\u4f55\u652f\u6301 eBPF \u4e0e Kubernetes \u4e00\u8d77\u5de5\u4f5c\uff0c\u5e76\u4e14\u8fdb\u4e00\u6b65\u63cf\u8ff0\u4e86\uff0c\u5728\u5bb9\u5668\u90e8\u7f72\u73af\u5883\u4e2d\uff0ceBPF \u611f\u5174\u8da3\u7684\u4ea4\u4e92\u5185\u5bb9\u662f\u4ec0\u4e48\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.slideshare.net\/IOVisor\/ceth-for-xdp-linux-meetup-santa-clara-july-2016\" target=\"_blank\" rel=\"external nofollow noopener\">CETH for XDP<\/a>\u00a0\uff08Yan Chan \u548c Yunsong Lu\u3001Linux Meetup\u3001Santa Clara\u3001July 2016\uff09\uff1a<strong>CETH<\/strong>\uff0c\u662f\u7531 Mellanox\u00a0\u53d1\u8d77\u7684\uff0c\u4e3a\u5b9e\u73b0\u66f4\u5feb\u7684\u7f51\u7edc I\/O \u800c\u4e3b\u5f20\u7684\u901a\u7528\u4ee5\u592a\u7f51\u9a71\u52a8\u7a0b\u5e8f\u67b6\u6784\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/info.iet.unipi.it\/~luigi\/vale\/\" target=\"_blank\" rel=\"external nofollow noopener\"><strong>VALE \u4ea4\u6362\u673a<\/strong><\/a>\uff0c\u53e6\u4e00\u4e2a\u865a\u62df\u4ea4\u6362\u673a\uff0c\u5b83\u53ef\u4ee5\u4e0e netmap \u6846\u67b6\u7ed3\u5408\uff0c\u6709\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/YutaroHayakawa\/vale-bpf\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e00\u4e2a BPF \u6269\u5c55\u6a21\u5757<\/a>\u3002<\/li>\n<li><strong>Suricata<\/strong>\uff0c\u4e00\u4e2a\u5f00\u6e90\u7684\u5165\u4fb5\u68c0\u6d4b\u7cfb\u7edf\uff0c\u5b83\u7684\u65c1\u8def\u6355\u83b7\u65c1\u7279\u6027\u4f9d\u8d56\u4e8e XDP\u3002\u6709\u4e00\u4e9b\u5173\u4e8e\u5b83\u7684\u8d44\u6e90\uff1a\n<ul>\n<li><a class=\"ext\" href=\"http:\/\/suricata.readthedocs.io\/en\/latest\/capture-hardware\/ebpf-xdp.html?highlight=XDP#ebpf-and-xdp\" target=\"_blank\" rel=\"external nofollow noopener\">Suricate \u6587\u6863\u7684 eBPF \u548c XDP \u90e8\u5206<\/a><\/li>\n<li><a class=\"ext\" href=\"https:\/\/github.com\/pevma\/SEPTun-Mark-II\" target=\"_blank\" rel=\"external nofollow noopener\">SEPTun-Mark-II<\/a>\u00a0\uff08Suricata Extreme \u6027\u80fd\u8c03\u4f18\u6307\u5357 \u2014 Mark II\uff09\uff0c Michal Purzynski \u548c Peter Manev \u53d1\u5e03\u4e8e 2018 \u5e74 3 \u6708\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/www.stamus-networks.com\/2016\/09\/28\/suricata-bypass-feature\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u4ecb\u7ecd\u8fd9\u4e2a\u7279\u6027\u7684\u535a\u5ba2\u6587\u7ae0<\/a>\u00a0\u00c9ric Leblond \u53d1\u5e03\u4e8e 2016 \u5e74 9 \u6708\u3002<\/li>\n<li><a class=\"ext\" href=\"http:\/\/netdevconf.org\/1.2\/slides\/oct6\/10_suricata_ebpf.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">Suricate \u7684 eBPF \u5386\u9669\u8bb0<\/a>\u00a0\u00a0\uff08\u00c9ric Leblond, netdev 1.2, Tokyo, October 2016\uff09<\/li>\n<li><a class=\"ext\" href=\"https:\/\/www.slideshare.net\/ennael\/kernel-recipes-2017-ebpf-and-xdp-eric-leblond\" target=\"_blank\" rel=\"external nofollow noopener\">eBPF \u548c XDP \u4e00\u7aa5<\/a>\u00a0\u00a0\uff08\u00c9ric Leblond, Kernel Recipes, Paris, September 2017\uff09<\/li>\n<\/ul>\n<p>\u5f53\u4f7f\u7528\u539f\u751f\u9a71\u52a8\u7684 XDP \u65f6\uff0c\u8fd9\u4e2a\u9879\u76ee\u8981\u6c42\u5b9e\u73b0\u975e\u5e38\u9ad8\u7684\u6027\u80fd\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bpf-docs\/blob\/master\/university\/sigcomm-ccr-InKev-2016.pdf\" target=\"_blank\" rel=\"external nofollow noopener\">InKeV\uff1a\u5bf9\u4e8e DCN \u7684\u5185\u6838\u4e2d\u5206\u5e03\u5f0f\u7f51\u7edc\u865a\u62df\u5316<\/a>\u00a0\uff08Z. Ahmed, M. H. Alizai \u548c A. A. Syed, SIGCOMM, August 2016\uff09\uff1a<strong>InKeV<\/strong>\u00a0\u662f\u4e00\u4e2a\u57fa\u4e8e eBPF \u7684\u865a\u62df\u7f51\u7edc\u3001\u76ee\u6807\u6570\u636e\u4e2d\u5fc3\u7f51\u7edc\u7684\u6570\u636e\u8def\u5f84\u67b6\u6784\u3002\u5b83\u6700\u521d\u7531 PLUMgrid \u63d0\u51fa\uff0c\u5e76\u4e14\u58f0\u79f0\u76f8\u6bd4\u57fa\u4e8e OvS \u7684 OpenStack \u89e3\u51b3\u65b9\u6848\u53ef\u4ee5\u83b7\u5f97\u66f4\u597d\u7684\u6027\u80fd\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/fosdem.org\/2017\/schedule\/event\/go_bpf\/\" target=\"_blank\" rel=\"external nofollow noopener\">gobpf\u00a0&#8211; \u5728 Go \u4e2d\u4f7f\u7528 eBPF<\/a>\u00a0\uff08Michael Schubert, fosdem17, Brussels, Belgium, February 2017\uff09\uff1a\u201c\u4e00\u4e2a\u6765\u81ea Go \u5e93\uff0c\u53ef\u4ee5\u53bb\u521b\u5efa\u3001\u52a0\u8f7d\u548c\u4f7f\u7528 eBPF \u7a0b\u5e8f\u201d<\/li>\n<li><a class=\"ext\" href=\"https:\/\/wkz.github.io\/ply\/\" target=\"_blank\" rel=\"external nofollow noopener\">ply<\/a>\u00a0\u662f\u4e3a Linux \u5b9e\u73b0\u7684\u4e00\u4e2a\u5c0f\u800c\u7075\u6d3b\u7684\u5f00\u6e90\u52a8\u6001\u00a0<strong>\u8ddf\u8e2a\u5668<\/strong>\uff0c\u5b83\u7684\u4e00\u4e9b\u7279\u6027\u975e\u5e38\u7c7b\u4f3c\u4e8e bcc \u5de5\u5177\uff0c\u662f\u53d7 awk \u548c dtrace \u542f\u53d1\uff0c\u4f46\u4f7f\u7528\u4e00\u4e2a\u66f4\u7b80\u5355\u7684\u8bed\u8a00\u3002\u5b83\u662f\u7531 Tobias Waldekranz \u5199\u7684\u3002<\/li>\n<li>\u5982\u679c\u4f60\u8bfb\u8fc7\u6211\u4ee5\u524d\u7684\u6587\u7ae0\uff0c\u4f60\u53ef\u80fd\u5bf9\u6211\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\u7684\u8ba8\u8bba\u611f\u5174\u8da3\uff0c<a class=\"ext\" href=\"https:\/\/fosdem.org\/2017\/schedule\/event\/stateful_ebpf\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u4f7f\u7528 eBPF \u5b9e\u73b0 OpenState \u63a5\u53e3<\/a>\uff0c\u5173\u4e8e\u5305\u72b6\u6001\u5904\u7406\uff0c\u5728 fosdem17 \u4e2d\u3002<\/li>\n<\/ul>\n<h3 id=\"toc_8\">\u6587\u6863<\/h3>\n<p>\u4e00\u65e6\u4f60\u5bf9 BPF \u662f\u505a\u4ec0\u4e48\u7684\u6709\u4e00\u4e2a\u5927\u4f53\u7684\u7406\u89e3\u3002\u4f60\u53ef\u4ee5\u629b\u5f00\u4e00\u822c\u7684\u6f14\u8bb2\u800c\u6df1\u5165\u5230\u6587\u6863\u4e2d\u4e86\u3002\u4e0b\u9762\u662f BPF \u7684\u89c4\u8303\u548c\u529f\u80fd\u7684\u6700\u5168\u9762\u7684\u6587\u6863\uff0c\u6309\u4f60\u7684\u9700\u8981\u6311\u4e00\u4e2a\u5f00\u59cb\u9605\u8bfb\u5427\uff01<\/p>\n<h4 id=\"toc_9\">\u5173\u4e8e BPF<\/h4>\n<ul>\n<li><strong>BPF \u7684\u89c4\u8303<\/strong>\uff08\u5305\u542b classic \u548c extended \u7248\u672c\uff09\u53ef\u4ee5\u5728 Linux \u5185\u6838\u7684\u6587\u6863\u4e2d\uff0c\u548c\u7279\u5b9a\u7684\u6587\u4ef6\u00a0<a class=\"ext\" href=\"https:\/\/www.kernel.org\/doc\/Documentation\/networking\/filter.txt\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/Documentation\/networking\/filter.txt<\/a>\u00a0\u4e2d\u627e\u5230\u3002BPF \u4f7f\u7528\u4ee5\u53ca\u5b83\u7684\u5185\u90e8\u7ed3\u6784\u4e5f\u88ab\u8bb0\u5f55\u5728\u90a3\u91cc\u3002\u6b64\u5916\uff0c\u5f53\u52a0\u8f7d BPF \u4ee3\u7801\u5931\u8d25\u65f6\uff0c\u5728\u8fd9\u91cc\u53ef\u4ee5\u627e\u5230\u00a0<strong>\u88ab\u6821\u9a8c\u5668\u629b\u51fa\u7684\u9519\u8bef\u4fe1\u606f<\/strong>\uff0c\u8fd9\u6709\u52a9\u4e8e\u4f60\u6392\u9664\u4e0d\u660e\u786e\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/li>\n<li>\u6b64\u5916\uff0c\u5728\u5185\u6838\u6811\u4e2d\uff0c\u5728 eBPF \u90a3\u91cc\u6709\u4e00\u4e2a\u5173\u4e8e\u00a0<strong>\u5e38\u89c1\u95ee\u7b54<\/strong>\u00a0\u7684\u6587\u6863\uff0c\u5b83\u5728\u6587\u4ef6\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/davem\/net-next.git\/tree\/Documentation\/bpf\/bpf_design_QA.txt?id=2e39748a4231a893f057567e9b880ab34ea47aef\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/Documentation\/bpf\/bpf_design_QA.txt<\/a>\u00a0\u4e2d\u3002<\/li>\n<li>\u2026 \u4f46\u662f\uff0c\u5185\u6838\u6587\u6863\u662f\u975e\u5e38\u96be\u61c2\u7684\uff0c\u5e76\u4e14\u975e\u5e38\u4e0d\u5bb9\u6613\u9605\u8bfb\u3002\u5982\u679c\u4f60\u53ea\u662f\u53bb\u67e5\u627e\u4e00\u4e2a\u7b80\u5355\u7684 eBPF \u8bed\u8a00\u7684\u63cf\u8ff0\uff0c\u53ef\u4ee5\u53bb IO Visor \u7684 GitHub \u4ed3\u5e93\uff0c\u90a3\u513f\u6709\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bpf-docs\/blob\/master\/eBPF.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u5b83\u7684\u6982\u62ec\u6027\u63cf\u8ff0<\/a>\u3002<\/li>\n<li>\u987a\u4fbf\u8bf4\u4e00\u4e0b\uff0cIO Visor \u9879\u76ee\u6536\u96c6\u4e86\u8bb8\u591a\u00a0<strong>\u5173\u4e8e BPF \u7684\u8d44\u6e90<\/strong>\u3002\u5927\u90e8\u5206\u5206\u522b\u5728 bcc \u4ed3\u5e93\u7684\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/tree\/master\/docs\" target=\"_blank\" rel=\"external nofollow noopener\">\u6587\u6863\u76ee\u5f55<\/a>\u00a0\u4e2d\uff0c\u548c\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bpf-docs\/\" target=\"_blank\" rel=\"external nofollow noopener\">bpf-docs \u4ed3\u5e93<\/a>\u00a0\u7684\u6574\u4e2a\u5185\u5bb9\u4e2d\uff0c\u5b83\u4eec\u90fd\u5728 GitHub \u4e0a\u3002\u6ce8\u610f\uff0c\u8fd9\u4e2a\u975e\u5e38\u597d\u7684\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/docs\/reference_guide.md\" target=\"_blank\" rel=\"external nofollow noopener\">BPF\u00a0\u53c2\u8003\u6307\u5357<\/a>\u00a0\u5305\u542b\u4e00\u4e2a\u8be6\u7ec6\u7684 BPF C \u548c bcc Python \u7684 helper \u7684\u63cf\u8ff0\u3002<\/li>\n<li>\u60f3\u6df1\u5165\u5230 BPF\uff0c\u90a3\u91cc\u6709\u4e00\u4e9b\u5fc5\u8981\u7684\u00a0<strong>Linux \u624b\u518c\u9875<\/strong>\u3002\u7b2c\u4e00\u4e2a\u662f\u00a0<a class=\"ext\" href=\"http:\/\/man7.org\/linux\/man-pages\/man2\/bpf.2.html\" target=\"_blank\" rel=\"external nofollow noopener\">bpf(2)\u00a0man \u9875\u9762<\/a>\u00a0\u5173\u4e8e\u00a0<code>bpf()<\/code>\u00a0<strong>\u7cfb\u7edf\u8c03\u7528<\/strong>\uff0c\u5b83\u7528\u4e8e\u4ece\u7528\u6237\u7a7a\u95f4\u53bb\u7ba1\u7406 BPF \u7a0b\u5e8f\u548c\u6620\u5c04\u3002\u5b83\u4e5f\u5305\u542b\u4e00\u4e2a BPF \u9ad8\u7ea7\u7279\u6027\u7684\u63cf\u8ff0\uff08\u7a0b\u5e8f\u7c7b\u578b\u3001\u6620\u5c04\u7b49\u7b49\uff09\u3002\u7b2c\u4e8c\u4e2a\u662f\u4e3b\u8981\u662f\u5904\u7406\u5e0c\u671b\u9644\u52a0\u5230 tc \u63a5\u53e3\u7684 BPF \u7a0b\u5e8f\uff1a\u5b83\u662f\u00a0<a class=\"ext\" href=\"http:\/\/man7.org\/linux\/man-pages\/man8\/tc-bpf.8.html\" target=\"_blank\" rel=\"external nofollow noopener\">tc-bpf(8)\u00a0man \u9875\u9762<\/a>\uff0c\u662f\u00a0<strong>\u4f7f\u7528 BPF \u548c tc<\/strong>\u00a0\u7684\u4e00\u4e2a\u53c2\u8003\uff0c\u5e76\u4e14\u5305\u542b\u4e00\u4e9b\u793a\u4f8b\u547d\u4ee4\u548c\u53c2\u8003\u4ee3\u7801\u3002<\/li>\n<li>Jesper Dangaard Brouer \u53d1\u8d77\u4e86\u4e00\u4e2a\u00a0<strong>\u66f4\u65b0 eBPF Linux \u6587\u6863<\/strong>\u00a0\u7684\u5c1d\u8bd5\uff0c\u5305\u542b\u00a0<strong>\u4e0d\u540c\u7684\u6620\u5c04<\/strong>\u3002<a class=\"ext\" href=\"https:\/\/prototype-kernel.readthedocs.io\/en\/latest\/bpf\/index.html\" target=\"_blank\" rel=\"external nofollow noopener\">\u4ed6\u6709\u4e00\u4e2a\u8349\u6848<\/a>\uff0c\u6b22\u8fce\u53bb\u8d21\u732e\u3002\u4e00\u65e6\u5b8c\u6210\uff0c\u8fd9\u4e2a\u6587\u6863\u5c06\u88ab\u5408\u5e76\u8fdb man \u9875\u9762\u5e76\u4e14\u8fdb\u5165\u5230\u5185\u6838\u6587\u6863\u3002<\/li>\n<li>Cilium \u9879\u76ee\u4e5f\u6709\u4e00\u4e2a\u975e\u5e38\u597d\u7684\u00a0<a class=\"ext\" href=\"http:\/\/docs.cilium.io\/en\/latest\/bpf\/\" target=\"_blank\" rel=\"external nofollow noopener\">BPF \u548c XDP \u53c2\u8003\u6307\u5357<\/a>\uff0c\u5b83\u662f\u7531\u6838\u5fc3\u7684 eBPF \u5f00\u53d1\u8005\u5199\u7684\uff0c\u5b83\u88ab\u8bc1\u660e\u5bf9\u4e8e eBPF \u5f00\u53d1\u8005\u662f\u6781\u5176\u6709\u7528\u7684\u3002<\/li>\n<li>David Miller \u5728\u00a0<a class=\"ext\" href=\"http:\/\/vger.kernel.org\/vger-lists.html#xdp-newbies\" target=\"_blank\" rel=\"external nofollow noopener\">xdp-newbies<\/a>\u00a0\u90ae\u4ef6\u5217\u8868\u4e2d\u53d1\u4e86\u51e0\u5c01\u5173\u4e8e eBPF\/XDP \u5185\u90e8\u7ed3\u6784\u7684\u5bcc\u6709\u542f\u53d1\u6027\u7684\u7535\u5b50\u90ae\u4ef6\u3002\u6211\u627e\u4e0d\u5230\u4e00\u4e2a\u5355\u72ec\u7684\u5730\u65b9\u6536\u96c6\u5b83\u4eec\u7684\u94fe\u63a5\uff0c\u56e0\u6b64\uff0c\u8fd9\u91cc\u662f\u4e00\u4e2a\u5217\u8868\uff1a\n<ul>\n<li><a class=\"ext\" href=\"https:\/\/www.spinics.net\/lists\/xdp-newbies\/msg00179.html\" target=\"_blank\" rel=\"external nofollow noopener\">bpf.h \u548c\u4f60 \u2026<\/a><\/li>\n<li><a class=\"ext\" href=\"https:\/\/www.spinics.net\/lists\/xdp-newbies\/msg00181.html\" target=\"_blank\" rel=\"external nofollow noopener\">\u4ece\u8bed\u5883\u4e0a\u8bb2\u2026<\/a><\/li>\n<li><a class=\"ext\" href=\"https:\/\/www.spinics.net\/lists\/xdp-newbies\/msg00185.html\" target=\"_blank\" rel=\"external nofollow noopener\">BPF \u6821\u9a8c\u5668\u6982\u8ff0<\/a><\/li>\n<\/ul>\n<p>\u6700\u540e\u4e00\u4e2a\u53ef\u80fd\u662f\u76ee\u524d\u6765\u8bf4\u5173\u4e8e\u6821\u9a8c\u5668\u7684\u6700\u4f73\u7684\u603b\u7ed3\u3002<\/li>\n<li>Ferris Ellis \u53d1\u5e03\u7684\u00a0<a class=\"ext\" href=\"https:\/\/ferrisellis.com\/tags\/ebpf\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e00\u4e2a\u5173\u4e8e\u00a0eBPF \u7684\u7cfb\u5217\u535a\u5ba2\u6587\u7ae0<\/a>\u3002\u4f5c\u4e3a\u6211\u5199\u7684\u8fd9\u4e2a\u77ed\u6587\uff0c\u7b2c\u4e00\u7bc7\u6587\u7ae0\u662f\u5173\u4e8e eBPF \u7684\u5386\u53f2\u80cc\u666f\u548c\u672a\u6765\u671f\u671b\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u5c06\u66f4\u591a\u7684\u662f\u6280\u672f\u65b9\u9762\uff0c\u548c\u524d\u666f\u5c55\u671b\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/docs\/kernel-versions.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u6bcf\u4e2a\u5185\u6838\u7248\u672c\u7684 BPF \u7279\u6027\u5217\u8868<\/a>\u00a0\u5728 bcc \u4ed3\u5e93\u4e2d\u53ef\u4ee5\u627e\u5230\u3002\u5982\u679c\u4f60\u60f3\u53bb\u77e5\u9053\u8fd0\u884c\u4e00\u4e2a\u7ed9\u5b9a\u7684\u7279\u6027\u6240\u8981\u6c42\u7684\u6700\u5c0f\u7684\u5185\u6838\u7248\u672c\uff0c\u5b83\u662f\u975e\u5e38\u6709\u7528\u7684\u3002\u6211\u8d21\u732e\u548c\u6dfb\u52a0\u4e86\u94fe\u63a5\u5230\u63d0\u4ea4\u4e2d\uff0c\u5b83\u4ecb\u7ecd\u4e86\u6bcf\u4e2a\u7279\u6027\uff0c\u56e0\u6b64\uff0c\u4f60\u4e5f\u53ef\u4ee5\u4ece\u90a3\u91cc\u5f88\u5bb9\u6613\u5730\u53bb\u8bbf\u95ee\u63d0\u4ea4\u5386\u53f2\u3002<\/li>\n<\/ul>\n<h4 id=\"toc_10\">\u5173\u4e8e tc<\/h4>\n<p>\u5f53\u4e3a\u4e86\u7f51\u7edc\u76ee\u7684\u7ed3\u5408\u4f7f\u7528 BPF \u4e0e tc \uff08Linux\u00a0<ruby>\u6d41\u91cf\u63a7\u5236<rt><strong>t<\/strong>raffic\u00a0<strong>c<\/strong>ontrol<\/rt><rt><\/rt><\/ruby>\u5de5\u5177\uff09\u65f6\uff0c\u5b83\u53ef\u7528\u4e8e\u6536\u96c6 tc \u7684\u5e38\u89c4\u529f\u80fd\u7684\u4fe1\u606f\u3002\u8fd9\u91cc\u6709\u51e0\u4e2a\u5173\u4e8e\u5b83\u7684\u8d44\u6e90\u3002<\/p>\n<ul>\n<li>\u627e\u5230\u5173\u4e8e\u00a0<strong>Linux \u4e0a QoS<\/strong>\u00a0\u7684\u7b80\u5355\u6559\u7a0b\u662f\u5f88\u56f0\u96be\u7684\u3002\u8fd9\u91cc\u6709\u4e24\u4e2a\u94fe\u63a5\uff0c\u5b83\u4eec\u5f88\u957f\u800c\u4e14\u5f88\u96be\u61c2\uff0c\u4f46\u662f\uff0c\u5982\u679c\u4f60\u53ef\u4ee5\u62bd\u65f6\u95f4\u53bb\u9605\u8bfb\u5b83\uff0c\u4f60\u5c06\u5b66\u4e60\u5230\u51e0\u4e4e\u5173\u4e8e tc \u7684\u4efb\u4f55\u4e1c\u897f\uff08\u867d\u7136\uff0c\u6ca1\u6709\u4ec0\u4e48\u5173\u4e8e BPF \u7684)\u3002\u5b83\u4eec\u5728\u8fd9\u91cc\uff1a<a class=\"ext\" href=\"http:\/\/linux-ip.net\/articles\/Traffic-Control-HOWTO\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u600e\u4e48\u53bb\u5b9e\u73b0\u6d41\u91cf\u63a7\u5236 \u00a0\uff08Martin A. Brown, 2006\uff09<\/a>\uff0c\u548c\u00a0<a class=\"ext\" href=\"http:\/\/lartc.org\/lartc.html\" target=\"_blank\" rel=\"external nofollow noopener\">\u600e\u4e48\u53bb\u5b9e\u73b0 Linux \u7684\u9ad8\u7ea7\u8def\u7531 &amp; \u6d41\u91cf\u63a7\u5236\u00a0\uff08LARTC\uff09 \uff08Bert Hubert &amp; al., 2002\uff09<\/a>\u3002<\/li>\n<li>\u5728\u4f60\u7684\u7cfb\u7edf\u4e0a\u7684\u00a0<strong>tc \u624b\u518c\u9875\u9762<\/strong>\u00a0\u5e76\u4e0d\u662f\u6700\u65b0\u7684\uff0c\u56e0\u4e3a\u5b83\u4eec\u4e2d\u7684\u51e0\u4e2a\u6700\u8fd1\u5df2\u7ecf\u589e\u52a0\u4e86\u5185\u5bb9\u3002\u5982\u679c\u4f60\u6ca1\u6709\u627e\u5230\u5173\u4e8e\u7279\u5b9a\u7684\u961f\u5217\u89c4\u5219\u3001\u5206\u7c7b\u6216\u8005\u8fc7\u6ee4\u5668\u7684\u6587\u6863\uff0c\u5b83\u53ef\u80fd\u5728\u6700\u65b0\u7684\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/shemminger\/iproute2.git\/tree\/man\/man8\" target=\"_blank\" rel=\"external nofollow noopener\">tc \u7ec4\u4ef6\u7684\u624b\u518c\u9875\u9762<\/a>\u00a0\u4e2d\u3002<\/li>\n<li>\u4e00\u4e9b\u989d\u5916\u7684\u6750\u6599\u53ef\u4ee5\u5728 iproute2 \u5305\u81ea\u5df2\u7684\u6587\u4ef6\u4e2d\u627e\u5230\uff1a\u8fd9\u4e2a\u5305\u4e2d\u6709\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/shemminger\/iproute2.git\/tree\/doc?h=v4.13.0\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e00\u4e9b\u6587\u6863<\/a>\uff0c\u5305\u62ec\u4e00\u4e9b\u6587\u4ef6\uff0c\u5b83\u53ef\u4ee5\u5e2e\u4f60\u53bb\u7406\u89e3\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/shemminger\/iproute2.git\/tree\/doc\/actions?h=v4.13.0\" target=\"_blank\" rel=\"external nofollow noopener\">tc \u7684 action \u7684\u529f\u80fd<\/a>\u3002<strong>\u6ce8\u610f\uff1a<\/strong>\u00a0\u8fd9\u4e9b\u6587\u4ef6\u5728 2017 \u5e74 10 \u6708 \u5df2\u7ecf\u4ece iproute2 \u4e2d\u5220\u9664\uff0c\u7136\u800c\uff0c\u4ece Git \u5386\u53f2\u4e2d\u5374\u4e00\u76f4\u53ef\u7528\u3002<\/li>\n<li>\u4e0d\u5b8c\u5168\u662f\u6587\u6863\uff1a<a class=\"ext\" href=\"http:\/\/netdevconf.org\/1.2\/session.html?jamal-tc-workshop\" target=\"_blank\" rel=\"external nofollow noopener\">\u6709\u4e00\u4e2a\u5173\u4e8e tc \u7684\u51e0\u4e2a\u7279\u6027\u7684\u7814\u8ba8\u4f1a<\/a>\uff08\u5305\u542b\u8fc7\u6ee4\u3001BPF\u3001tc \u5378\u8f7d\u3001\u2026\uff09 \u7531 Jamal Hadi Salim \u5728 netdev 1.2 \u4f1a\u8bae\u4e0a\u7ec4\u7ec7\u7684\uff08October 2016\uff09\u3002<\/li>\n<li>\u989d\u5916\u4fe1\u606f \u2014 \u5982\u679c\u4f60\u4f7f\u7528\u00a0<code>tc<\/code>\u00a0\u8f83\u591a\uff0c\u8fd9\u91cc\u6709\u4e00\u4e9b\u597d\u6d88\u606f\uff1a\u6211\u7528\u8fd9\u4e2a\u5de5\u5177\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/shemminger\/iproute2.git\/commit\/bash-completion\/tc?id=27d44f3a8a4708bcc99995a4d9b6fe6f81e3e15b\" target=\"_blank\" rel=\"external nofollow noopener\">\u5199\u4e86\u4e00\u4e2a bash \u8865\u5b8c\u529f\u80fd<\/a>\uff0c\u5e76\u4e14\u5b83\u88ab\u5305 iproute2 \u5e26\u5230\u5185\u6838\u7248\u672c 4.6 \u548c\u66f4\u9ad8\u7248\u4e2d\uff01<\/li>\n<\/ul>\n<h4 id=\"toc_11\">\u5173\u4e8e XDP<\/h4>\n<ul>\n<li>\u5bf9\u4e8e XDP \u7684\u4e00\u4e9b\u00a0<a class=\"ext\" href=\"https:\/\/prototype-kernel.readthedocs.io\/en\/latest\/networking\/XDP\/index.html\" target=\"_blank\" rel=\"external nofollow noopener\">\u8fdb\u5c55\u4e2d\u7684\u6587\u6863\uff08\u5305\u62ec\u89c4\u8303\uff09<\/a>\u00a0\u5df2\u7ecf\u7531 Jesper Dangaard Brouer \u542f\u52a8\uff0c\u5e76\u4e14\u610f\u5473\u7740\u5c06\u6210\u4e3a\u4e00\u4e2a\u534f\u4f5c\u5de5\u4f5c\u3002\u6b63\u5728\u63a8\u8fdb\u7684\uff082016 \u5e74 9 \u6708\uff09\uff1a\u4f60\u671f\u671b\u5b83\u53bb\u6539\u53d8\uff0c\u5e76\u4e14\u6216\u8bb8\u5728\u4e00\u4e9b\u8282\u70b9\u4e0a\u79fb\u52a8\uff08Jesper\u00a0<a class=\"ext\" href=\"https:\/\/marc.info\/?l=linux-netdev&amp;amp;amp;amp;m=147436253625672\" target=\"_blank\" rel=\"external nofollow noopener\">\u79f0\u4e3a\u8d21\u732e<\/a>\uff0c\u5982\u679c\u4f60\u60f3\u53bb\u6539\u5584\u5b83\uff09\u3002<\/li>\n<li>\u81ea\u6765 Cilium \u9879\u76ee\u7684\u00a0<a class=\"ext\" href=\"http:\/\/docs.cilium.io\/en\/latest\/bpf\/\" target=\"_blank\" rel=\"external nofollow noopener\">BPF \u548c XDP \u53c2\u8003\u6307\u5357<\/a>\u00a0\u2026 \u597d\u5427\uff0c\u8fd9\u4e2a\u540d\u5b57\u5df2\u7ecf\u8bf4\u660e\u4e86\u4e00\u5207\u3002<\/li>\n<\/ul>\n<h4 id=\"toc_12\">\u5173\u4e8e P4 \u548c BPF<\/h4>\n<p><a class=\"ext\" href=\"http:\/\/p4.org\/\" target=\"_blank\" rel=\"external nofollow noopener\">P4<\/a>\u00a0\u662f\u4e00\u4e2a\u7528\u4e8e\u6307\u5b9a\u4ea4\u6362\u673a\u884c\u4e3a\u7684\u8bed\u8a00\u3002\u5b83\u53ef\u4ee5\u4e3a\u591a\u79cd\u76ee\u6807\u786c\u4ef6\u6216\u8f6f\u4ef6\u7f16\u8bd1\u3002\u56e0\u6b64\uff0c\u4f60\u53ef\u80fd\u731c\u5230\u4e86\uff0c\u8fd9\u4e9b\u76ee\u6807\u4e2d\u7684\u4e00\u4e2a\u5c31\u662f BPF \u2026 \u4ec5\u90e8\u5206\u652f\u6301\u7684\uff1a\u4e00\u4e9b P4 \u7279\u6027\u5e76\u4e0d\u80fd\u88ab\u8f6c\u5316\u5230 BPF \u4e2d\uff0c\u5e76\u4e14\uff0c\u7528\u7c7b\u4f3c\u7684\u65b9\u6cd5\uff0cBPF \u53ef\u4ee5\u505a\u7684\u4e8b\u60c5\uff0c\u800c\u4f7f\u7528 P4 \u5374\u4e0d\u80fd\u8868\u8fbe\u51fa\u73b0\u3002\u4e0d\u8fc7\uff0c<strong>P4 \u4e0e BPF \u4f7f\u7528<\/strong>\u00a0\u7684\u76f8\u5173\u6587\u6863\uff0c<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/tree\/master\/src\/cc\/frontends\/p4\" target=\"_blank\" rel=\"external nofollow noopener\">\u88ab\u9690\u85cf\u5728 bcc \u4ed3\u5e93\u4e2d<\/a>\u3002\u8fd9\u4e2a\u6539\u53d8\u5728 P4_16 \u7248\u672c\u4e2d\uff0cp4c \u5f15\u7528\u7684\u7f16\u8f91\u5668\u5305\u542b\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/p4lang\/p4c\/blob\/master\/backends\/ebpf\/README.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e00\u4e2a eBPF \u540e\u7aef<\/a>\u3002<\/p>\n<h3 id=\"toc_13\">\u6559\u7a0b<\/h3>\n<p>Brendan Gregg \u4e3a\u60f3\u8981\u00a0<strong>\u4f7f\u7528 bcc \u5de5\u5177<\/strong>\u00a0\u8ddf\u8e2a\u548c\u76d1\u89c6\u5185\u6838\u4e2d\u7684\u4e8b\u4ef6\u7684\u4eba\u5236\u4f5c\u4e86\u4e00\u4e2a\u975e\u5e38\u597d\u7684\u00a0<strong>\u6559\u7a0b<\/strong>\u3002<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/docs\/reference_guide.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u7b2c\u4e00\u4e2a\u6559\u7a0b\u662f\u5173\u4e8e\u5982\u4f55\u4f7f\u7528 bcc \u5de5\u5177<\/a>\uff0c\u5b83\u6709\u8bb8\u591a\u7ae0\u8282\uff0c\u53ef\u4ee5\u6559\u4f60\u53bb\u7406\u89e3\u600e\u4e48\u53bb\u4f7f\u7528\u5df2\u6709\u7684\u5de5\u5177\uff0c\u800c\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/docs\/tutorial_bcc_python_developer.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u9488\u5bf9 Python \u5f00\u53d1\u8005\u7684\u4e00\u7bc7<\/a>\u00a0\u4e13\u6ce8\u4e8e\u5f00\u53d1\u65b0\u5de5\u5177\uff0c\u5b83\u603b\u5171\u6709\u5341\u4e03\u8282 \u201c\u8bfe\u7a0b\u201d\u3002<\/p>\n<p>Sasha Goldshtein \u4e5f\u6709\u4e00\u4e9b\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/goldshtn\/linux-tracing-workshop\" target=\"_blank\" rel=\"external nofollow noopener\">Linux \u8ddf\u8e2a\u7814\u7a76\u6750\u6599<\/a>\u00a0\u6d89\u53ca\u5230\u4f7f\u7528\u51e0\u4e2a BPF \u5de5\u5177\u8fdb\u884c\u8ddf\u8e2a\u3002<\/p>\n<p>Jean-Tiare Le Bigot \u7684\u53e6\u4e00\u7bc7\u6587\u7ae0\u63d0\u4f9b\u4e86\u4e00\u4e2a\u8be6\u7ec6\u7684\uff08\u548c\u6709\u6307\u5bfc\u610f\u4e49\u7684\uff09<a class=\"ext\" href=\"https:\/\/blog.yadutaf.fr\/2017\/07\/28\/tracing-a-packet-journey-using-linux-tracepoints-perf-ebpf\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u4f7f\u7528 perf \u548c eBPF \u53bb\u8bbe\u7f6e\u4e00\u4e2a\u4f4e\u7ea7\u7684\u8ddf\u8e2a\u5668<\/a>\u00a0\u7684\u793a\u4f8b\u3002<\/p>\n<p>\u5bf9\u4e8e\u7f51\u7edc\u76f8\u5173\u7684 eBPF \u4f7f\u7528\u6848\u4f8b\u4e5f\u6709\u51e0\u4e2a\u6559\u7a0b\u3002\u6709\u4e00\u4e9b\u503c\u5f97\u5173\u6ce8\u7684\u6587\u6863\uff0c\u5305\u62ec\u4e00\u7bc7\u00a0<em>eBPF \u5378\u8f7d\u5165\u95e8\u6307\u5357<\/em>\uff0c\u662f\u5173\u4e8e\u5728\u00a0<a class=\"ext\" href=\"https:\/\/open-nfp.org\/dataplanes-ebpf\/technical-papers\/\" target=\"_blank\" rel=\"external nofollow noopener\">Open NFP<\/a>\u00a0\u5e73\u53f0\u4e0a\u7528 Netronome \u64cd\u4f5c\u7684\u3002\u5176\u5b83\u7684\u90a3\u4e9b\uff0c\u6765\u81ea Jesper \u7684\u6f14\u8bb2\uff0c<a class=\"ext\" href=\"http:\/\/netdevconf.org\/2.1\/session.html?gospodarek\" target=\"_blank\" rel=\"external nofollow noopener\">XDP \u80fd\u4e3a\u5176\u5b83\u4eba\u505a\u4ec0\u4e48<\/a>\uff08\u53ca\u5176<a class=\"ext\" href=\"https:\/\/www.netdevconf.org\/2.2\/session.html?gospodarek-xdp-workshop\" target=\"_blank\" rel=\"external nofollow noopener\">\u7b2c\u4e8c\u7248<\/a>\uff09\uff0c\u53ef\u80fd\u662f XDP \u5165\u95e8\u7684\u6700\u597d\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002<\/p>\n<h3 id=\"toc_14\">\u793a\u4f8b<\/h3>\n<p>\u6709\u793a\u4f8b\u662f\u975e\u5e38\u597d\u7684\u3002\u770b\u770b\u5b83\u4eec\u662f\u5982\u4f55\u5de5\u4f5c\u7684\u3002\u4f46\u662f BPF \u7a0b\u5e8f\u793a\u4f8b\u662f\u5206\u6563\u5728\u51e0\u4e2a\u9879\u76ee\u4e2d\u7684\uff0c\u56e0\u6b64\uff0c\u6211\u5217\u51fa\u4e86\u6211\u6240\u77e5\u9053\u7684\u6240\u6709\u7684\u793a\u4f8b\u3002\u793a\u4f8b\u5e76\u4e0d\u662f\u603b\u662f\u4f7f\u7528\u76f8\u540c\u7684 helper\uff08\u4f8b\u5982\uff0ctc \u548c bcc \u90fd\u6709\u4e00\u5957\u5b83\u4eec\u81ea\u5df1\u7684 helper\uff0c\u4f7f\u5b83\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u53bb\u7528 C \u8bed\u8a00\u5199 BPF \u7a0b\u5e8f\uff09<\/p>\n<h4 id=\"toc_15\">\u6765\u81ea\u5185\u6838\u7684\u793a\u4f8b<\/h4>\n<p>\u5185\u6838\u4e2d\u5305\u542b\u4e86\u5927\u591a\u6570\u7c7b\u578b\u7684\u7a0b\u5e8f\uff1a\u8fc7\u6ee4\u5668\u7ed1\u5b9a\u5230\u5957\u63a5\u5b57\u6216\u8005 tc \u63a5\u53e3\u3001\u4e8b\u4ef6\u8ddf\u8e2a\/\u76d1\u89c6\u3001\u751a\u81f3\u662f XDP\u3002\u4f60\u53ef\u4ee5\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/samples\/bpf\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/samples\/bpf\/<\/a>\u00a0\u76ee\u5f55\u4e2d\u627e\u5230\u8fd9\u4e9b\u793a\u4f8b\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u66f4\u591a\u7684\u793a\u4f8b\u5df2\u7ecf\u4f5c\u4e3a\u5355\u5143\u6d4b\u8bd5\u88ab\u6dfb\u52a0\u5230\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/davem\/net-next.git\/tree\/tools\/testing\/selftests\/bpf\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/tools\/testing\/selftests\/bpf<\/a>\u00a0\u76ee\u5f55\u4e0b\uff0c\u8fd9\u91cc\u9762\u5305\u542b\u5bf9\u786c\u4ef6\u5378\u8f7d\u7684\u6d4b\u8bd5\u6216\u8005\u5bf9\u4e8e libbpf \u7684\u6d4b\u8bd5\u3002<\/p>\n<p>Jesper \u7684 Dangaard Brouer \u5728\u4ed6\u7684\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/netoptimizer\/prototype-kernel\/tree\/master\/kernel\/samples\/bpf\" target=\"_blank\" rel=\"external nofollow noopener\">prototype-kernel<\/a>\u00a0\u4ed3\u5e93\u4e2d\u4e5f\u7ef4\u62a4\u4e86\u4e00\u5957\u4e13\u95e8\u7684\u793a\u4f8b\u3002 \u8fd9\u4e9b\u793a\u4f8b\u4e0e\u90a3\u4e9b\u5185\u6838\u4e2d\u63d0\u4f9b\u7684\u793a\u4f8b\u975e\u5e38\u7c7b\u4f3c\uff0c\u4f46\u662f\u5b83\u4eec\u53ef\u4ee5\u8131\u79bb\u5185\u6838\u67b6\u6784\uff08Makefile \u548c\u5934\u6587\u4ef6\uff09\u7f16\u8bd1\u3002<\/p>\n<p>\u4e5f\u4e0d\u8981\u5fd8\u8bb0\u53bb\u770b\u4e00\u4e0b git \u76f8\u5173\u7684\u63d0\u4ea4\u5386\u53f2\uff0c\u5b83\u4eec\u4ecb\u7ecd\u4e86\u4e00\u4e9b\u7279\u5b9a\u7684\u7279\u6027\uff0c\u4e5f\u8bb8\u5305\u542b\u4e86\u4e00\u4e9b\u7279\u6027\u7684\u8be6\u7ec6\u793a\u4f8b\u3002<\/p>\n<h4 id=\"toc_16\">\u6765\u81ea\u5305 iproute2 \u7684\u793a\u4f8b<\/h4>\n<p>iproute2 \u5305\u4e5f\u63d0\u4f9b\u4e86\u51e0\u4e2a\u793a\u4f8b\u3002\u5b83\u4eec\u90fd\u5f88\u660e\u663e\u5730\u504f\u5411\u7f51\u7edc\u7f16\u7a0b\uff0c\u56e0\u6b64\uff0c\u8fd9\u4e2a\u7a0b\u5e8f\u662f\u9644\u7740\u5230 tc \u5165\u7ad9\u6216\u8005\u51fa\u7ad9\u63a5\u53e3\u4e0a\u3002\u8fd9\u4e9b\u793a\u4f8b\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/shemminger\/iproute2.git\/tree\/examples\/bpf\" target=\"_blank\" rel=\"external nofollow noopener\">iproute2\/examples\/bpf\/<\/a>\u00a0\u76ee\u5f55\u4e2d\u3002<\/p>\n<h4 id=\"toc_17\">\u6765\u81ea bcc \u5de5\u5177\u96c6\u7684\u793a\u4f8b<\/h4>\n<p>\u8bb8\u591a\u793a\u4f8b\u90fd\u662f\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/tree\/master\/examples\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e0e bcc \u4e00\u8d77\u63d0\u4f9b\u7684<\/a>\uff1a<\/p>\n<ul>\n<li>\u4e00\u4e9b\u7f51\u7edc\u7684\u793a\u4f8b\u653e\u5728\u76f8\u5173\u7684\u76ee\u5f55\u4e0b\u9762\u3002\u5b83\u4eec\u5305\u62ec\u5957\u63a5\u5b57\u8fc7\u6ee4\u5668\u3001tc \u8fc7\u6ee4\u5668\u3001\u548c\u4e00\u4e2a XDP \u7a0b\u5e8f\u3002<\/li>\n<li><code>tracing<\/code>\u00a0\u76ee\u5f55\u5305\u542b\u8bb8\u591a\u00a0<strong>\u8ddf\u8e2a\u7f16\u7a0b<\/strong>\u00a0\u7684\u793a\u4f8b\u3002\u524d\u9762\u7684\u6559\u7a0b\u4e2d\u63d0\u5230\u7684\u90fd\u5728\u90a3\u91cc\u3002\u90a3\u4e9b\u7a0b\u5e8f\u6d89\u53ca\u4e86\u5f88\u5927\u90e8\u5206\u7684\u4e8b\u4ef6\u76d1\u89c6\u529f\u80fd\uff0c\u5e76\u4e14\uff0c\u5b83\u4eec\u4e2d\u7684\u4e00\u4e9b\u662f\u9762\u5411\u751f\u4ea7\u7cfb\u7edf\u7684\u3002\u6ce8\u610f\uff0c\u67d0\u4e9b Linux \u53d1\u884c\u7248\uff08\u81f3\u5c11\u662f Debian\u3001Ubuntu\u3001Fedora\u3001Arch Linux\uff09\u3001\u8fd9\u4e9b\u7a0b\u5e8f\u5df2\u7ecf\u88ab\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/INSTALL.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u6253\u5305\u4e86<\/a>\u00a0\u5e76\u4e14\u53ef\u4ee5\u5f88 \u201c\u5bb9\u6613\u5730\u201d \u901a\u8fc7\u6bd4\u5982\u00a0<code># apt install bcc-tools<\/code>\u00a0\u8fdb\u884c\u5b89\u88c5\u3002\u4f46\u662f\u5728\u5199\u8fd9\u7bc7\u6587\u7ae0\u7684\u65f6\u5019\uff08\u9664\u4e86 Arch Linux\uff09\uff0c\u9996\u5148\u8981\u6c42\u5b89\u88c5 IO Visor \u7684\u5305\u4ed3\u5e93\u3002<\/li>\n<li>\u4e5f\u6709\u4e00\u4e9b\u00a0<strong>\u4f7f\u7528 Lua<\/strong>\u00a0\u4f5c\u4e3a\u4e00\u4e2a\u4e0d\u540c\u7684 BPF \u540e\u7aef\uff08\u90a3\u662f\u56e0\u4e3a BPF \u7a0b\u5e8f\u662f\u7528 Lua \u5199\u7684\uff0c\u5b83\u662f C \u8bed\u8a00\u7684\u4e00\u4e2a\u5b50\u96c6\uff0c\u5b83\u5141\u8bb8\u4e3a\u524d\u7aef\u548c\u540e\u7aef\u4f7f\u7528\u76f8\u540c\u7684\u8bed\u8a00\uff09\u7684\u4e00\u4e9b\u793a\u4f8b\uff0c\u5b83\u5728\u7b2c\u4e09\u4e2a\u76ee\u5f55\u4e2d\u3002<\/li>\n<li>\u5f53\u7136\uff0c<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/tree\/master\/tools\" target=\"_blank\" rel=\"external nofollow noopener\">bcc \u5de5\u5177<\/a>\u00a0\u81ea\u8eab\u5c31\u662f eBPF \u7a0b\u5e8f\u4f7f\u7528\u6848\u4f8b\u7684\u503c\u5f97\u5173\u6ce8\u793a\u4f8b\u3002<\/li>\n<\/ul>\n<h4 id=\"toc_18\">\u624b\u518c\u9875\u9762<\/h4>\n<p>\u867d\u7136 bcc \u4e00\u822c\u5f88\u5bb9\u6613\u5728\u5185\u6838\u4e2d\u53bb\u6ce8\u5165\u548c\u8fd0\u884c\u4e00\u4e2a BPF \u7a0b\u5e8f\uff0c\u5c06\u7a0b\u5e8f\u9644\u7740\u5230 tc \u63a5\u53e3\u4e5f\u80fd\u901a\u8fc7\u00a0<code>tc<\/code>\u00a0\u5de5\u5177\u81ea\u5df1\u5b8c\u6210\u3002\u56e0\u6b64\uff0c\u5982\u679c\u4f60\u6253\u7b97\u5c06\u00a0<strong>BPF \u4e0e tc \u4e00\u8d77\u4f7f\u7528<\/strong>\uff0c\u4f60\u53ef\u4ee5\u5728\u00a0<a class=\"ext\" href=\"http:\/\/man7.org\/linux\/man-pages\/man8\/tc-bpf.8.html\" target=\"_blank\" rel=\"external nofollow noopener\"><code>tc-bpf(8)<\/code>\u00a0\u624b\u518c\u9875\u9762<\/a>\u00a0\u4e2d\u627e\u5230\u4e00\u4e9b\u8c03\u7528\u793a\u4f8b\u3002<\/p>\n<h3 id=\"toc_19\">\u4ee3\u7801<\/h3>\n<p>\u6709\u65f6\u5019\uff0cBPF \u6587\u6863\u6216\u8005\u793a\u4f8b\u5e76\u4e0d\u591f\uff0c\u800c\u4e14\u4f60\u53ea\u60f3\u5728\u4f60\u559c\u6b22\u7684\u6587\u672c\u7f16\u8f91\u5668\uff08\u5b83\u5f53\u7136\u5e94\u8be5\u662f Vim\uff09\u4e2d\u53bb\u663e\u793a\u4ee3\u7801\u5e76\u53bb\u9605\u8bfb\u5b83\u3002\u6216\u8005\uff0c\u4f60\u53ef\u80fd\u60f3\u6df1\u5165\u5230\u4ee3\u7801\u4e2d\u53bb\u505a\u4e00\u4e2a\u8865\u4e01\u7a0b\u5e8f\u6216\u8005\u4e3a\u673a\u5668\u589e\u52a0\u4e00\u4e9b\u65b0\u7279\u6027\u3002\u56e0\u6b64\uff0c\u8fd9\u91cc\u5bf9\u6709\u5173\u7684\u6587\u4ef6\u7684\u51e0\u4e2a\u5efa\u8bae\uff0c\u627e\u5230\u4f60\u60f3\u8981\u7684\u51fd\u6570\u53ea\u53d6\u51b3\u4e8e\u4f60\u81ea\u5df1\uff01<\/p>\n<h4 id=\"toc_20\">\u5728\u5185\u6838\u4e2d\u7684 BPF \u4ee3\u7801<\/h4>\n<ul>\n<li>\u6587\u4ef6\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/include\/linux\/bpf.h\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/include\/linux\/bpf.h<\/a>\u00a0\u53ca\u5176\u76f8\u5bf9\u7684\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/include\/uapi\/linux\/bpf.h\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/include\/uapi\/bpf.h<\/a>\u00a0\u5305\u542b\u6709\u5173 eBPF \u7684\u00a0<strong>\u5b9a\u4e49<\/strong>\uff0c\u5b83\u4eec\u5206\u522b\u7528\u5728\u5185\u6838\u4e2d\u548c\u7528\u6237\u7a7a\u95f4\u7a0b\u5e8f\u7684\u63a5\u53e3\u3002<\/li>\n<li>\u76f8\u540c\u7684\u65b9\u5f0f\uff0c\u6587\u4ef6\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/include\/linux\/filter.h\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/include\/linux\/filter.h<\/a>\u00a0\u548c\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/include\/uapi\/linux\/filter.h\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/include\/uapi\/filter.h<\/a>\u00a0\u5305\u542b\u4e86\u7528\u4e8e\u00a0<strong>\u8fd0\u884c BPF \u7a0b\u5e8f<\/strong>\u00a0\u7684\u4fe1\u606f\u3002<\/li>\n<li>BPF \u76f8\u5173\u7684\u00a0<strong>\u4e3b\u8981\u7684\u4ee3\u7801\u7247\u65ad<\/strong>\u00a0\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/kernel\/bpf\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/kernel\/bpf\/<\/a>\u00a0\u76ee\u5f55\u4e0b\u9762\u3002<strong>\u7cfb\u7edf\u8c03\u7528\u7684\u4e0d\u540c\u64cd\u4f5c\u8bb8\u53ef<\/strong>\uff0c\u6bd4\u5982\uff0c\u7a0b\u5e8f\u52a0\u8f7d\u6216\u8005\u6620\u5c04\u7ba1\u7406\u662f\u5728\u6587\u4ef6\u00a0<code>syscall.c<\/code>\u00a0\u4e2d\u5b9e\u73b0\uff0c\u800c\u00a0<code>core.c<\/code>\u00a0\u5305\u542b\u4e86\u00a0<strong>\u89e3\u6790\u5668<\/strong>\u3002\u5176\u5b83\u6587\u4ef6\u7684\u547d\u540d\u663e\u800c\u6613\u89c1\uff1a<code>verifier.c<\/code>\u00a0\u5305\u542b\u00a0<strong>\u6821\u9a8c\u5668<\/strong>\uff08\u4e0d\u662f\u5f00\u73a9\u7b11\u7684\uff09\uff0c<code>arraymap.c<\/code>\u00a0\u7684\u4ee3\u7801\u7528\u4e8e\u4e0e\u6570\u7ec4\u7c7b\u578b\u7684\u00a0<strong>\u6620\u5c04<\/strong>\u00a0\u4ea4\u4e92\uff0c\u7b49\u7b49\u3002<\/li>\n<li>\u6709\u51e0\u4e2a\u4e0e\u7f51\u7edc\uff08\u53ca tc\u3001XDP \uff09\u76f8\u5173\u7684\u51fd\u6570\u548c\u00a0<strong>helpers<\/strong>\u00a0\u662f\u7528\u6237\u53ef\u7528\uff0c\u5176\u5b9e\u73b0\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/net\/core\/filter.c\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/net\/core\/filter.c<\/a>\u00a0\u4e2d\u3002\u5b83\u4e5f\u5305\u542b\u4e86\u79fb\u690d cBPF \u5b57\u8282\u7801\u5230 eBPF \u7684\u4ee3\u7801\uff08\u56e0\u4e3a\u5728\u8fd0\u884c\u4e4b\u524d\uff0c\u5185\u6838\u4e2d\u7684\u6240\u6709\u7684 cBPF \u7a0b\u5e8f\u88ab\u8f6c\u6362\u6210 eBPF\uff09\u3002<\/li>\n<li>\u76f8\u5173\u4e8e\u00a0<strong>\u4e8b\u4ef6\u8ddf\u8e2a<\/strong>\u00a0\u7684\u51fd\u6570\u548c\u00a0<strong>helpers<\/strong>\u00a0\u90fd\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/kernel\/trace\/bpf_trace.c\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/kernel\/trace\/bpf_trace.c<\/a>\u00a0\u4e2d\u3002<\/li>\n<li><strong>JIT \u7f16\u8bd1\u5668<\/strong>\u00a0\u5728\u5b83\u4eec\u5404\u81ea\u7684\u67b6\u6784\u76ee\u5f55\u4e0b\u9762\uff0c\u6bd4\u5982\uff0cx86 \u67b6\u6784\u7684\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/arch\/x86\/net\/bpf_jit_comp.c\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/arch\/x86\/net\/bpf<em>jit<\/em>comp.c<\/a>\u00a0\u4e2d\u3002\u4f8b\u5916\u662f\u7528\u4e8e\u786c\u4ef6\u5378\u8f7d\u7684 JIT \u7f16\u8bd1\u5668\uff0c\u5b83\u4eec\u653e\u5728\u5b83\u4eec\u7684\u9a71\u52a8\u7a0b\u5e8f\u4e0b\uff0c\u4f8b\u5982 Netronome NFP \u7f51\u5361\u7684\u5c31\u653e\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/drivers\/net\/ethernet\/netronome\/nfp\/bpf\/jit.c\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/drivers\/net\/ethernet\/netronome\/nfp\/bpf\/jit.c<\/a>\u00a0\u3002<\/li>\n<li>\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/net\/sched\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/net\/sched\/<\/a>\u00a0\u76ee\u5f55\u4e0b\uff0c\u4f60\u53ef\u4ee5\u627e\u5230\u00a0<strong>tc \u7684 BPF \u7ec4\u4ef6<\/strong>\u00a0\u76f8\u5173\u7684\u4ee3\u7801\uff0c\u5c24\u5176\u662f\u5728\u6587\u4ef6\u00a0<code>act_bpf.c<\/code>\u00a0\uff08action\uff09\u548c\u00a0<code>cls_bpf.c<\/code>\uff08filter\uff09\u4e2d\u3002<\/li>\n<li>\u6211\u5e76\u6ca1\u6709\u5728 BPF \u4e0a\u6df1\u5165\u5230\u00a0<strong>\u4e8b\u4ef6\u8ddf\u8e2a<\/strong>\u00a0\u4e2d\uff0c\u56e0\u6b64\uff0c\u6211\u5e76\u4e0d\u771f\u6b63\u4e86\u89e3\u8fd9\u4e9b\u7a0b\u5e8f\u7684\u94a9\u5b50\u3002\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/kernel\/trace\/bpf_trace.c\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/kernel\/trace\/bpf_trace.c<\/a>\u00a0\u90a3\u91cc\u6709\u4e00\u4e9b\u4e1c\u897f\u3002\u5982\u679c\u4f60\u5bf9\u5b83\u611f \u5174\u8da3\uff0c\u5e76\u4e14\u60f3\u53bb\u4e86\u89e3\u66f4\u591a\uff0c\u4f60\u53ef\u4ee5\u5728 Brendan Gregg \u7684\u6f14\u793a\u6216\u8005\u535a\u5ba2\u6587\u7ae0\u4e0a\u53bb\u6df1\u5165\u6316\u6398\u3002<\/li>\n<li>\u6211\u4e5f\u6ca1\u6709\u4f7f\u7528\u8fc7\u00a0<strong>seccomp-BPF<\/strong>\uff0c\u4e0d\u8fc7\u4f60\u80fd\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/kernel\/seccomp.c\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/kernel\/seccomp.c<\/a>\u00a0\u627e\u5230\u5b83\u7684\u4ee3\u7801\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/tools\/testing\/selftests\/seccomp\/seccomp_bpf.c\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/tools\/testing\/selftests\/seccomp\/seccomp_bpf.c<\/a>\u00a0\u4e2d\u627e\u5230\u4e00\u4e9b\u5b83\u7684\u4f7f\u7528\u793a\u4f8b\u3002<\/li>\n<\/ul>\n<h4 id=\"toc_21\">XDP \u94a9\u5b50\u4ee3\u7801<\/h4>\n<p>\u4e00\u65e6\u88c5\u8f7d\u8fdb\u5185\u6838\u7684 BPF \u865a\u62df\u673a\uff0c\u7531\u4e00\u4e2a Netlink \u547d\u4ee4\u5c06\u00a0<strong>XDP<\/strong>\u00a0\u7a0b\u5e8f\u4ece\u7528\u6237\u7a7a\u95f4\u94a9\u5165\u5230\u5185\u6838\u7f51\u7edc\u8def\u5f84\u4e2d\u3002\u63a5\u6536\u5b83\u7684\u662f\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/net\/core\/dev.c\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/net\/core\/dev.c<\/a>\u00a0\u6587\u4ef6\u4e2d\u7684\u00a0<code>dev_change_xdp_fd()<\/code>\u00a0\u51fd\u6570\uff0c\u5b83\u88ab\u8c03\u7528\u5e76\u8bbe\u7f6e\u4e00\u4e2a XDP \u94a9\u5b50\u3002\u94a9\u5b50\u88ab\u653e\u5728\u652f\u6301\u7684\u7f51\u5361\u7684\u9a71\u52a8\u7a0b\u5e8f\u4e2d\u3002\u4f8b\u5982\uff0c\u7528\u4e8e Netronome \u786c\u4ef6\u94a9\u5b50\u7684 ntp \u9a71\u52a8\u7a0b\u5e8f\u5b9e\u73b0\u653e\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/drivers\/net\/ethernet\/netronome\/nfp\/\" target=\"_blank\" rel=\"external nofollow noopener\">drivers\/net\/ethernet\/netronome\/nfp\/<\/a>\u00a0\u4e2d\u3002\u6587\u4ef6\u00a0<code>nfp_net_common.c<\/code>\u00a0\u63a5\u53d7 Netlink \u547d\u4ee4\uff0c\u5e76\u8c03\u7528\u00a0<code>nfp_net_xdp_setup()<\/code>\uff0c\u5b83\u4f1a\u8f6c\u800c\u8c03\u7528\u00a0<code>nfp_net_xdp_setup_drv()<\/code>\u00a0\u5b9e\u4f8b\u6765\u5b89\u88c5\u8be5\u7a0b\u5e8f\u3002<\/p>\n<h4 id=\"toc_22\">\u5728 bcc \u4e2d\u7684 BPF \u903b\u8f91<\/h4>\n<p><a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728 bcc \u7684 GitHub \u4ed3\u5e93<\/a>\u00a0\u80fd\u627e\u5230\u7684\u00a0<strong>bcc<\/strong>\u00a0\u5de5\u5177\u96c6\u7684\u4ee3\u7801\u3002\u5176\u00a0<strong>Python \u4ee3\u7801<\/strong>\uff0c\u5305\u542b\u5728\u00a0<code>BPF<\/code>\u00a0\u7c7b\u4e2d\uff0c\u6700\u521d\u5b83\u5728\u6587\u4ef6\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/src\/python\/bcc\/__init__.py\" target=\"_blank\" rel=\"external nofollow noopener\">bcc\/src\/python\/bcc\/__init__.py<\/a>\u00a0\u4e2d\u3002\u4f46\u662f\u8bb8\u591a\u6211\u89c9\u5f97\u6709\u610f\u601d\u7684\u4e1c\u897f\uff0c\u6bd4\u5982\uff0c\u52a0\u8f7d BPF \u7a0b\u5e8f\u5230\u5185\u6838\u4e2d\uff0c\u51fa\u73b0\u5728\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/src\/cc\/libbpf.c\" target=\"_blank\" rel=\"external nofollow noopener\">libbcc\u00a0\u7684 C \u5e93<\/a>\u4e2d\u3002<\/p>\n<h4 id=\"toc_23\">\u4f7f\u7528 tc \u53bb\u7ba1\u7406 BPF \u7684\u4ee3\u7801<\/h4>\n<p>\u5f53\u7136\uff0c\u8fd9\u4e9b\u4ee3\u7801\u4e0e iproute2 \u5305\u4e2d\u7684\u00a0<strong>tc \u4e2d\u7684<\/strong>\u00a0BPF\u00a0\u76f8\u5173\u3002\u5176\u4e2d\u7684\u4e00\u4e9b\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/shemminger\/iproute2.git\/tree\/tc\" target=\"_blank\" rel=\"external nofollow noopener\">iproute2\/tc\/<\/a>\u00a0\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u00a0<code>f_bpf.c<\/code>\u00a0\u548c\u00a0<code>m_bpf.c<\/code>\uff08\u548c\u00a0<code>e_bpf.c<\/code>\uff09\u5404\u81ea\u7528\u4e8e\u5904\u7406 BPF \u7684\u8fc7\u6ee4\u5668\u548c\u52a8\u4f5c\u7684\uff08\u548c tc\u00a0<code>exec<\/code>\u00a0\u547d\u4ee4\uff0c\u7b49\u7b49\uff09\u3002\u6587\u4ef6\u00a0<code>q_clsact.c<\/code>\u00a0\u5b9a\u4e49\u4e86\u4e3a BPF \u7279\u522b\u521b\u5efa\u7684\u00a0<code>clsact<\/code>\u00a0qdisc\u3002\u4f46\u662f\uff0c<strong>\u5927\u591a\u6570\u7684 BPF \u7528\u6237\u7a7a\u95f4\u903b\u8f91<\/strong>\u00a0\u662f\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/shemminger\/iproute2.git\/tree\/lib\/bpf.c\" target=\"_blank\" rel=\"external nofollow noopener\">iproute2\/lib\/bpf.c<\/a>\u00a0\u5e93\u4e2d\u5b9e\u73b0\u7684\uff0c\u56e0\u6b64\uff0c\u5982\u679c\u4f60\u60f3\u53bb\u4f7f\u7528 BPF \u548c tc\uff0c\u8fd9\u91cc\u53ef\u80fd\u662f\u4f1a\u5c06\u4f60\u641e\u6df7\u4e71\u7684\u5730\u65b9\uff08\u5b83\u662f\u4ece\u6587\u4ef6 iproute2\/tc\/tc_bpf.c \u4e2d\u79fb\u52a8\u800c\u6765\u7684\uff0c\u4f60\u4e5f\u53ef\u4ee5\u5728\u65e7\u7248\u672c\u7684\u5305\u4e2d\u627e\u5230\u76f8\u540c\u7684\u4ee3\u7801\uff09\u3002<\/p>\n<h4 id=\"toc_24\">BPF \u5b9e\u7528\u5de5\u5177<\/h4>\n<p>\u5185\u6838\u4e2d\u4e5f\u5e26\u6709 BPF \u76f8\u5173\u7684\u4e09\u4e2a\u5de5\u5177\u7684\u6e90\u4ee3\u7801\uff08<code>bpf_asm.c<\/code>\u3001\u00a0<code>bpf_dbg.c<\/code>\u3001\u00a0<code>bpf_jit_disasm.c<\/code>\uff09\uff0c\u6839\u636e\u4f60\u7684\u7248\u672c\u4e0d\u540c\uff0c\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/tools\/net\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/tools\/net\/<\/a>\u00a0\uff08\u76f4\u5230 Linux 4.14\uff09\u6216\u8005\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/davem\/net-next.git\/tree\/tools\/bpf\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/tools\/bpf\/<\/a>\u00a0\u76ee\u5f55\u4e0b\u9762\uff1a<\/p>\n<ul>\n<li><code>bpf_asm<\/code>\u00a0\u662f\u4e00\u4e2a\u6781\u5c0f\u7684 cBPF \u6c47\u7f16\u7a0b\u5e8f\u3002<\/li>\n<li><code>bpf_dbg<\/code>\u00a0\u662f\u4e00\u4e2a\u5f88\u5c0f\u7684 cBPF \u7a0b\u5e8f\u8c03\u8bd5\u5668\u3002<\/li>\n<li><code>bpf_jit_disasm<\/code>\u00a0\u5bf9\u4e8e\u4e24\u79cd BPF \u90fd\u662f\u901a\u7528\u7684\uff0c\u5e76\u4e14\u5bf9\u4e8e JIT \u8c03\u8bd5\u6765\u8bf4\u975e\u5e38\u6709\u7528\u3002<\/li>\n<li><code>bpftool<\/code>\u00a0\u662f\u7531 Jakub Kicinski \u5199\u7684\u901a\u7528\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u4e0e eBPF \u7a0b\u5e8f\u4ea4\u4e92\u5e76\u4ece\u7528\u6237\u7a7a\u95f4\u7684\u6620\u5c04\uff0c\u4f8b\u5982\uff0c\u53bb\u5c55\u793a\u3001\u8f6c\u50a8\u3001pin \u7a0b\u5e8f\u3001\u6216\u8005\u53bb\u5c55\u793a\u3001\u521b\u5efa\u3001pin\u3001\u66f4\u65b0\u3001\u5220\u9664\u6620\u5c04\u3002<\/li>\n<\/ul>\n<p>\u9605\u8bfb\u5728\u6e90\u6587\u4ef6\u9876\u90e8\u7684\u6ce8\u91ca\u53ef\u4ee5\u5f97\u5230\u4e00\u4e2a\u5b83\u4eec\u4f7f\u7528\u65b9\u6cd5\u7684\u6982\u8ff0\u3002<\/p>\n<p>\u4e0e eBPF \u4e00\u8d77\u5de5\u4f5c\u7684\u5176\u5b83\u5fc5\u9700\u7684\u6587\u4ef6\u662f\u6765\u81ea\u5185\u6838\u6811\u7684\u4e24\u4e2a<strong>\u7528\u6237\u7a7a\u95f4\u5e93<\/strong>\uff0c\u5b83\u4eec\u53ef\u4ee5\u7528\u4e8e\u7ba1\u7406 eBPF \u7a0b\u5e8f\u6216\u8005\u6620\u5c04\u6765\u81ea\u5916\u90e8\u7684\u7a0b\u5e8f\u3002\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u901a\u8fc7\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/davem\/net-next.git\/tree\/tools\/lib\/bpf\" target=\"_blank\" rel=\"external nofollow noopener\">linux\/tools\/lib\/bpf\/<\/a>\u00a0\u76ee\u5f55\u4e2d\u7684\u5934\u6587\u4ef6\u00a0<code>bpf.h<\/code>\u00a0\u548c\u00a0<code>libbpf.h<\/code>\uff08\u66f4\u9ad8\u5c42\u9762\u5c01\u88c5\uff09\u6765\u8bbf\u95ee\u3002\u6bd4\u5982\uff0c\u5de5\u5177\u00a0<code>bpftool<\/code>\u00a0\u4e3b\u8981\u4f9d\u8d56\u8fd9\u4e9b\u5e93\u3002<\/p>\n<h4 id=\"toc_25\">\u5176\u5b83\u503c\u5f97\u5173\u6ce8\u7684\u90e8\u5206<\/h4>\n<p>\u5982\u679c\u4f60\u5bf9\u5173\u4e8e BPF \u7684\u4e0d\u5e38\u89c1\u7684\u8bed\u8a00\u7684\u4f7f\u7528\u611f\u5174\u8da3\uff0cbcc \u5305\u542b\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/tree\/master\/src\/cc\/frontends\/p4\/compiler\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e00\u4e2a BPF \u76ee\u6807\u7684\u00a0<strong>P4 \u7f16\u8bd1\u5668<\/strong><\/a>\u4ee5\u53ca\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/tree\/master\/src\/lua\" target=\"_blank\" rel=\"external nofollow noopener\"><strong>\u4e00\u4e2a\u00a0Lua \u524d\u7aef<\/strong><\/a>\uff0c\u5b83\u53ef\u4ee5\u88ab\u7528\u4ee5\u4ee3\u66ff C \u7684\u4e00\u4e2a\u5b50\u96c6\uff0c\u5e76\u4e14\uff08\u7528 Lua \uff09\u66ff\u4ee3 Python \u5de5\u5177\u3002<\/p>\n<h4 id=\"toc_26\">LLVM \u540e\u7aef<\/h4>\n<p>\u8fd9\u4e2a BPF \u540e\u7aef\u7528\u4e8e clang \/ LLVM \u5c06 C \u7f16\u8bd1\u5230 eBPF \uff0c\u662f\u5728\u00a0<a class=\"ext\" href=\"https:\/\/reviews.llvm.org\/D6494\" target=\"_blank\" rel=\"external nofollow noopener\">\u8fd9\u4e2a\u63d0\u4ea4<\/a>\u00a0\u4e2d\u6dfb\u52a0\u5230 LLVM \u6e90\u4ee3\u7801\u7684\uff08\u4e5f\u53ef\u4ee5\u5728\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/llvm-mirror\/llvm\/commit\/4fe85c75482f9d11c5a1f92a1863ce30afad8d0d\" target=\"_blank\" rel=\"external nofollow noopener\">\u8fd9\u4e2a GitHub \u955c\u50cf<\/a>\u00a0\u4e0a\u8bbf\u95ee\uff09\u3002<\/p>\n<h4 id=\"toc_27\">\u5728\u7528\u6237\u7a7a\u95f4\u4e2d\u8fd0\u884c<\/h4>\n<p>\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6211\u77e5\u9053\u90a3\u91cc\u6709\u81f3\u5c11\u4e24\u79cd eBPF \u7528\u6237\u7a7a\u95f4\u5b9e\u73b0\u3002\u7b2c\u4e00\u4e2a\u662f\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/ubpf\/\" target=\"_blank\" rel=\"external nofollow noopener\">uBPF<\/a>\uff0c\u5b83\u662f\u7528 C \u5199\u7684\u3002\u5b83\u5305\u542b\u4e00\u4e2a\u89e3\u6790\u5668\u3001\u4e00\u4e2a x86_64 \u67b6\u6784\u7684 JIT \u7f16\u8bd1\u5668\u3001\u4e00\u4e2a\u6c47\u7f16\u5668\u548c\u4e00\u4e2a\u53cd\u6c47\u7f16\u5668\u3002<\/p>\n<p>uBPF \u7684\u4ee3\u7801\u4f3c\u4e4e\u88ab\u91cd\u7528\u6765\u4ea7\u751f\u4e86\u4e00\u4e2a\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/YutaroHayakawa\/generic-ebpf\" target=\"_blank\" rel=\"external nofollow noopener\">\u901a\u7528\u5b9e\u73b0<\/a>\uff0c\u5176\u58f0\u79f0\u652f\u6301 FreeBSD \u5185\u6838\u3001FreeBSD \u7528\u6237\u7a7a\u95f4\u3001Linux \u5185\u6838\u3001Linux \u7528\u6237\u7a7a\u95f4\u548c Mac OSX \u7528\u6237\u7a7a\u95f4\u3002\u5b83\u88ab\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/YutaroHayakawa\/vale-bpf\" target=\"_blank\" rel=\"external nofollow noopener\">VALE \u4ea4\u6362\u673a\u7684 BPF \u6269\u5c55\u6a21\u5757<\/a>\u4f7f\u7528\u3002<\/p>\n<p>\u5176\u5b83\u7528\u6237\u7a7a\u95f4\u7684\u5b9e\u73b0\u662f\u6211\u505a\u7684\uff1a<a class=\"ext\" href=\"https:\/\/github.com\/qmonnet\/rbpf\" target=\"_blank\" rel=\"external nofollow noopener\">rbpf<\/a>\uff0c\u57fa\u4e8e uBPF\uff0c\u4f46\u662f\u7528 Rust \u5199\u7684\u3002\u5199\u4e86\u89e3\u6790\u5668\u548c JIT \u7f16\u8bd1\u5668 \uff08Linux \u4e0b\u4e24\u4e2a\u90fd\u6709\uff0cMac OSX \u548c Windows \u4e0b\u4ec5\u6709\u89e3\u6790\u5668\uff09\uff0c\u4ee5\u540e\u53ef\u80fd\u4f1a\u6709\u66f4\u591a\u3002<\/p>\n<h4 id=\"toc_28\">\u63d0\u4ea4\u65e5\u5fd7<\/h4>\n<p>\u6b63\u5982\u524d\u9762\u6240\u8bf4\u7684\uff0c\u5982\u679c\u4f60\u5e0c\u671b\u5f97\u5230\u66f4\u591a\u7684\u5173\u4e8e\u4e00\u4e9b\u7279\u5b9a\u7684 BPF \u7279\u6027\u7684\u4fe1\u606f\uff0c\u4e0d\u8981\u72b9\u8c6b\uff0c\u53bb\u770b\u4e00\u4e9b\u63d0\u4ea4\u65e5\u5fd7\u3002\u4f60\u53ef\u4ee5\u5728\u8bb8\u591a\u5730\u65b9\u641c\u7d22\u65e5\u5fd7\uff0c\u6bd4\u5982\uff0c\u5728\u00a0<a class=\"ext\" href=\"https:\/\/git.kernel.org\/cgit\/linux\/kernel\/git\/torvalds\/linux.git\" target=\"_blank\" rel=\"external nofollow noopener\">git.kernel.org<\/a>\u3001<a class=\"ext\" href=\"https:\/\/github.com\/torvalds\/linux\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728 GitHub \u4e0a<\/a>\u3001\u6216\u8005\u5982\u679c\u4f60\u514b\u9686\u8fc7\u5b83\u8fd8\u6709\u4f60\u7684\u672c\u5730\u4ed3\u5e93\u4e2d\u3002\u5982\u679c\u4f60\u4e0d\u719f\u6089 git\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u50cf\u8fd9\u4e9b\u53bb\u505a\u00a0<code>git blame &lt;file&gt;<\/code>\u00a0\u53bb\u770b\u770b\u4ecb\u7ecd\u7279\u5b9a\u4ee3\u7801\u884c\u7684\u63d0\u4ea4\u5185\u5bb9\uff0c\u7136\u540e\uff0c<code>git show &lt;commit&gt;<\/code>\u00a0\u53bb\u770b\u8be6\u7ec6\u60c5\u51b5\uff08\u6216\u8005\u5728\u00a0<code>git log<\/code>\u00a0\u7684\u7ed3\u679c\u4e2d\u6309\u5173\u952e\u5b57\u641c\u7d22\uff0c\u4f46\u662f\u8fd9\u6837\u505a\u901a\u5e38\u6bd4\u8f83\u5355\u8c03\u4e4f\u5473\uff09\u4e5f\u53ef\u4ee5\u770b\u5728 bcc \u4ed3\u5e93\u4e2d\u7684\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/docs\/kernel-versions.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u6309\u5185\u6838\u7248\u672c\u533a\u5206\u7684 eBPF \u7279\u6027\u5217\u8868<\/a>\uff0c\u5b83\u94fe\u63a5\u5230\u76f8\u5173\u7684\u63d0\u4ea4\u4e0a\u3002<\/p>\n<h3 id=\"toc_29\">\u6392\u9519<\/h3>\n<p>\u5bf9 eBPF \u7684\u8ffd\u6367\u662f\u6700\u8fd1\u7684\u4e8b\u60c5\uff0c\u56e0\u6b64\uff0c\u5230\u76ee\u524d\u4e3a\u6b62\u6211\u8fd8\u627e\u4e0d\u5230\u8bb8\u591a\u5173\u4e8e\u600e\u4e48\u53bb\u6392\u9519\u7684\u8d44\u6e90\u3002\u6240\u4ee5\u8fd9\u91cc\u53ea\u6709\u51e0\u4e2a\uff0c\u662f\u6211\u5728\u4f7f\u7528 BPF \u8fdb\u884c\u5de5\u4f5c\u7684\u65f6\u5019\uff0c\u5bf9\u81ea\u5df1\u9047\u5230\u7684\u95ee\u9898\u8fdb\u884c\u7684\u8bb0\u5f55\u3002<\/p>\n<h4 id=\"toc_30\">\u7f16\u8bd1\u65f6\u7684\u9519\u8bef<\/h4>\n<ul>\n<li>\u786e\u4fdd\u4f60\u6709\u4e00\u4e2a\u6700\u65b0\u7684 Linux \u5185\u6838\u7248\u672c\uff08\u4e5f\u53ef\u4ee5\u770b\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/docs\/kernel-versions.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u8fd9\u4e2a\u6587\u6863<\/a>\uff09\u3002<\/li>\n<li>\u5982\u679c\u4f60\u81ea\u5df1\u7f16\u8bd1\u5185\u6838\uff1a\u786e\u4fdd\u4f60\u5b89\u88c5\u4e86\u6240\u6709\u6b63\u786e\u7684\u7ec4\u4ef6\uff0c\u5305\u62ec\u5185\u6838\u955c\u50cf\u3001\u5934\u6587\u4ef6\u548c libc\u3002<\/li>\n<li>\u5f53\u4f7f\u7528\u00a0<code>tc-bpf<\/code>\uff08\u7528\u4e8e\u53bb\u7f16\u8bd1 C \u4ee3\u7801\u5230 BPF \u4e2d\uff09\u7684 man \u9875\u9762\u63d0\u4f9b\u7684\u00a0<code>bcc<\/code>\u00a0shell \u51fd\u6570\u65f6\uff1a\u6211\u66fe\u7ecf\u5fc5\u987b\u6dfb\u52a0\u5305\u542b clang \u8c03\u7528\u7684\u5934\u6587\u4ef6\uff1a\n<ol class=\"linenums\">\n<li class=\"L0\"><code><span class=\"pln\">__bcc<\/span><span class=\"pun\">()<\/span> <span class=\"pun\">{<\/span><\/code><\/li>\n<li class=\"L1\"><code><span class=\"pln\">        clang <\/span><span class=\"pun\">-<\/span><span class=\"pln\">O2 <\/span><span class=\"pun\">-<\/span><span class=\"pln\">I <\/span><span class=\"str\">\"\/usr\/src\/linux-headers-$(uname -r)\/include\/\"<\/span><span class=\"pln\"> \\<\/span><\/code><\/li>\n<li class=\"L2\"><code>                  <span class=\"pun\">-<\/span><span class=\"pln\">I <\/span><span class=\"str\">\"\/usr\/src\/linux-headers-$(uname -r)\/arch\/x86\/include\/\"<\/span><span class=\"pln\"> \\<\/span><\/code><\/li>\n<li class=\"L3\"><code>                <span class=\"pun\">-<\/span><span class=\"pln\">emit<\/span><span class=\"pun\">-<\/span><span class=\"pln\">llvm <\/span><span class=\"pun\">-<\/span><span class=\"pln\">c $1 <\/span><span class=\"pun\">-<\/span><span class=\"pln\">o <\/span><span class=\"pun\">-<\/span> <span class=\"pun\">|<\/span><span class=\"pln\"> \\<\/span><\/code><\/li>\n<li class=\"L4\"><code><span class=\"pln\">        llc <\/span><span class=\"pun\">-<\/span><span class=\"pln\">march<\/span><span class=\"pun\">=<\/span><span class=\"pln\">bpf <\/span><span class=\"pun\">-<\/span><span class=\"pln\">filetype<\/span><span class=\"pun\">=<\/span><span class=\"pln\">obj <\/span><span class=\"pun\">-<\/span><span class=\"pln\">o <\/span><span class=\"str\">\"`basename $1 .c`.o\"<\/span><\/code><\/li>\n<li class=\"L5\"><code><span class=\"pun\">}<\/span><\/code><\/li>\n<\/ol>\n<p>\uff08\u73b0\u5728\u4f3c\u4e4e\u4fee\u590d\u4e86\uff09\u3002<\/li>\n<li>\u5bf9\u4e8e\u4f7f\u7528\u00a0<code>bcc<\/code>\u00a0\u7684\u5176\u5b83\u95ee\u9898\uff0c\u4e0d\u8981\u5fd8\u4e86\u53bb\u770b\u4e00\u770b\u8fd9\u4e2a\u5de5\u5177\u96c6\u7684\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/FAQ.txt\" target=\"_blank\" rel=\"external nofollow noopener\">\u7b54\u7591<\/a>\u3002<\/li>\n<li>\u5982\u679c\u4f60\u4ece\u4e00\u4e2a\u5e76\u4e0d\u7cbe\u786e\u5339\u914d\u4f60\u7684\u5185\u6838\u7248\u672c\u7684 iproute2 \u5305\u4e2d\u4e0b\u8f7d\u4e86\u793a\u4f8b\uff0c\u53ef\u80fd\u4f1a\u7531\u4e8e\u5728\u6587\u4ef6\u4e2d\u5305\u542b\u7684\u5934\u6587\u4ef6\u89e6\u53d1\u4e00\u4e9b\u9519\u8bef\u3002\u8fd9\u4e9b\u793a\u4f8b\u7247\u65ad\u90fd\u5047\u8bbe\u5b89\u88c5\u5728\u4f60\u7684\u7cfb\u7edf\u4e2d\u5185\u6838\u7684\u5934\u6587\u4ef6\u4e0e iproute2 \u5305\u662f\u76f8\u540c\u7248\u672c\u7684\u3002\u5982\u679c\u4e0d\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u4e0b\u8f7d\u6b63\u786e\u7684 iproute2 \u7248\u672c\uff0c\u6216\u8005\u7f16\u8f91\u793a\u4f8b\u4e2d\u5305\u542b\u7684\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u6307\u5411\u5230 iproute2 \u4e2d\u5305\u542b\u7684\u5934\u6587\u4ef6\u4e0a\uff08\u5728\u8fd0\u884c\u65f6\u4e00\u4e9b\u95ee\u9898\u53ef\u80fd\u6216\u8005\u4e0d\u53ef\u80fd\u53d1\u751f\uff0c\u53d6\u51b3\u4e8e\u4f60\u4f7f\u7528\u7684\u7279\u6027\uff09\u3002<\/li>\n<\/ul>\n<h4 id=\"toc_31\">\u5728\u52a0\u8f7d\u548c\u8fd0\u884c\u65f6\u7684\u9519\u8bef<\/h4>\n<ul>\n<li>\u4f7f\u7528\u00a0<code>tc<\/code>\u00a0\u53bb\u52a0\u8f7d\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u786e\u4fdd\u4f60\u4f7f\u7528\u4e86\u4e00\u4e2a\u4e0e\u4f7f\u7528\u4e2d\u7684\u5185\u6838\u7248\u672c\u7b49\u4ef7\u7684 iproute2 \u4e2d\u7684\u00a0<code>tc<\/code>\u00a0\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002<\/li>\n<li>\u4f7f\u7528\u00a0<code>bcc<\/code>\u00a0\u53bb\u52a0\u8f7d\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u786e\u4fdd\u5728\u4f60\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5\u4e86 bcc\uff08\u4ec5\u4e0b\u8f7d\u6e90\u4ee3\u7801\u53bb\u8fd0\u884c Python \u811a\u672c\u662f\u4e0d\u591f\u7684\uff09\u3002<\/li>\n<li>\u4f7f\u7528\u00a0<code>tc<\/code>\uff0c\u5982\u679c BPF \u7a0b\u5e8f\u4e0d\u80fd\u8fd4\u56de\u4e00\u4e2a\u9884\u671f\u503c\uff0c\u68c0\u67e5\u8c03\u7528\u5b83\u7684\u65b9\u5f0f\uff1a\u8fc7\u6ee4\u5668\uff0c\u6216\u8005\u52a8\u4f5c\uff0c\u6216\u8005\u4f7f\u7528 \u201c\u76f4\u4f20\u201d \u6a21\u5f0f\u7684\u8fc7\u6ee4\u5668\u3002<\/li>\n<li>\u8fd8\u662f\u00a0<code>tc<\/code>\uff0c\u6ce8\u610f\u4e0d\u4f7f\u7528\u8fc7\u6ee4\u5668\uff0c\u52a8\u4f5c\u4e0d\u4f1a\u76f4\u63a5\u9644\u7740\u5230 qdiscs \u6216\u8005\u63a5\u53e3\u3002<\/li>\n<li>\u901a\u8fc7\u5185\u6838\u6821\u9a8c\u5668\u629b\u51fa\u9519\u8bef\u5230\u89e3\u6790\u5668\u53ef\u80fd\u5f88\u96be\u3002<a class=\"ext\" href=\"https:\/\/www.kernel.org\/doc\/Documentation\/networking\/filter.txt\" target=\"_blank\" rel=\"external nofollow noopener\">\u5185\u6838\u6587\u6863<\/a>\u6216\u8bb8\u53ef\u4ee5\u63d0\u4f9b\u5e2e\u52a9\uff0c\u56e0\u6b64\uff0c\u53ef\u4ee5\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/docs\/reference_guide.md\" target=\"_blank\" rel=\"external nofollow noopener\">\u53c2\u8003\u6307\u5357<\/a>\u00a0\u6216\u8005\uff0c\u4e07\u4e0d\u5f97\u4e00\u7684\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u53bb\u770b\u6e90\u4ee3\u7801\uff08\u795d\u4f60\u597d\u8fd0\uff01\uff09\u3002\u8bb0\u4f4f\uff0c\u6821\u9a8c\u5668\u00a0<em>\u4e0d\u8fd0\u884c<\/em>\u00a0\u7a0b\u5e8f\uff0c\u5bf9\u4e8e\u8fd9\u79cd\u7c7b\u578b\u7684\u9519\u8bef\uff0c\u8bb0\u4f4f\u8fd9\u70b9\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u5982\u679c\u4f60\u5f97\u5230\u4e00\u4e2a\u5173\u4e8e\u65e0\u6548\u5185\u5b58\u8bbf\u95ee\u6216\u8005\u5173\u4e8e\u672a\u521d\u59cb\u5316\u7684\u6570\u636e\u7684\u9519\u8bef\uff0c\u5b83\u5e76\u4e0d\u610f\u5473\u7740\u90a3\u4e9b\u95ee\u9898\u771f\u5b9e\u53d1\u751f\u4e86\uff08\u6216\u8005\u6709\u65f6\u5019\u662f\uff0c\u5b83\u4eec\u5b8c\u5168\u6709\u53ef\u80fd\u53d1\u751f\uff09\u3002\u5b83\u610f\u5473\u7740\u4f60\u7684\u7a0b\u5e8f\u662f\u4ee5\u6821\u9a8c\u5668\u9884\u8ba1\u53ef\u80fd\u53d1\u751f\u9519\u8bef\u7684\u65b9\u5f0f\u5199\u7684\uff0c\u5e76\u4e14\u56e0\u6b64\u800c\u62d2\u7edd\u8fd9\u4e2a\u7a0b\u5e8f\u3002<\/li>\n<li>\u6ce8\u610f\u00a0<code>tc<\/code>\u00a0\u5de5\u5177\u6709\u4e00\u4e2a\u00a0<code>verbose<\/code>\u00a0\u6a21\u5f0f\uff0c\u5b83\u4e0e BPF \u4e00\u8d77\u5de5\u4f5c\u7684\u5f88\u597d\uff1a\u5728\u4f60\u7684\u547d\u4ee4\u884c\u5c3e\u90e8\u5c1d\u8bd5\u8ffd\u52a0\u4e00\u4e2a\u00a0<code>verbose<\/code>\u3002<\/li>\n<li><code>bcc<\/code>\u00a0\u4e5f\u6709\u4e00\u4e2a\u00a0<code>verbose<\/code>\u00a0\u9009\u9879\uff1a<code>BPF<\/code>\u00a0\u7c7b\u6709\u4e00\u4e2a\u00a0<code>debug<\/code>\u00a0\u53c2\u6570\uff0c\u5b83\u53ef\u4ee5\u5e26\u00a0<code>DEBUG_LLVM_IR<\/code>\u3001<code>DEBUG_BPF<\/code>\u00a0\u548c\u00a0<code>DEBUG_PREPROCESSOR<\/code>\u00a0\u4e09\u4e2a\u6807\u5fd7\u4e2d\u4efb\u4f55\u7ec4\u5408\uff08\u8be6\u7ec6\u60c5\u51b5\u5728\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/src\/python\/bcc\/__init__.py\" target=\"_blank\" rel=\"external nofollow noopener\">\u6e90\u6587\u4ef6<\/a>\u4e2d\uff09\u3002 \u4e3a\u8c03\u8bd5\u8be5\u4ee3\u7801\uff0c\u5b83\u751a\u81f3\u5d4c\u5165\u4e86\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/docs\/reference_guide.md#output\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e00\u4e9b\u6761\u4ef6\u53bb\u6253\u5370\u8f93\u51fa\u4ee3\u7801<\/a>\u3002<\/li>\n<li>LLVM v4.0+\u00a0\u4e3a eBPF \u7a0b\u5e8f\u00a0<a class=\"ext\" href=\"https:\/\/www.spinics.net\/lists\/netdev\/msg406926.html\" target=\"_blank\" rel=\"external nofollow noopener\">\u5d4c\u5165\u4e00\u4e2a\u53cd\u6c47\u7f16\u5668<\/a>\u3002\u56e0\u6b64\uff0c\u5982\u679c\u4f60\u7528 clang \u7f16\u8bd1\u4f60\u7684\u7a0b\u5e8f\uff0c\u5728\u7f16\u8bd1\u65f6\u6dfb\u52a0\u00a0<code>-g<\/code>\u00a0\u6807\u5fd7\u5141\u8bb8\u4f60\u901a\u8fc7\u5185\u6838\u6821\u9a8c\u5668\u53bb\u4ee5\u4eba\u7c7b\u53ef\u8bfb\u7684\u683c\u5f0f\u53bb\u8f6c\u50a8\u4f60\u7684\u7a0b\u5e8f\u3002\u5904\u7406\u8f6c\u50a8\u6587\u4ef6\uff0c\u4f7f\u7528\uff1a\n<ol class=\"linenums\">\n<li class=\"L0\"><code><span class=\"pln\">$ llvm<\/span><span class=\"pun\">-<\/span><span class=\"pln\">objdump <\/span><span class=\"pun\">-<\/span><span class=\"pln\">S <\/span><span class=\"pun\">-<\/span><span class=\"kwd\">no<\/span><span class=\"pun\">-<\/span><span class=\"pln\">show<\/span><span class=\"pun\">-<\/span><span class=\"pln\">raw<\/span><span class=\"pun\">-<\/span><span class=\"pln\">insn bpf_program<\/span><span class=\"pun\">.<\/span><span class=\"pln\">o<\/span><\/code><\/li>\n<\/ol>\n<\/li>\n<li>\u4f7f\u7528\u6620\u5c04\uff1f\u4f60\u5e94\u8be5\u53bb\u770b\u770b\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/cilium\/bpf-map\" target=\"_blank\" rel=\"external nofollow noopener\">bpf-map<\/a>\uff0c\u8fd9\u662f\u4e00\u4e2a\u4e3a Cilium \u9879\u76ee\u800c\u7528 Go \u521b\u5efa\u7684\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u7528\u4e8e\u53bb\u8f6c\u50a8\u5185\u6838\u4e2d eBPF \u6620\u5c04\u7684\u5185\u5bb9\u3002\u4e5f\u6709\u4e00\u4e2a\u7528 Rust \u5f00\u53d1\u7684\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/badboy\/bpf-map\" target=\"_blank\" rel=\"external nofollow noopener\">\u514b\u9686<\/a>\u3002<\/li>\n<li><a class=\"ext\" href=\"https:\/\/stackoverflow.com\/questions\/tagged\/bpf\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728\u00a0<strong>StackOverflow<\/strong>\u00a0\u4e0a\u6709\u4e2a\u65e7\u7684 bpf \u6807\u7b7e<\/a>\uff0c\u4f46\u662f\uff0c\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\u4ece\u6ca1\u7528\u8fc7\u5b83\uff08\u5e76\u4e14\u90a3\u91cc\u51e0\u4e4e\u6ca1\u6709\u4e0e\u65b0\u7248\u672c\u7684 eBPF \u76f8\u5173\u7684\u4e1c\u897f\uff09\u3002\u5982\u679c\u4f60\u662f\u4e00\u4f4d\u6765\u81ea\u672a\u6765\u7684\u9605\u8bfb\u8005\uff0c\u4f60\u53ef\u80fd\u60f3\u53bb\u770b\u770b\u5728\u8fd9\u65b9\u9762\u662f\u5426\u6709\u66f4\u591a\u7684\u6d3b\u52a8\uff08LCTT \u8bd1\u6ce8\uff1a\u610f\u5373\u53ea\u6709\u65e7\u4e1c\u897f\uff09\u3002<\/li>\n<\/ul>\n<h3 id=\"toc_32\">\u66f4\u591a\uff01<\/h3>\n<ul>\n<li>\u5982\u679c\u4f60\u60f3\u8f7b\u677e\u5730\u00a0<strong>\u6d4b\u8bd5 XDP<\/strong>\uff0c\u6709\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/iovisor\/xdp-vagrant\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e00\u4e2a\u914d\u7f6e\u597d\u7684 Vagrant\u00a0<\/a>\u00a0\u53ef\u4ee5\u4f7f\u7528\u3002\u4f60\u4e5f\u53ef\u4ee5\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/zlim\/bcc-docker\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728 Docker \u5bb9\u5668\u4e2d<\/a>\u00a0<strong>\u6d4b\u8bd5 bcc<\/strong>\u3002<\/li>\n<li>\u60f3\u77e5\u9053 BPF \u7684\u00a0<strong>\u5f00\u53d1\u548c\u6d3b\u52a8<\/strong>\u00a0\u5728\u54ea\u91cc\u5417\uff1f\u597d\u5427\uff0c\u5185\u6838\u8865\u4e01\u603b\u662f\u51fa\u81ea\u4e8e\u00a0<a class=\"ext\" href=\"http:\/\/lists.openwall.net\/netdev\/\" target=\"_blank\" rel=\"external nofollow noopener\">netdev \u4e0a\u7684\u90ae\u4ef6\u5217\u8868<\/a>\uff08\u76f8\u5173 Linux \u5185\u6838\u7684\u7f51\u7edc\u6808\u5f00\u53d1\uff09\uff1a\u4ee5\u5173\u952e\u5b57 \u201cBPF\u201d \u6216\u8005 \u201cXDP\u201d \u6765\u641c\u7d22\u3002\u81ea 2017 \u5e74 4 \u6708\u5f00\u59cb\uff0c\u90a3\u91cc\u4e5f\u6709\u00a0<a class=\"ext\" href=\"http:\/\/vger.kernel.org\/vger-lists.html#xdp-newbies\" target=\"_blank\" rel=\"external nofollow noopener\">\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e XDP \u7f16\u7a0b\u7684\u90ae\u4ef6\u5217\u8868<\/a>\uff08\u662f\u4e3a\u4e86\u67b6\u6784\u6216\u8005\u5bfb\u6c42\u5e2e\u52a9\uff09\u3002<a class=\"ext\" href=\"http:\/\/lists.iovisor.org\/pipermail\/iovisor-dev\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u5728 IO Visor \u7684\u90ae\u4ef6\u5217\u8868\u4e0a<\/a>\u4e5f\u6709\u8bb8\u591a\u7684\u8ba8\u8bba\u548c\u8fa8\u8bba\uff0c\u56e0\u4e3a BPF \u662f\u4e00\u4e2a\u91cd\u8981\u7684\u9879\u76ee\u3002\u5982\u679c\u4f60\u53ea\u662f\u60f3\u968f\u65f6\u4e86\u89e3\u60c5\u51b5\uff0c\u90a3\u91cc\u4e5f\u6709\u4e00\u4e2a\u00a0<a class=\"ext\" href=\"https:\/\/twitter.com\/IOVisor\" target=\"_blank\" rel=\"external nofollow noopener\">@IOVisor Twitter \u5e10\u6237<\/a>\u3002<\/li>\n<\/ul>\n<p>\u8bf7\u7ecf\u5e38\u4f1a\u56de\u5230<a class=\"ext\" href=\"https:\/\/qmonnet.github.io\/whirl-offload\/2016\/09\/01\/dive-into-bpf\/\" target=\"_blank\" rel=\"external nofollow noopener\">\u8fd9\u7bc7\u535a\u5ba2<\/a>\u4e2d\uff0c\u6765\u770b\u4e00\u770b\u00a0<a class=\"ext\" href=\"https:\/\/qmonnet.github.io\/whirl-offload\/categories\/#BPF\" target=\"_blank\" rel=\"external nofollow noopener\">\u5173\u4e8e BPF<\/a>\u00a0\u6709\u6ca1\u6709\u65b0\u7684\u6587\u7ae0\uff01<\/p>\n<p><em>\u7279\u522b\u611f\u8c22 Daniel Borkmann \u6307\u5f15\u6211\u627e\u5230\u4e86\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/qmonnet\/whirl-offload\/commit\/d694f8081ba00e686e34f86d5ee76abeb4d0e429\" target=\"_blank\" rel=\"external nofollow noopener\">\u66f4\u591a\u7684\u6587\u6863<\/a>\uff0c\u56e0\u6b64\u6211\u624d\u5b8c\u6210\u4e86\u8fd9\u4e2a\u5408\u96c6\u3002<\/em><\/p>\n<hr \/>\n<p>via:\u00a0<a class=\"ext\" href=\"https:\/\/qmonnet.github.io\/whirl-offload\/2016\/09\/01\/dive-into-bpf\/\" target=\"_blank\" rel=\"external nofollow noopener\">https:\/\/qmonnet.github.io\/whirl-offload\/2016\/09\/01\/dive-into-bpf\/<\/a><\/p>\n<p>\u4f5c\u8005\uff1a<a class=\"ext\" href=\"https:\/\/qmonnet.github.io\/whirl-offload\/about\/\" target=\"_blank\" rel=\"external nofollow noopener\">Quentin Monnet<\/a>\u00a0\u8bd1\u8005\uff1a<a class=\"ext\" href=\"https:\/\/github.com\/qhwdw\" target=\"_blank\" rel=\"external nofollow noopener\">qhwdw<\/a>\u00a0\u6821\u5bf9\uff1a<a class=\"ext\" href=\"https:\/\/github.com\/wxy\" target=\"_blank\" rel=\"external nofollow noopener\">wxy<\/a><\/p>\n<p>\u672c\u6587\u7531\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/LCTT\/TranslateProject\" target=\"_blank\" rel=\"external nofollow noopener\">LCTT<\/a>\u00a0\u539f\u521b\u7f16\u8bd1\uff0c<a href=\"https:\/\/linux.cn\/article-9507-1.html\">Linux\u4e2d\u56fd<\/a>\u00a0\u8363\u8a89\u63a8\u51fa<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u5730\u5740 &nbsp; \u4f5c\u8005\uff1a\u00a0Quen<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[118],"class_list":["post-5132","post","type-post","status-publish","format-standard","hentry","tag-02-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=5132"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5132\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=5132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=5132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=5132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}