msm: ipa: Add support for Private IP Forwarding

Changes for new uCP commands, and IOCTL to support this feature

Change-Id: Idd7de3f18fc557b54b3c2d965802065b3f6dd982
Signed-off-by: Krishna Nagaraja <quic_krisnag@quicinc.com>
This commit is contained in:
Krishna Nagaraja 2024-01-23 01:47:28 +05:30
parent dcdd3702c8
commit fd3f99504d
2 changed files with 40 additions and 1 deletions

View file

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _IPA_H_
@ -490,6 +491,17 @@ struct ipa_ep_cfg_seq {
int seq_type;
};
/**
* struct ipa_ep_cfg_ucp - uCP config register
* @command: Command ID at uCP, that the packets should hit
*
* @enable: 0 - Disabled
* 1- Enabled
*/
struct ipa_ep_cfg_ucp {
u16 command;
u32 enable;
};
/**
* struct ipa_ep_cfg_ulso - ULSO configurations
* @ipid_min_max_idx: A value in the range [0, 2]. Determines the registers

View file

@ -2,7 +2,7 @@
/*
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
*
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _UAPI_MSM_IPA_H_
@ -151,6 +151,7 @@
#define IPA_IOCTL_QUERY_CACHED_DRIVER_MSG 94
#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
/**
* max size of the header to be inserted
*/
@ -1755,6 +1756,27 @@ struct IpaDscpVlanPcpMap_t {
uint16_t vlan_s[IPA_EoGRE_MAX_VLAN * IPA_GRE_MAX_S_VLAN];
} __packed;
#define MAX_VLAN_CONFIGURE 16
enum pkt_path {
SW_PATH = 0,
HW_PATH_OUTSIDE_TUNNEL = 1,
HW_PATH_INSIDE_TUNNEL = 2
};
/* VLANID - Action - Tunnel_ID - MUX_ID */
struct singletag_mux_map_entry {
uint16_t vlan_id;
uint8_t mux_id;
uint8_t pkt_path;
uint32_t tunnel_id;
};
struct ipa_ioc_mux_mapping_table {
struct singletag_mux_map_entry map_entries[MAX_VLAN_CONFIGURE];
};
/**
* struct ipa_exception
*
@ -4077,6 +4099,11 @@ struct ipa_ioc_dscp_pcp_map_info {
IPA_IOCTL_ADD_DEL_DSCP_PCP_MAPPING, \
struct ipa_ioc_dscp_pcp_map_info)
#define IPA_IOC_SEND_VLAN_MUXID_MAPPING _IOWR(IPA_IOC_MAGIC, \
IPA_IOCTL_SEND_VLAN_MUXID_MAPPING, \
struct ipa_ioc_mux_mapping_table)
/*
* unique magic number of the Tethering bridge ioctls
*/