Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_offload_dev_netdev_unregister

Proto:void bpf_offload_dev_netdev_unregister(struct bpf_offload_dev *offdev, struct net_device *netdev)

Type:void

Parameter:

TypeParameterName
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  If WARN_ON(!ondev) Then Go to 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  deletes entry from list
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  If altdev Then
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  list_splice_init - join two lists and reinitialise the emptied list.*@list: the new list to add.*@head: the place to add it in the first list.* The list at @list is reinitialised
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  list_splice_init - join two lists and reinitialise the emptied list.*@list: the new list to add.*@head: the place to add it in the first list.* The list at @list is reinitialised
657  Else
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(!list_empty - tests whether a list is empty*@head: the list to test.)
665  WARN_ON(!list_empty - tests whether a list is empty*@head: the list to test.)
666  kfree(ondev)
667  unlock :
668  lease a write lock