RE: [PATCH net-next RFC] net: increase LL_MAX_HEADER for Hyper-V

From: KY Srinivasan
Date: Thu Sep 17 2015 - 15:53:35 EST




> -----Original Message-----
> From: David Miller [mailto:davem@xxxxxxxxxxxxx]
> Sent: Thursday, September 17, 2015 11:52 AM
> To: KY Srinivasan <kys@xxxxxxxxxxxxx>
> Cc: David.Laight@xxxxxxxxxx; alexander.duyck@xxxxxxxxx; Haiyang Zhang
> <haiyangz@xxxxxxxxxxxxx>; vkuznets@xxxxxxxxxx; netdev@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; jasowang@xxxxxxxxxx
> Subject: Re: [PATCH net-next RFC] net: increase LL_MAX_HEADER for Hyper-V
>
> From: KY Srinivasan <kys@xxxxxxxxxxxxx>
> Date: Thu, 17 Sep 2015 15:14:05 +0000
>
> > I think I can achieve my original goal of not having any allocation
> > in the send path by carefully using the memory available in the skb:
>
> Please stop flat-out ignoring David L.'s suggestion.

I am sorry; I did not mean to convey that impression.

>
> Have a pre-cooked ring of buffers for these descriptors that you can
> point the chip at. No per-packet allocation is necessary at all.

Even if I had a ring of buffers, I would still need to manage the life cycle
of these buffers - selecting an unused one on the transmit path and marking
it used (atomically). Once the transmit completes (as indicated by the transmit complete
callback) this buffer needs to be marked free. I can certainly make these operations
efficient and lock-free, but they are still at some level an allocation/free
operation albeit potentially more efficient than having the kernel allocate the memory.

>
> If you play games with SKBs you will get burned.

I will implement Dave L's suggestion. However, I am curious as to why you would consider
my proposed usage of the skb headroom and the control buffer area in skb as non-standard
usage.

Regards,

K. Y



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/