qcacld-3.0: Disable LRO capability during concurrency
LRO rx jumbo packets cannot be forwarded to other vdev and kernel drops them with warning message: "skbuff: wlan0: received packets cannot be forwarded while LRO is enabled" So disable LRO capability during concurrency. Change-Id: Ib35e1ee5f9c18a846e21ce1eb293e12e17761fa8 CRs-Fixed: 1092193
This commit is contained in:

committed by
snandini

parent
a1f6dacf0c
commit
7b6cb00b26
@@ -174,6 +174,8 @@ struct cds_log_complete {
|
||||
bool recovery_needed;
|
||||
};
|
||||
|
||||
/* forward-declare hdd_context_s as it is used ina function type */
|
||||
struct hdd_context_s;
|
||||
typedef struct _cds_context_type {
|
||||
/* Scheduler Context */
|
||||
cds_sched_context qdf_sched;
|
||||
|
@@ -50,6 +50,7 @@ int hdd_lro_init(struct hdd_context *hdd_ctx);
|
||||
enum hdd_lro_rx_status hdd_lro_rx(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter, struct sk_buff *skb);
|
||||
void hdd_lro_display_stats(struct hdd_context *hdd_ctx);
|
||||
void hdd_disable_lro_in_concurrency(bool);
|
||||
#else
|
||||
static inline int hdd_lro_init(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
@@ -65,5 +66,9 @@ static inline enum hdd_lro_rx_status hdd_lro_rx(struct hdd_context *hdd_ctx,
|
||||
static inline void hdd_lro_display_stats(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void hdd_disable_lro_in_concurrency(bool disable)
|
||||
{
|
||||
}
|
||||
#endif /* FEATURE_LRO */
|
||||
#endif /* __WLAN_HDD_LRO_H__ */
|
||||
|
@@ -1763,6 +1763,7 @@ struct hdd_context {
|
||||
bool imps_enabled;
|
||||
int user_configured_pkt_filter_rules;
|
||||
bool is_fils_roaming_supported;
|
||||
qdf_atomic_t disable_lro_in_concurrency;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -86,7 +86,7 @@ int hdd_lro_init(struct hdd_context *hdd_ctx)
|
||||
if ((!hdd_ctx->config->lro_enable) &&
|
||||
(hdd_napi_enabled(HDD_NAPI_ANY) == 0)) {
|
||||
hdd_warn("LRO and NAPI are both disabled");
|
||||
return 0;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
lro_config.lro_enable = 1;
|
||||
@@ -141,9 +141,13 @@ enum hdd_lro_rx_status hdd_lro_rx(struct hdd_context *hdd_ctx,
|
||||
qdf_lro_ctx_t ctx;
|
||||
enum hdd_lro_rx_status status = HDD_LRO_NO_RX;
|
||||
|
||||
if ((adapter->dev->features & NETIF_F_LRO) &&
|
||||
QDF_NBUF_CB_RX_TCP_PROTO(skb) &&
|
||||
!QDF_NBUF_CB_RX_PEER_CACHED_FRM(skb)) {
|
||||
if (((adapter->dev->features & NETIF_F_LRO) != NETIF_F_LRO) ||
|
||||
!QDF_NBUF_CB_RX_TCP_PROTO(skb) ||
|
||||
QDF_NBUF_CB_RX_PEER_CACHED_FRM(skb) ||
|
||||
qdf_atomic_read(&hdd_ctx->disable_lro_in_concurrency))
|
||||
return HDD_LRO_NO_RX;
|
||||
|
||||
{
|
||||
struct qdf_lro_info info;
|
||||
struct net_lro_desc *lro_desc = NULL;
|
||||
struct hif_opaque_softc *hif_hdl =
|
||||
@@ -200,3 +204,19 @@ void hdd_lro_display_stats(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
hdd_debug("LRO stats is broken, will fix it");
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_disable_lro_in_concurrency() - Disable LRO due to concurrency
|
||||
* @disable: bool value
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hdd_disable_lro_in_concurrency(bool disable)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
|
||||
if (disable)
|
||||
qdf_atomic_set(&hdd_ctx->disable_lro_in_concurrency, 1);
|
||||
else
|
||||
qdf_atomic_set(&hdd_ctx->disable_lro_in_concurrency, 0);
|
||||
}
|
||||
|
@@ -9313,6 +9313,7 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter)
|
||||
uint32_t num_abg_tx_chains = 0;
|
||||
uint32_t num_11b_tx_chains = 0;
|
||||
uint32_t num_11ag_tx_chains = 0;
|
||||
struct policy_mgr_dp_cbacks dp_cbs = {0};
|
||||
|
||||
if (hdd_ctx->config->sifs_burst_duration) {
|
||||
set_value = (SIFS_BURST_DUR_MULTIPLIER) *
|
||||
@@ -9406,6 +9407,13 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter)
|
||||
if (ret)
|
||||
goto cds_disable;
|
||||
|
||||
dp_cbs.hdd_disable_lro_in_concurrency = hdd_disable_lro_in_concurrency;
|
||||
status = policy_mgr_register_dp_cb(hdd_ctx->hdd_psoc, &dp_cbs);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_debug("LRO disbaled, failed to register with policy mgr");
|
||||
goto cds_disable;
|
||||
}
|
||||
|
||||
if (hdd_enable_egap(hdd_ctx))
|
||||
hdd_debug("enhance green ap is not enabled");
|
||||
|
||||
|
Reference in New Issue
Block a user