diff options
author | Weiyi Chen <quic_weiyic@quicinc.com> | 2021-12-09 12:44:12 -0800 |
---|---|---|
committer | Kasiviswanathan, Subash Abhinov <quic_subashab@quicinc.com> | 2022-01-18 23:16:14 -0700 |
commit | d8ed8205d4e3f3c1f969dec4cb00dc55f8fd375c (patch) | |
tree | c80fc0ba13985a59be50399d4144ba2584dcdc3d | |
parent | 5eb9a7affccd0f87ac345c71302902cfdc566151 (diff) | |
download | data-kernel-d8ed8205d4e3f3c1f969dec4cb00dc55f8fd375c.tar.gz |
rmnet_core: LLC auto switch
Support auto switch of bearers to low latency channel.
Change-Id: I3bc029b9736b1c9f645db9f02a1d09ffe8bf1c2b
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
-rw-r--r-- | core/dfc_defs.h | 2 | ||||
-rw-r--r-- | core/dfc_qmap.c | 5 | ||||
-rw-r--r-- | core/dfc_qmi.c | 9 | ||||
-rw-r--r-- | core/qmi_rmnet_i.h | 3 |
4 files changed, 17 insertions, 2 deletions
diff --git a/core/dfc_defs.h b/core/dfc_defs.h index 2a30a29..f7c2715 100644 --- a/core/dfc_defs.h +++ b/core/dfc_defs.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef _DFC_DEFS_H @@ -55,6 +56,7 @@ struct dfc_flow_status_info_type_v01 { struct dfc_qos_id_type_v01 qos_ids[DFC_MAX_QOS_ID_V01]; u8 rx_bytes_valid; u32 rx_bytes; + u8 ll_status; }; struct dfc_ancillary_info_type_v01 { diff --git a/core/dfc_qmap.c b/core/dfc_qmap.c index 3019498..6412ffc 100644 --- a/core/dfc_qmap.c +++ b/core/dfc_qmap.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <net/pkt_sched.h> @@ -38,7 +39,8 @@ struct qmap_dfc_ind { u8 bearer_id; u8 tcp_bidir:1; u8 bearer_status:3; - u8 reserved4:4; + u8 ll_status:1; + u8 reserved4:3; __be32 grant; __be32 rx_bytes; u32 reserved6; @@ -146,6 +148,7 @@ static int dfc_qmap_handle_ind(struct dfc_qmi_data *dfc, qmap_flow_ind.flow_status[0].bearer_id = cmd->bearer_id; qmap_flow_ind.flow_status[0].num_bytes = ntohl(cmd->grant); qmap_flow_ind.flow_status[0].seq_num = ntohs(cmd->seq_num); + qmap_flow_ind.flow_status[0].ll_status = cmd->ll_status; if (cmd->rx_bytes_valid) { qmap_flow_ind.flow_status[0].rx_bytes_valid = 1; diff --git a/core/dfc_qmi.c b/core/dfc_qmi.c index 31eca82..0afe46e 100644 --- a/core/dfc_qmi.c +++ b/core/dfc_qmi.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1026,6 +1027,14 @@ static int dfc_update_fc_map(struct net_device *dev, struct qos_info *qos, if (itm->tx_off && fc_info->num_bytes > 0) return 0; + if (fc_info->ll_status && + itm->ch_switch.current_ch != RMNET_CH_LL) { + itm->ch_switch.current_ch = RMNET_CH_LL; + itm->ch_switch.auto_switched = true; + if (itm->mq_idx < MAX_MQ_NUM) + qos->mq[itm->mq_idx].is_ll_ch = RMNET_CH_LL; + } + /* Adjuste grant for query */ if (dfc_qmap && is_query) { adjusted_grant = dfc_adjust_grant(itm, fc_info); diff --git a/core/qmi_rmnet_i.h b/core/qmi_rmnet_i.h index d7f14c7..35dedd7 100644 --- a/core/qmi_rmnet_i.h +++ b/core/qmi_rmnet_i.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -62,6 +62,7 @@ struct rmnet_ch_switch { u8 switch_to_ch; u8 retry_left; u8 status_code; + bool auto_switched; enum rmnet_ch_switch_state state; __be32 switch_txid; u32 flags; |