From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
Bruce Allan <bruce.w.allan@intel.com>,
Carolyn Wyborny <carolyn.wyborny@intel.com>,
Don Skidmore <donald.c.skidmore@intel.com>,
Greg Rose <gregory.v.rose@intel.com>,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
"David S. Miller" <davem@davemloft.net>,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2 net-next] ixgbe: use skb_padto
Date: Mon, 18 Jun 2012 14:18:47 -0700 [thread overview]
Message-ID: <4FDF9B37.3030804@intel.com> (raw)
In-Reply-To: <20120618105816.5fdd0b90@nehalam.linuxnetplumber.net>
On 06/18/2012 10:58 AM, Stephen Hemminger wrote:
> The code to pad packets here is the same effective code as
> the existing inline function skb_padto(). There is a minor
> performance gain since skb_padto() also uses unlikely().
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
>
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 2012-06-18 10:53:09.130376800 -0700
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 2012-06-18 10:55:13.104540844 -0700
> @@ -6389,11 +6389,8 @@ static netdev_tx_t ixgbe_xmit_frame(stru
> * The minimum packet size for olinfo paylen is 17 so pad the skb
> * in order to meet this minimum size requirement.
> */
> - if (skb->len < 17) {
> - if (skb_padto(skb, 17))
> - return NETDEV_TX_OK;
> - skb->len = 17;
> - }
> + if (skb_padto(skb, 17))
> + return NETDEV_TX_OK;
>
> tx_ring = adapter->tx_ring[skb->queue_mapping];
> return ixgbe_xmit_frame_ring(skb, adapter, tx_ring);
I don't think this will work. We need to update the skb->len and last I
knew skb_padto doesn't do that.
Thanks,
Alex
next prev parent reply other threads:[~2012-06-18 21:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 17:58 [PATCH 1/2 net-next] ixgbe: use skb_padto Stephen Hemminger
2012-06-18 18:55 ` [PATCH 2/2 net-next] ixgbe: remove xmit length check Stephen Hemminger
2012-06-18 20:39 ` Jeff Kirsher
2012-06-18 20:38 ` [PATCH 1/2 net-next] ixgbe: use skb_padto Jeff Kirsher
2012-06-18 21:18 ` Alexander Duyck [this message]
2012-06-18 23:31 ` [PATCH net-next] ixgbe: simplify padding and length checks (v2) Stephen Hemminger
2012-06-19 23:30 ` 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=4FDF9B37.3030804@intel.com \
--to=alexander.h.duyck@intel.com \
--cc=bruce.w.allan@intel.com \
--cc=carolyn.wyborny@intel.com \
--cc=davem@davemloft.net \
--cc=donald.c.skidmore@intel.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=gregory.v.rose@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=shemminger@vyatta.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.