msm: ipa: Added an option to enable NAPI in 11ad

Added a flag in the 11ad driver to indicate if NAPI is
enabled in the LAN RX Datapath. In case the flag is true
the 11ad driver will now use napi_gro_receive instead of
netif_rx_ni, meaning the GRO feature is also enabled
with this change.

Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Change-Id: I5c6cb3e08c29c4b79cdcbc9e4d3acb485156a607
Signed-off-by: Amir Levy <alevy@codeaurora.org>
This commit is contained in:
Amir Levy 2019-09-23 17:18:58 +03:00
parent 75f385d864
commit e99481e0e2
4 changed files with 9 additions and 1 deletions

View file

@ -128,7 +128,7 @@ static void wil_ipa_rx(struct wil_ipa *ipa, struct sk_buff *skb)
stats = &wil->sta[cid].stats;
wil_netif_rx(skb, ndev, cid, stats, false);
wil_netif_rx(skb, ndev, cid, stats, ipa->lan_rx_napi);
return;
@ -901,6 +901,7 @@ static int wil_ipa_wigig_init(struct wil_ipa *ipa)
}
ipa->uc_db_pa = out.uc_db_pa;
ipa->lan_rx_napi = out.lan_rx_napi_enable;
return 0;

View file

@ -53,6 +53,7 @@ struct wil_ipa {
struct wil_ipa_rx_buf rx_buf; /* contiguous memory split into rx bufs */
struct msi_msg orig_msi_msg;
atomic_t outstanding_pkts;
u8 lan_rx_napi;
};
static inline bool wil_ipa_offload(void) {return ipa_offload; }

View file

@ -173,6 +173,10 @@ int ipa_wigig_init(struct ipa_wigig_init_in_params *in,
out->is_uc_ready = inout.is_uC_ready;
out->lan_rx_napi_enable = ipa_get_lan_rx_napi();
IPA_WIGIG_DBG("LAN RX NAPI enabled = %s\n",
out->lan_rx_napi_enable ? "True" : "False");
IPA_WIGIG_DBG("exit\n");
return 0;

View file

@ -39,10 +39,12 @@ struct ipa_wigig_init_in_params {
*
* @is_uC_ready: is uC ready. No API should be called until uC is ready.
* @uc_db_pa: physical address of IPA uC doorbell
* @lan_rx_napi_enable: if we use NAPI in the LAN rx
*/
struct ipa_wigig_init_out_params {
bool is_uc_ready;
phys_addr_t uc_db_pa;
bool lan_rx_napi_enable;
};
/*