All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Ho Jie Feng <hjf3108@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH rtw-next 4/5] wifi: rtlwifi: rtl8192du: enable USB RX aggregation
Date: Mon, 9 Nov 2026 01:44:49 +0000	[thread overview]
Message-ID: <e826d25ce74e4d839f2719509494c129@realtek.com> (raw)
In-Reply-To: <20261103095256.949327-5-hjf3108@gmail.com>

Ho Jie Feng <hjf3108@gmail.com> wrote:
> Allow RX aggregation of up to 48 pages of 128 bytes or 24 with two MACs.

You can describe a little bit how you build separate skb, especially
the last one. 

> 
> Test results (2.4 GHz):
>    before after
> TX 5.2    6.4
> RX 27.1   32.0
> 
> Signed-off-by: Ho Jie Feng <hjf3108@gmail.com>

Acked-by is given, but some minor comments.

Acked-by: Ping-Ke Shih <pkshih@realtek.com>

> +void rtl92du_rx_segregate_hdl(struct ieee80211_hw *hw, struct sk_buff *skb,
> +                             struct sk_buff_head *queue)
> +{
> +       struct rtl_priv *rtlpriv = rtl_priv(hw);
> +       unsigned int offset = 0, pkt_size;
> +       struct sk_buff *new_skb;
> +       __le32 *rxdesc;
> +
> +       while (skb->len - offset >= RTL_RX_DESC_SIZE) {
> +               rxdesc = (__le32 *)(skb->data + offset);
> +               pkt_size = RTL_RX_DESC_SIZE +
> +                          get_rx_desc_drv_info_size(rxdesc) *
> +                          RX_DRV_INFO_SIZE_UNIT +
> +                          get_rx_desc_shift(rxdesc) +
> +                          get_rx_desc_pkt_len(rxdesc);
> +
> +               if (get_rx_desc_pkt_len(rxdesc) == 0 ||
> +                   pkt_size > skb->len - offset) {
> +                       rtl_dbg(rtlpriv, COMP_RECV, DBG_WARNING,
> +                               "bad frame at %u of %u, size %u\n",
> +                               offset, skb->len, pkt_size);
> +                       break;
> +               }
> +
> +               /* The last frame keeps the original skb. */
> +               if (ALIGN(pkt_size, RTL92DU_RX_AGG_ALIGN) >= skb->len - offset) {
> +                       skb_pull(skb, offset);
> +                       skb_trim(skb, pkt_size);
> +                       __skb_queue_tail(queue, skb);
> +                       return;
> +               }
> +
> +               new_skb = dev_alloc_skb(pkt_size + RTL92DU_RX_HEADROOM);

What is the purpose of RTL92DU_RX_HEADROOM ?

> +               if (!new_skb)
> +                       break;
> +               skb_reserve(new_skb, RTL92DU_RX_HEADROOM);
> +               skb_put_data(new_skb, rxdesc, pkt_size);
> +               __skb_queue_tail(queue, new_skb);
> +
> +               offset += ALIGN(pkt_size, RTL92DU_RX_AGG_ALIGN);
> +       }
> +
> +       dev_kfree_skb_any(skb);
> +}
> +



  reply	other threads:[~2026-11-09  1:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03  9:52 [PATCH rtw-next 0/5] wifi: rtlwifi: rtl8192du fixes and additional support Ho Jie Feng
2026-11-03  9:52 ` [PATCH rtw-next 1/5] wifi: rtlwifi: rc: start no BA session for QoS null frames Ho Jie Feng
2026-11-08  4:08   ` Ping-Ke Shih
2026-11-08 18:11     ` Jie Feng
2026-11-09  2:49       ` Ping-Ke Shih
2026-11-03  9:52 ` [PATCH rtw-next 2/5] wifi: rtlwifi: rtl8192d: report no signal for frames without PHY status Ho Jie Feng
2026-11-08  4:13   ` Ping-Ke Shih
2026-11-08 18:12     ` Jie Feng
2026-11-09  2:51       ` Ping-Ke Shih
2026-11-03  9:52 ` [PATCH rtw-next 3/5] wifi: rtlwifi: usb: unify the RX code path Ho Jie Feng
2026-11-09  0:40   ` Ping-Ke Shih
2026-11-03  9:52 ` [PATCH rtw-next 4/5] wifi: rtlwifi: rtl8192du: enable USB RX aggregation Ho Jie Feng
2026-11-09  1:44   ` Ping-Ke Shih [this message]
2026-11-09  1:53     ` Jie Feng
2026-11-09  2:02       ` Ping-Ke Shih
2026-11-03  9:52 ` [PATCH rtw-next 5/5] wifi: rtlwifi: rtl8192d: let the firmware use all rates Ho Jie Feng
2026-11-09  1:56   ` Ping-Ke Shih
2026-11-09  2:44     ` Jie Feng
2026-11-09  2:58       ` Ping-Ke Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e826d25ce74e4d839f2719509494c129@realtek.com \
    --to=pkshih@realtek.com \
    --cc=hjf3108@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rtl8821cerfe2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.