/* SPDX-License-Identifier: GPL-2.0+ */ #pragma once #include /* Struct for platform specific hwardware_pa configuration */ struct hwpa_backend_config { unsigned long flags; #define HWPA_PLATFORM_SPECIFIC_FLAGS_MASK AVM_HW_F_NO_BSESSION int (*alloc_rx_channel)(avm_pid_handle pid_handle); int (*alloc_tx_channel)(avm_pid_handle pid_handle); int (*free_rx_channel)(avm_pid_handle pid_handle); int (*free_tx_channel)(avm_pid_handle pid_handle); }; enum { hw_handle_zero = 0, hw_handle_invalid = ~0, }; /* utilities */ int hwpa_pktcmp(const struct sk_buff *skb1,const struct sk_buff *skb2); const void *hwpa_get_hdr(const struct avm_pa_pkt_match *match, unsigned char type); struct sk_buff *hwpa_pkt_push_tcp(struct sk_buff *skb); struct sk_buff *hwpa_pkt_push_udp(struct sk_buff *skb); struct sk_buff *hwpa_pkt_push_ipv4(struct sk_buff *skb); struct sk_buff *hwpa_pkt_push_ipv6(struct sk_buff *skb); struct sk_buff *hwpa_pkt_push_pppoe(struct sk_buff *skb); struct sk_buff *hwpa_pkt_push_vlan(struct sk_buff *skb); struct sk_buff *hwpa_pkt_push_eth(struct sk_buff *skb); struct sk_buff *hwpa_pkt_alloc(unsigned int payload); struct net_device *hwpa_get_netdev(avm_pid_handle pid);