-
Notifications
You must be signed in to change notification settings - Fork 0
/
katran.db
executable file
·1 lines (1 loc) · 10.3 KB
/
katran.db
1
{"gitRepoUrl": "https://github.com/facebookincubator/katran.git", "commitId": "b86858285509f473c5f5b7a0d04addc1f1ad1f55", "humanFuncDescription": [{"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "is_under_flood", "startLine": 25, "endLine": 50, "description": " Check how many connection have been made within the last one second(or other predefined value), function will return true if it's exceding the max connection rate and false otherwise. ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "get_packet_dst", "startLine": 53, "endLine": 131, "description": " This function checks the source routing for new connections. ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "connection_table_lookup", "startLine": 133, "endLine": 156, "description": " First check if the packet flow exists in lru_map and whether this connection is legal regarding its connection time(only check this if it is UDP protocol). Then we update the input real using the info from reals ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "process_l3_headers", "startLine": 158, "endLine": 230, "description": " Function processes the packet based on protocol and stores information in packet_description structure ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/decap/bpf/decap_kern.c", "funcName": "process_l3_headers", "startLine": 34, "endLine": 83, "description": " Process layer 3 headers. Drop the packet if it is 1)bogus packet, len less than minimum ethernet frame size, 2)fragmented, 3)ipv4 header not equals to 20 bytes, which means it contains ip options, and we do not support them. Otherwise, perform decapsulation of the packet header. ", "author": "Qintian Huang", "authorEmail": "qthuang@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "check_decap_dst", "startLine": 233, "endLine": 255, "description": " Given input \"pckt\", check if its flow's dst is legal. if it does, increase the coresponding stats's amount ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "reals_have_same_addr", "startLine": 261, "endLine": 277, "description": " Function checks the input 2 backend servers have the same dst addresses ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "perform_global_lru_lookup", "startLine": 279, "endLine": 335, "description": " (can't understand) find the lru_map from global cache based on gicen cpu_num, ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "process_encaped_ipip_pckt", "startLine": 340, "endLine": 387, "description": " Used for IPIP packets, Based on the encapsulate packet protocol type, call the appropriate decapsulation function and decrement ttl ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/decap/bpf/decap_kern.c", "funcName": "process_encaped_ipip_pckt", "startLine": 85, "endLine": 120, "description": " Process ip-in-ip encaped packet, drop the packet if 1) bogus packet, len less than minimum ethernet frame size, 2) not decaped successfully. Otherwise, perform decapsulation of the outer packet header. ", "author": "Qintian Huang", "authorEmail": "qthuang@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "process_encaped_gue_pckt", "startLine": 391, "endLine": 441, "description": " Used for GUE packets,Based on the encapsulate packet protocol type, call the appropriate decapsulation function and decrement ttl ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/decap/bpf/decap_kern.c", "funcName": "process_encaped_gue_pckt", "startLine": 123, "endLine": 161, "description": " Decapsulate the outer header of the packet based on whether the inner-outer combo is ipv6 or ipv4. Drop the packet if: 1) bogus packet, len less than minimum ethernet frame size, 2) not decaped succesfully. When ipv6, check the situation that the inner packet is ipv6 and ipv4 When ipv4, check the situation that the inner packet is ipv4 ", "author": "Qintian Huang", "authorEmail": "qthuang@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "increment_quic_cid_version_stats", "startLine": 444, "endLine": 457, "description": " Function updates quic protocol stats ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "increment_quic_cid_drop_no_real", "startLine": 459, "endLine": 468, "description": " lookup stats by QUIC_CID_DROP_STATS, increment stats v1 by 1 ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "increment_quic_cid_drop_real_0", "startLine": 470, "endLine": 478, "description": " lookup stats by QUIC_CID_DROP_STATS, update Corresponding stats's v2 ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "process_packet", "startLine": 480, "endLine": 791, "description": " This function process the packet based on the protocol and updates corresponding stats. ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/decap/bpf/decap_kern.c", "funcName": "process_packet", "startLine": 164, "endLine": 221, "description": " This is a function which assembles the previous 3 functions process_l3_headers, process_encaped_ipip_pckt and process_encaped_gue_pckt. It process the packet regardless the type of the packet. ", "author": "Qintian Huang", "authorEmail": "qthuang@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "balancer_ingress", "startLine": 794, "endLine": 817, "description": " process the input ctx packet ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/balancer_kern.c", "funcName": "get_packet_hash", "startLine": 818, "endLine": 827, "description": " return the hash value of input packet ", "author": "Nengneng Yu", "authorEmail": "ynn1999@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/decap/bpf/decap_kern.c", "funcName": "xdpdecap", "startLine": 224, "endLine": 247, "description": " This is wrapper function which decapsulates the packet packet header for all types. After processing the packet, pass it to tcp/ip stack. ", "author": "Qintian Huang", "authorEmail": "qthuang@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/xdp_root.c", "funcName": "xdp_root", "startLine": 30, "endLine": 37, "description": " Input (struct xdp_md* ctx) is user accessible metadata for XDP packet hook The program will jump into another eBPF program. For each index in root_array, the program attempts to jump into a program referenced at index i and passes ctx, a pointer to the context. This programs chains and executes the input program, and finally pass the packet. ", "author": "Qintian Huang", "authorEmail": "qthuang@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/xdp_root.c", "funcName": "xdp_val", "startLine": 40, "endLine": 47, "description": " Input (struct xdp_md* ctx) is user accessible metadata for XDP packet hook The program will jump into another eBPF program. For each index in root_array, the program attempts to jump into a program referenced at index i and passes ctx, a pointer to the context. This programs chains and executes the input program, and finally pass the packet. ", "author": "Qintian Huang", "authorEmail": "qthuang@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/healthchecking_kern.c", "funcName": "healthcheck_encap", "startLine": 34, "endLine": 139, "description": " Input is user accessible mirror of in-kernel sk_buff This function performs healthcheck for encapsulation Use default action configured from tc (TC_ACT_UNSPEC), which is skip the packet, if 1) program stats is NULL/stats_key is not found in hc_stats_map, 2)mark of the sk_buff is 0, 3)somark is not found in hc_reals_map The program returns error/healthcheck fails (TC_ACT_SHOT) if 1)packet is bigger than the specified size, 2)do not have ifindex for main interface, 3)do not find HC_SRC_MAC_POS or HC_DST_MAC_POS, 4)the result for HC_ENCAP (healthcheck encap) is faulse. Otherwise, the packet passes the healthcheck, and will be redirected to another net device of index intf_ifindex. ", "author": "Qintian Huang", "authorEmail": "qthuang@bu.edu", "date": "2023-02-24"}, {"filePath": "katran/lib/bpf/healthchecking_ipip.c", "funcName": "healthcheck_encap", "startLine": 89, "endLine": 157, "description": " Performs healthcheck for ip-in-ip encapsulated packets. Use default action configured from tc (TC_ACT_UNSPEC), which is skip the packet, if 1) program stats is NULL/stats_key is not found in hc_stats_map, 2)mark of the sk_buff is 0, 3)somark is not found in hc_reals_map The program returns error/healthcheck fails (TC_ACT_SHOT) if 1)packet is bigger than the specified size, 2)do not have ipip v4 or v6 ifindex for main interface. Otherwise, Populate tunnel metadata for packet associated to skb, the tunnel metadata is set to the contents of tkey. The packet passes the healthcheck, and will be redirected to another net device of index intf_ifindex. ", "author": "Qintian Huang", "authorEmail": "qthuang@bu.edu", "date": "2023-02-24"}]}