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>
This commit is contained in:
Weiyi Chen
2021-12-09 12:44:12 -08:00
zatwierdzone przez Kasiviswanathan, Subash Abhinov
rodzic 5eb9a7affc
commit d8ed8205d4
4 zmienionych plików z 17 dodań i 2 usunięć

Wyświetl plik

@@ -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 {

Wyświetl plik

@@ -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;

Wyświetl plik

@@ -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);

Wyświetl plik

@@ -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;