]>
git.proxmox.com Git - ovs.git/blob - lib/netdev-afxdp-pool.h
2 * Copyright (c) 2018, 2019 Nicira, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
26 #include "openvswitch/thread.h"
27 #include "ovs-atomic.h"
31 int index
; /* Point to top. */
34 void **array
; /* A pointer array pointing to umem buf. */
37 /* Array-based dp_packet_afxdp. */
40 struct dp_packet_afxdp
*array
;
43 void umem_elem_push(struct umem_pool
*umemp
, void *addr
);
44 void umem_elem_push_n(struct umem_pool
*umemp
, int n
, void **addrs
);
46 void *umem_elem_pop(struct umem_pool
*umemp
);
47 int umem_elem_pop_n(struct umem_pool
*umemp
, int n
, void **addrs
);
49 int umem_pool_init(struct umem_pool
*umemp
, unsigned int size
);
50 void umem_pool_cleanup(struct umem_pool
*umemp
);
51 unsigned int umem_pool_count(struct umem_pool
*umemp
);
52 int xpacket_pool_init(struct xpacket_pool
*xp
, unsigned int size
);
53 void xpacket_pool_cleanup(struct xpacket_pool
*xp
);