Hi Marek,

>>
>> That's good :) Actually kernel will take care of freeing skb when
>driver submits received packet using netif_rx(). Could you please share
>your hack?
>Yes it should be freed when netif_rx() is processed but I have feeling
>that sometimes (my case) during high load (-b 100m) packets are not send
>to kernel (not free skb) until skb allocation fails. I need to better
>understand 11n reordering code :).

Rx reorder logic can buffer upto 32 packets, if they aren't received in correct 
order. You are right. Your platform may run out of memory in this case.
Could you please check if the problem fixes with any of the attached changes?
1) Change Rx window size from 32 to 8.
2) Disable AMPDU feature.

>
>Hack (it's dirty I know but packets of that size are send only during
>iperf session):
>
>diff --git a/drivers/net/wireless/mwifiex/usb.c
>b/drivers/net/wireless/mwifiex/usb.c
>index f90fe21..cc548a1 100644
>--- a/drivers/net/wireless/mwifiex/usb.c
>+++ b/drivers/net/wireless/mwifiex/usb.c
>@@ -178,6 +178,12 @@ static void mwifiex_usb_rx_complete(struct urb
>*urb)
>                dev_dbg(adapter->dev, "info: recv_length=%d,
>status=%d\n",
>                        recv_length, status);
>                if (status == -EINPROGRESS) {
>+
>+                       if (skb->len >= 1574) {
>+                               dev_kfree_skb_any(skb);
>+                               goto setup_for_next;
>+                       }
>+

The change doesn't look correct. The skb is being processed/used. We cannot 
free it here. This may create problem.

Regards,
Amit

Attachment: disable_ampdu_feature.diff
Description: disable_ampdu_feature.diff

Attachment: reduce_Rx_window_size.diff
Description: reduce_Rx_window_size.diff

Reply via email to