Merge "msm_ipa: new structure for tunnel design for uC"

This commit is contained in:
qctecmdr 2024-03-14 10:59:04 -07:00 • committed by Gerrit - the friendly Code Review server
commit 4e18d32a35

View file

@ -152,6 +152,8 @@
#define IPA_IOCTL_SET_EXT_ROUTER_MODE 95
#define IPA_IOCTL_ADD_DEL_DSCP_PCP_MAPPING 96
#define IPA_IOCTL_SEND_VLAN_MUXID_MAPPING 97
#define IPA_IOCTL_SEND_TUNNEL_TEMPLATE_INFO 98
#define IPA_IOCTL_QUERY_TUNNEL_FEATURE 99
/**
* max size of the header to be inserted
*/
@ -1776,6 +1778,104 @@ struct ipa_ioc_mux_mapping_table {
struct singletag_mux_map_entry map_entries[MAX_VLAN_CONFIGURE];
};
/* Feature Type Supported Design*/
/* Cache all Design Support with Regular HPS for both EoGRE and MPLSoGRE tunnel */
#define DEFAULT_FEATURE 0x00
/* EoGRE to support Single Tag packet with new HPS */
#define SINGLE_TAG_FEATURE 0x01
/* MPLSoGRE to support Double Tag packet with new HPS */
#define DOUBLE_TAG_FEATURE 0x02
/* EoGRE to support UnTag packet with new HPS */
#define UNTAG_FEATURE 0x03
/* l2 header is adjusted for every hwp_pkt_next_action */
/* uc evaluate l2 header length and send packet to exception */
#define SW_PATH_ADJ_L2_EXCEPTION 0x00
/* uc evaluate l2 header length and send packet to 2nd pass */
#define HW_PATH_ADJ_L2_RESUME_2ND_PASS 0x01
/* uc evaluate l2 header length, update the metadata and send packet to 2nd pass */
#define HW_PATH_ADJ_L2_METADATA_UPDATE_RESUME_2ND_PASS 0x02
/* uc evaluate l2 header length, add outer header and send packet to 2nd pass */
#define HW_PATH_ADJ_L2_ADD_TUNNEL_RESUME_2ND_PASS 0x03
/* uc evaluate l2 header, update metadata, add outer header and send packet to 2nd pass */
#define HW_PATH_ADJ_L2_ADD_TUNNEL_WITH_METADATA_UPDATE_RESUME_2ND_PASS 0x04
/* untagged packet configuration */
struct untag_pkt_config_t {
/* packet action that should follow untag packet */
uint32_t action_configured;
/* pdn from which untag packet should transfer */
uint8_t mux_id;
/* flag if 1=>pkt_with_option_hdr 0=>pkt_without_option_hdr */
uint8_t is_v6_options_hdr_present;
uint16_t pad0; /*for alignment*/
/* lower 32 bit of tunnel header address */
uint32_t *tunnel_template_addr;
uint32_t pad1; /*for alignment*/
} __packed;
/* vlanid - action - tunnel_id - mux_id */
struct singletag_mux_mapping_table_t {
/* multi tunnel purpose */
uint16_t vlan_id_start;
uint16_t vlan_id_end;
uint32_t action_configured;
/* pdn from which untag packet should transfer */
uint8_t mux_id;
/* flag if 1=>pkt_with_option_hdr 0=>pkt_without_option_hdr */
uint8_t is_v6_options_hdr_present;
uint16_t pad0; /*for alignment*/
uint32_t *tunnel_template_addr;
} __packed;
struct doubletag_mux_mapping_table_t {
/* multi tunnel purpose */
uint16_t stag_id_start;
uint16_t stag_id_end;
uint16_t ctag_id_start;
uint16_t ctag_id_end;
uint32_t action_configured;
/* pdn from which untag packet should transfer */
uint8_t mux_id;
/* flag if 1=>pkt_with_option_hdr 0=>pkt_without_option_hdr */
uint8_t is_v6_options_hdr_present;
uint16_t pad0; /*for alignment*/
uint32_t *tunnel_template_addr;
uint32_t pad1; /*for alignment*/
} __packed;
/* max template side pass to uc */
#define MAX_TEMPLATE_SIZE 64
/* max number of tunnel to support ie: per PDN two tunnel (2*8)*/
#define MAX_TUNNEL_SUPPORT 16
/* configuration table */
struct tunnel_protocols_config_table_t {
struct untag_pkt_config_t untagged_mapping_table;
uint8_t num_of_single_tag_configs;
uint8_t pad0; /*for alignment*/
uint16_t pad1; /*for alignment*/
uint32_t pad2; /*for alignment*/
/* table for single tag pkt */
struct singletag_mux_mapping_table_t singletag_mux_mapping_table[MAX_TUNNEL_SUPPORT];
uint8_t num_of_double_tag_configs;
uint8_t pad3; /*for alignment*/
uint16_t pad4; /*for alignment*/
uint32_t pad5; /*for alignment*/
/* table for double tag pkt */
struct doubletag_mux_mapping_table_t doubletag_mux_mapping_table[MAX_TUNNEL_SUPPORT];
};
/* ioctl tunnel configuration table */
struct ipa_ioc_tunnel_template_info {
uint8_t template_header[MAX_TEMPLATE_SIZE];
uint32_t template_len;
uint32_t template_type;
/*tunnel configuration table*/
struct tunnel_protocols_config_table_t tunnel_config;
};
/**
* struct ipa_exception
@ -4103,6 +4203,14 @@ struct ipa_ioc_dscp_pcp_map_info {
IPA_IOCTL_SEND_VLAN_MUXID_MAPPING, \
struct ipa_ioc_mux_mapping_table)
#define IPA_IOC_SEND_TUNNEL_TEMPLATE_INFO _IOW(IPA_IOC_MAGIC, \
IPA_IOCTL_SEND_TUNNEL_TEMPLATE_INFO, \
struct ipa_ioc_tunnel_template_info)
#define IPA_IOC_QUERY_TUNNEL_FEATURE _IOW(IPA_IOC_MAGIC, \
IPA_IOCTL_QUERY_TUNNEL_FEATURE, \
uint8_t)
/*
* unique magic number of the Tethering bridge ioctls