diff options
| -rw-r--r-- | include/uapi/linux/msm_ipa.h | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/include/uapi/linux/msm_ipa.h b/include/uapi/linux/msm_ipa.h index 51569b7e7aa0..cbd6731aff43 100644 --- a/include/uapi/linux/msm_ipa.h +++ b/include/uapi/linux/msm_ipa.h @@ -68,7 +68,9 @@ #define IPA_IOCTL_ADD_RT_RULE_AFTER 43 #define IPA_IOCTL_ADD_FLT_RULE_AFTER 44 #define IPA_IOCTL_GET_HW_VERSION 45 -#define IPA_IOCTL_MAX 46 +#define IPA_IOCTL_ADD_RT_RULE_EXT 46 +#define IPA_IOCTL_NAT_MODIFY_PDN 47 +#define IPA_IOCTL_MAX 48 /** * max size of the header to be inserted @@ -127,6 +129,11 @@ #define IPA_FLT_MAC_ETHER_TYPE (1ul << 21) /** + * maximal number of NAT PDNs in the PDN config table + */ +#define IPA_MAX_PDN_NUM 5 + +/** * enum ipa_client_type - names for the various IPA "clients" * these are from the perspective of the clients, for e.g. * HSIC1_PROD means HSIC client is the producer and IPA is the @@ -454,6 +461,7 @@ enum ipa_rm_resource_name { * @IPA_HW_v3_1: IPA hardware version 3.1 * @IPA_HW_v3_5: IPA hardware version 3.5 * @IPA_HW_v3_5_1: IPA hardware version 3.5.1 + * @IPA_HW_v4_0: IPA hardware version 4.0 */ enum ipa_hw_type { IPA_HW_None = 0, @@ -468,8 +476,11 @@ enum ipa_hw_type { IPA_HW_v3_1 = 11, IPA_HW_v3_5 = 12, IPA_HW_v3_5_1 = 13, - IPA_HW_MAX + IPA_HW_v4_0 = 14, }; +#define IPA_HW_MAX (IPA_HW_v4_0 + 1) + +#define IPA_HW_v4_0 IPA_HW_v4_0 /** * struct ipa_rule_attrib - attributes of a routing/filtering @@ -670,6 +681,11 @@ struct ipa_ipfltri_rule_eq { * consecutive packets * @rule_id: rule_id to be assigned to the filter rule. In case client specifies * rule_id as 0 the driver will assign a new rule_id + * @set_metadata: bool switch. should metadata replacement at the NAT block + * take place? + * @pdn_idx: if action is "pass to source\destination NAT" then a comparison + * against the PDN index in the matching PDN entry will take place as an + * additional condition for NAT hit. */ struct ipa_flt_rule { uint8_t retain_hdr; @@ -683,6 +699,8 @@ struct ipa_flt_rule { uint8_t max_prio; uint8_t hashable; uint16_t rule_id; + uint8_t set_metadata; + uint8_t pdn_idx; }; /** @@ -1359,6 +1377,20 @@ struct ipa_ioc_nat_dma_cmd { }; /** +* struct ipa_ioc_nat_pdn_entry - PDN entry modification data +* @pdn_index: index of the entry in the PDN config table to be changed +* @public_ip: PDN's public ip +* @src_metadata: PDN's source NAT metadata for metadata replacement +* @dst_metadata: PDN's destination NAT metadata for metadata replacement +*/ +struct ipa_ioc_nat_pdn_entry { + uint8_t pdn_index; + uint32_t public_ip; + uint32_t src_metadata; + uint32_t dst_metadata; +}; + +/** * struct ipa_msg_meta - Format of the message meta-data. * @msg_type: the type of the message * @rsvd: reserved bits for future use. @@ -1580,6 +1612,9 @@ enum ipacm_client_enum { #define IPA_IOC_GET_NAT_OFFSET _IOWR(IPA_IOC_MAGIC, \ IPA_IOCTL_GET_NAT_OFFSET, \ uint32_t *) +#define IPA_IOC_NAT_MODIFY_PDN _IOWR(IPA_IOC_MAGIC, \ + IPA_IOCTL_NAT_MODIFY_PDN, \ + struct ipa_ioc_nat_pdn_entry *) #define IPA_IOC_SET_FLT _IOW(IPA_IOC_MAGIC, \ IPA_IOCTL_SET_FLT, \ uint32_t) |
