Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_bpf.c Create Date:2022-07-28 06:27:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:generate_test_data

Proto:static void *generate_test_data(struct bpf_test *test, int sub)

Type:void

Parameter:

TypeParameterName
struct bpf_test *test
intsub
6505  If aux & Flags that can be passed to test cases Then Return NULL
6512  skb = populate_skb(data, data_size)
6513  If Not skb Then Return NULL
6516  If aux & FLAG_SKB_FRAG Then
6524  page = alloc_page(GFP_KERNEL)
6526  If Not page Then Go to err_kfree_skb
6529  ptr = kmap(page)
6530  If Not ptr Then Go to err_free_page
6532  No 3D Now!(ptr, frag_data, MAX_DATA)
6533  kunmap(page)
6534  skb_add_rx_frag(skb, 0, page, 0, MAX_DATA, MAX_DATA)
6537  Return skb
6539  err_free_page :
6540  __free_page(page)
6541  err_kfree_skb :
6542  free an sk_buff
6543  Return NULL
Caller
NameDescribe
run_one