[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1439994127.6610.12.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 19 Aug 2015 07:22:07 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Emmanuel Grumbach <emmanuel.grumbach@...el.com>
Cc: linux-wireless@...r.kernel.org, ido@...ery.com,
netdev@...r.kernel.org
Subject: Re: [RFC v2 1/3] iwlwifi: mvm: add real TSO implementation
On Wed, 2015-08-19 at 07:17 -0700, Eric Dumazet wrote:
> On Wed, 2015-08-19 at 15:59 +0300, Emmanuel Grumbach wrote:
> > The segmentation is done completely in software. The
> > driver creates several MPDUs out of a single large send.
> > Each MPDU is a newly allocated SKB.
> > A page is allocated to create the headers that need to be
> > duplicated (SNAP / IP / TCP). The WiFi header is in the
> > header of the newly created SKBs.
> >
> > type=feature
> >
> > Change-Id: I238ffa79cacc5bbdacdfbf3e9673c8d4f02b462a
> > Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@...el.com>
> > ---
> > drivers/net/wireless/iwlwifi/mvm/tx.c | 513 +++++++++++++++++++++++++++++++---
> > 1 file changed, 481 insertions(+), 32 deletions(-)
>
> Ouch dynamic allocations while doing xmit are certainly not needed.
> Your driver should pre-allocated space for headers.
>
> Drivers willing to implement tso have to use net/core/tso.c provided
> helpers.
>
> $ git grep -n tso_build_hdr
> drivers/net/ethernet/cavium/thunder/nicvf_queues.c:1030: tso_build_hdr(skb, hdr, &tso, data_left, total_len == 0);
> drivers/net/ethernet/freescale/fec_main.c:729: tso_build_hdr(skb, hdr, &tso, data_left, total_len == 0);
> drivers/net/ethernet/marvell/mv643xx_eth.c:842: tso_build_hdr(skb, hdr, &tso, data_left, total_len == 0);
> drivers/net/ethernet/marvell/mvneta.c:1650: tso_build_hdr(skb, hdr, &tso, data_left, total_len == 0);
> include/net/tso.h:15:void tso_build_hdr(struct sk_buff *skb, char *hdr, struct tso_t *tso,
> net/core/tso.c:14:void tso_build_hdr(struct sk_buff *skb, char *hdr, struct tso_t *tso,
> net/core/tso.c:37:EXPORT_SYMBOL(tso_build_hdr);
>
Look at commit 2adb719d74f6e174071e5c913290b9bbd8c2c0e8 for a typical
use of these helpers.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists