@@ -4,8 +4,6 @@
ql_build_rx_skb(). That function is now used exclusively to handle packets
that underwent header splitting but it still contains code to handle non
split cases.
-* in the "chain of large buffers" case, the driver uses an skb allocated with
- head room but only puts data in the frags.
* rename "rx" queues to "completion" queues. Calling tx completion queues "rx
queues" is confusing.
* struct rx_ring is used for rx and tx completions, with some members relevant
@@ -1471,7 +1471,7 @@ static void qlge_process_mac_rx_page(struct qlge_adapter *qdev,
struct napi_struct *napi = &rx_ring->napi;
size_t hlen = ETH_HLEN;
- skb = netdev_alloc_skb(ndev, length);
+ skb = napi_alloc_skb(&rx_ring->napi, SMALL_BUFFER_SIZE);
if (!skb) {
rx_ring->rx_dropped++;
put_page(lbq_desc->p.pg_chunk.page);
@@ -1765,7 +1765,7 @@ static struct sk_buff *qlge_build_rx_skb(struct qlge_adapter *qdev,
* jumbo mtu on a non-TCP/UDP frame.
*/
lbq_desc = qlge_get_curr_lchunk(qdev, rx_ring);
- skb = netdev_alloc_skb(qdev->ndev, length);
+ skb = napi_alloc_skb(&rx_ring->napi, SMALL_BUFFER_SIZE);
if (!skb) {
netif_printk(qdev, probe, KERN_DEBUG, qdev->ndev,
"No skb available, drop the packet.\n");
Data is put in the fragments. No need to alloc a skb with unnecessarily large data buffer. Suggested-by: Benjamin Poirier <benjamin.poirier@gmail.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> --- drivers/staging/qlge/TODO | 2 -- drivers/staging/qlge/qlge_main.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-)