From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
davem@davemloft.net, netdev@vger.kernel.org, gospo@redhat.com,
sassmann@redhat.com
Subject: Re: [net-next 02/11] ixgbe: Mask off check of frag_off as we only want fragment offset
Date: Fri, 12 Apr 2013 14:05:41 -0700 [thread overview]
Message-ID: <51687725.5060008@intel.com> (raw)
In-Reply-To: <1365798584.4459.70.camel@edumazet-glaptop>
On 04/12/2013 01:29 PM, Eric Dumazet wrote:
> On Fri, 2013-04-12 at 13:12 -0700, Alexander Duyck wrote:
>
>> I think part of the trouble is we are debating reworking the wrong
>> function. We would probably be better off if we could come up with a
>> generic way to handle the ixgbe_pull_tail function. I think the only
>> complaint I would have in using the __skb_get_poff in there is the fact
>> that it would be copying the header in multiple chunks. If it worked
>> more like GRO where it just used an offset in the first frag instead of
>> having to copy the headers separately to read them then I would be 100%
>> on board.
> __skb_get_poff() does no copy at all if you provide a linear 'skb'
>
> Its really fast, I am really sorry you have wrong idea of what is going
> on.
>
> static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
> int len, void *buffer)
> {
> int hlen = skb_headlen(skb);
>
> if (hlen - offset >= len)
> return skb->data + offset;
>
>
> On the other hand GRO engine is way more expensive, now you mention it, we might
> use the flow dissector to speed it.
I am sure it is fast with a linear skb. I understand what is going on
in that function, and perhaps my original complaint was not clear. The
issue I had before is the fact that we were using a big uninitialized
blob that was the fake skb, and I really didn't want to deal with the
potential of somebody expecting something there was that possibly
uninitialized. Instead I would prefer to deal with what we have,
instead of possibly introducing new issues by using uninitialized memory.
The problem is I have a non-linear skb, with nothing in the skb->data
region. All my code does now is parse frag 0 to get the size of the
head, and then memcpy that out to skb->data and then update lengths and
offsets. The problem right now is if I call __skb_get_poff it will go
through the portion of that path you didn't call out that does
skb_copy_bits.
What I would need in order to give up my current solution is a function
that I can pass a fully formed non-linear skb to that will efficiently
parse the header out of frag 0 and place it in skb->data. What I do not
want to do is hand a partially initialized skb off to some kernel
function and hope that it doesn't do anything I didn't account for.
Perhaps it is just best for me to wait and see what you do with GRO
since it has many of the same requirements that I essentially do.
Thanks,
Alex
next prev parent reply other threads:[~2013-04-12 21:05 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 11:24 [net-next 00/11][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-04-12 11:24 ` [net-next 01/11] ixgbe: Support using build_skb in the case that jumbo frames are disabled Jeff Kirsher
2013-04-12 13:10 ` Eric Dumazet
2013-04-12 13:31 ` Eric Dumazet
2013-04-12 22:21 ` Ben Hutchings
2013-04-12 23:50 ` Alexander Duyck
2013-04-12 11:24 ` [net-next 02/11] ixgbe: Mask off check of frag_off as we only want fragment offset Jeff Kirsher
2013-04-12 13:28 ` Eric Dumazet
2013-04-12 13:45 ` Eric Dumazet
2013-04-12 16:38 ` Alexander Duyck
2013-04-12 16:51 ` Eric Dumazet
2013-04-12 18:22 ` Alexander Duyck
2013-04-12 18:44 ` Eric Dumazet
2013-04-12 20:12 ` Alexander Duyck
2013-04-12 20:29 ` Eric Dumazet
2013-04-12 21:05 ` Alexander Duyck [this message]
2013-04-12 21:12 ` Eric Dumazet
2013-04-12 21:34 ` Alexander Duyck
2013-04-12 21:40 ` Eric Dumazet
2013-04-12 11:24 ` [net-next 03/11] ixgbe: don't do arithmetic operations on bitmasks Jeff Kirsher
2013-04-12 11:24 ` [net-next 04/11] ixgbe: Drop check for PAGE_SIZE from ixgbe_xmit_frame_ring Jeff Kirsher
2013-04-12 11:24 ` [net-next 05/11] ixgbe: Enable support for recognizing PCI-e Gen3 link speed Jeff Kirsher
2013-04-12 11:24 ` [net-next 06/11] ixgbe: create conversion functions from link_status to bus/speed Jeff Kirsher
2013-04-12 11:24 ` [net-next 07/11] ixgbe: enable devices with internal switch to read pci parent Jeff Kirsher
2013-04-12 11:24 ` [net-next 08/11] ixgbe: walk pci-e bus to find minimum width Jeff Kirsher
2013-04-13 21:28 ` Or Gerlitz
2013-04-15 20:48 ` Keller, Jacob E
2013-04-12 11:24 ` [net-next 09/11] ixgbe: fix MNG FW support when adapter not up Jeff Kirsher
2013-04-12 11:24 ` [net-next 10/11] ixgbe: Fix 1G link WoL Jeff Kirsher
2013-04-12 11:24 ` [net-next 11/11] ixgbe: bump version number Jeff Kirsher
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=51687725.5060008@intel.com \
--to=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.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.