函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_bpf.c Create Date:2022-07-27 07:25:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:build_test_skb

函数原型:static __init struct sk_buff *build_test_skb(void)

返回类型:struct sk_buff

参数:

6805  headroom等于The networking layer reserves some headroom in skb data (via* dev_alloc_skb)We handle most unaligned accesses in hardware. On the other hand* unaligned DMA can be quite expensive on some Nehalem processors.* Based on this we disable the IP header alignment in network drivers.Total octets in header.
6808  data_size等于8
6810 i小于2循环
6811  page[i]等于alloc_page(GFP_KERNEL)
6812  如果非page[i]则
6813  如果i恒等于0则转到:err_page0
6815  否则转到:err_page1
6820  skb[i]等于分配发送缓存区
6821  如果非skb[i]则
6822  如果i恒等于0则转到:err_skb0
6824  否则转到:err_skb1
6828  调整余量
6829  设置数据在缓存区
6830  protocol等于htons(Internet Protocol packet )
6831  skb_reset_network_header(skb[i])
6832  skb_set_mac_header(skb[i], - Total octets in header. )
6834  skb_add_rx_frag(skb[i], 0, page[i], 0, 64, 64)
6839  gso_size等于1448
6840  gso_type等于SKB_GSO_TCPV4
6841  gso_type或等于SKB_GSO_DODGY
6842  Warning: this field is not always filled in (UFO)! 等于0
6843  frag_list等于skb[1]
6846  len加等于len
6847  data_len加等于data_len
6848  truesize加等于truesize
6850  返回:skb[0]
6852  err_skb1 :
6853  __free_page(page[1])
6854  err_page1 :
6855  释放缓存
6856  err_skb0 :
6857  __free_page(page[0])
6858  err_page0 :
6859  返回:NULL