net/bnxt: add TruFlow hash function
[dpdk.git] / drivers / net / bnxt / tf_core / ll.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019-2020 Broadcom
3  * All rights reserved.
4  */
5
6 /* Linked List Header File */
7
8 #ifndef _LL_H_
9 #define _LL_H_
10
11 /* linked list entry */
12 struct ll_entry {
13         struct ll_entry *prev;
14         struct ll_entry *next;
15 };
16
17 /* linked list */
18 struct ll {
19         struct ll_entry *head;
20         struct ll_entry *tail;
21 };
22
23 /**
24  * Linked list initialization.
25  *
26  * [in] ll, linked list to be initialized
27  */
28 void ll_init(struct ll *ll);
29
30 /**
31  * Linked list insert
32  *
33  * [in] ll, linked list where element is inserted
34  * [in] entry, entry to be added
35  */
36 void ll_insert(struct ll *ll, struct ll_entry *entry);
37
38 /**
39  * Linked list delete
40  *
41  * [in] ll, linked list where element is removed
42  * [in] entry, entry to be deleted
43  */
44 void ll_delete(struct ll *ll, struct ll_entry *entry);
45
46 #endif /* _LL_H_ */