函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bpf_offload_dev_netdev_unregister

函数原型:void bpf_offload_dev_netdev_unregister(struct bpf_offload_dev *offdev, struct net_device *netdev)

返回类型:void

参数:

类型参数名称
struct bpf_offload_dev *offdev
struct net_device *netdev
635  ASSERT_RTNL()
637  lock for writing
638  ondev等于hashtable_lookup_fast - search hash table, without RCU read lock*@ht: hash table*@key: the pointer to the key*@params: hash table parameters* Computes the hash value for the key and traverses the bucket chain looking* for a entry with an identical key
639  如果WARN_ON(!ondev)则转到:unlock
642  WARN_ON(hashtable_remove_fast - remove object from hash table*@ht: hash table*@obj: pointer to hash head inside object*@params: hash table parameters* Since the hash chain is single linked, the removal operation needs to* walk the bucket chain upon removal)
643  删除链表项
646  altdev等于list_first_entry_or_null - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.( & netdevs, structbpf_offload_netdev, offdev_netdevs)
649  如果altdev
650  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(offload, & progs, offloads)
651  netdev等于netdev
652  加入二个链表项并重新初始化
654  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(offmap, & maps, offloads)
655  netdev等于netdev
656  加入二个链表项并重新初始化
657  否则
658  list_for_each_entry_safe - iterate over list of given type safe against removal of list entry*@pos: the type * to use as a loop cursor.*@n: another type * to use as temporary storage*@head: the head for your list.(offload, ptmp, & progs, offloads)
659  __bpf_prog_offload_destroy(prog)
660  list_for_each_entry_safe - iterate over list of given type safe against removal of list entry*@pos: the type * to use as a loop cursor.*@n: another type * to use as temporary storage*@head: the head for your list.(offmap, mtmp, & maps, offloads)
661  __bpf_map_offload_destroy(offmap)
664  WARN_ON(!链表为空)
665  WARN_ON(!链表为空)
666  kfree(ondev)
667  unlock :
668  lease a write lock