Line data Source code
1 : /* SPDX-License-Identifier: BSD-2-Clause 2 : * Copyright(c) HCL TECHNOLOGIES LTD 3 : * Submitted on behalf of a third-party: Intel Corporation, a 4 : * Delaware corporation, having its principal place of business 5 : * at 2200 Mission College Boulevard, 6 : * Santa Clara, California 95052, USA 7 : */ 8 : 9 : #ifndef __VR_DPDK_N3K_INTERFACE_H__ 10 : #define __VR_DPDK_N3K_INTERFACE_H__ 11 : 12 : #include "vr_defs.h" 13 : #include "vr_interface.h" 14 : #include "vr_dpdk.h" 15 : 16 : int vr_dpdk_n3k_offload_interface_init(uint16_t count); 17 : void vr_dpdk_n3k_offload_interface_exit(void); 18 : 19 : /* Note: Do not persist the returned pointer across the callback boundary. */ 20 : const struct vr_interface *vr_dpdk_n3k_offload_interface_get(uint16_t id,struct vr_interface **used_as_virtual); 21 : 22 : /* Returns port_id of interface. Assumes vif->vif_os points to non-NULL 23 : * vr_dpdk_ethdev */ 24 : static inline uint16_t 25 152 : vif_port_id(const struct vr_interface *vif) { 26 152 : return ((struct vr_dpdk_ethdev *)vif->vif_os)->ethdev_port_id; 27 : } 28 : 29 : /* Note: Do not call this function with offloads spinlock locked, this function 30 : * will grab that lock by itself */ 31 : int vr_dpdk_n3k_offload_interface_add(struct vr_interface *vif); 32 : 33 : int vr_dpdk_n3k_offload_interface_del(struct vr_interface *vif); 34 : 35 : #endif // __VR_DPDK_N3K_INTERFACE_H__