/* SPDX-License-Identifier: GPL-2.0+ */ enum hwpa_backend_rv { HWPA_BACKEND_SUCCESS, /* required */ HWPA_BACKEND_ERR_INTERNAL, HWPA_BACKEND_ERR_MULTIPLE_EGRESS, HWPA_BACKEND_ERR_NAT_CONFLICT, HWPA_BACKEND_ERR_ACT_CONFLICT, HWPA_BACKEND_ERR_PID_NODEV, HWPA_BACKEND_ERR_PID_UNREACHABLE, HWPA_BACKEND_ERR_VLAN_FULL, HWPA_BACKEND_ERR_VLAN_CONFLICT, HWPA_BACKEND_ERR_PPPOE_MODIFY, HWPA_BACKEND_ERR_GSW_REMOVE, HWPA_BACKEND_ERR_GSW_PCE_RULE, HWPA_BACKEND_ERR_GSW_CFG, HWPA_BACKEND_ERR_GSW_EGVLAN, HWPA_BACKEND_ERR_GSW_MTU_FULL, HWPA_BACKEND_ERR_GSW_PPPOE_FULL, HWPA_BACKEND_ERR_GSW_RTP_FULL, HWPA_BACKEND_ERR_GSW_IP_FULL, HWPA_BACKEND_ERR_GSW_MAC_FULL, HWPA_BACKEND_ERR_GSW_RT_SESS_FULL, HWPA_BACKEND_ERR_GSW_RT_COLL_FULL, HWPA_BACKEND_ERR_GSW_TUN, HWPA_BACKEND_ERR_GSW_UNKNOWN, HWPA_BACKEND_ERR_SESSION_MALFORMED, HWPA_BACKEND_ERR_HANDLE_INVALID, HWPA_BACKEND_ERR_LRO_FULL, HWPA_BACKEND_RV_LAST /* required */ }; #define HWPA_BACKEND_RV_DESC_INITIALIZER \ {\ [HWPA_BACKEND_SUCCESS] = "success",\ \ [HWPA_BACKEND_ERR_INTERNAL] = "internal error",\ [HWPA_BACKEND_ERR_MULTIPLE_EGRESS] = "unsupported multicast",\ [HWPA_BACKEND_ERR_NAT_CONFLICT] = "snat/dnat conflict",\ [HWPA_BACKEND_ERR_ACT_CONFLICT] = "nat/pppoe/tun directional conflict",\ [HWPA_BACKEND_ERR_PID_NODEV] = "pid without netdevice",\ [HWPA_BACKEND_ERR_PID_UNREACHABLE] = "pid not known to datapath driver",\ [HWPA_BACKEND_ERR_VLAN_FULL] = "vlan table full",\ [HWPA_BACKEND_ERR_VLAN_CONFLICT] = "vlan subif mapping conflict",\ [HWPA_BACKEND_ERR_PPPOE_MODIFY] = "unsupported PPPoE modification",\ \ [HWPA_BACKEND_ERR_GSW_REMOVE] = "session remove fail",\ [HWPA_BACKEND_ERR_GSW_PCE_RULE] = "PCE rule write/alloc fail",\ [HWPA_BACKEND_ERR_GSW_CFG] = "switch configuration fail",\ [HWPA_BACKEND_ERR_GSW_EGVLAN] = "error accessing EGVLAN",\ [HWPA_BACKEND_ERR_GSW_MTU_FULL] = "MTU table full",\ [HWPA_BACKEND_ERR_GSW_PPPOE_FULL] = "PPPoE table full",\ [HWPA_BACKEND_ERR_GSW_RTP_FULL] = "RTP table full",\ [HWPA_BACKEND_ERR_GSW_IP_FULL] = "IP table full",\ [HWPA_BACKEND_ERR_GSW_MAC_FULL] = "MAC table full",\ [HWPA_BACKEND_ERR_GSW_RT_SESS_FULL] = "Routing table full",\ [HWPA_BACKEND_ERR_GSW_RT_COLL_FULL] = "Routing table collision limit",\ [HWPA_BACKEND_ERR_GSW_TUN] = "Tunnel setup failed/unsupported",\ [HWPA_BACKEND_ERR_GSW_UNKNOWN] = "unspecified switch_api error",\ \ [HWPA_BACKEND_ERR_SESSION_MALFORMED] = "Unexpected avm_pa session structure",\ [HWPA_BACKEND_ERR_HANDLE_INVALID] = "Invalid session handle",\ \ [HWPA_BACKEND_ERR_LRO_FULL] = "LRO sessions full",\ } /* No encapsulation for L2 frames */ #define HWPA_VALID_L3_L2ENCAP #define HWPA_VALID_L3_L3ENCAP \ /* dslite */ \ { { .type = AVM_PA_IPV6 }, \ { .type = AVM_PA_IPV4 }, \ { .type = AVM_PA_PORTS }, \ { .type = AVM_PA_NUM_MATCH_TYPES } }, \ \ /* 6rd */ \ { { .type = AVM_PA_IPV4 }, \ { .type = AVM_PA_IPV6 }, \ { .type = AVM_PA_PORTS }, \ { .type = AVM_PA_NUM_MATCH_TYPES } }, int try_to_accelerate(avm_pid_handle pid_handle, struct sk_buff *skb);