
Packets are now sent over a dedicated MHI channel when indicated by the DFC driver. New dedicated channel is controlled by rmnet driver. Buffers are allocated and supplied to it as needed from a recyclable pool for RX on the channel, and packets will be sent to it and freed manually once the channel indicates that they have been sent. Low latency packets can be aggregated like standard QMAP packets, but have their own aggregation state to prevent mixing default and low latency flows, and to allow each type of flow to use their own send functions (i.e. dev_queue_xmit() versus rmnet_ll_send_skb()). Low latency packets also have their own load-balancing scheme, and do not need to use the SHS module for balancing. To facilitate this, we mark the low latency packets with a non-zero priority value upon receipt from the MHI chainnel and avoid sending any such marked packets to the SHS ingress hook. DFC has been updated with a new netlink message type to handle swapping a list of bearers from one channel to another. The actual swap is performed asynchronously, and separate netlink ACKs will be sent to the userspace socket when the switch has been completed. Change-Id: I93861d4b004f399ba203d76a71b2f01fa5c0d5d2 Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
71 lines
1.6 KiB
C
71 lines
1.6 KiB
C
/* Copyright (c) 2020-2021 The Linux Foundation. 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
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* RmNet Low Latency channel handlers
|
|
*/
|
|
|
|
#ifndef __RMNET_LL_H__
|
|
#define __RMNET_LL_H__
|
|
|
|
#include <linux/skbuff.h>
|
|
|
|
struct rmnet_ll_stats {
|
|
u64 tx_queue;
|
|
u64 tx_queue_err;
|
|
u64 tx_complete;
|
|
u64 tx_complete_err;
|
|
u64 rx_queue;
|
|
u64 rx_queue_err;
|
|
u64 rx_status_err;
|
|
u64 rx_null;
|
|
u64 rx_oom;
|
|
u64 rx_pkts;
|
|
u64 rx_tmp_allocs;
|
|
};
|
|
|
|
#if IS_ENABLED(CONFIG_MHI_BUS)
|
|
|
|
int rmnet_ll_send_skb(struct sk_buff *skb);
|
|
struct rmnet_ll_stats *rmnet_ll_get_stats(void);
|
|
int rmnet_ll_init(void);
|
|
void rmnet_ll_exit(void);
|
|
|
|
#else
|
|
|
|
static struct rmnet_ll_stats rmnet_ll_dummy_stats;
|
|
|
|
static inline int rmnet_ll_send_skb(struct sk_buff *skb)
|
|
{
|
|
return -EINVAL;
|
|
}
|
|
|
|
static inline struct rmnet_ll_stats *rmnet_ll_get_stats(void)
|
|
{
|
|
return &rmnet_ll_dummy_stats;
|
|
}
|
|
|
|
static inline int rmnet_ll_init(void)
|
|
{
|
|
/* Allow configuration to continue. Nothing else will happen since all
|
|
* this does is register the driver with the mhi framework, and if the
|
|
* channel never comes up, we don't do anything.
|
|
*/
|
|
return 0;
|
|
}
|
|
|
|
static inline void rmnet_ll_exit(void)
|
|
{
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|