netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: davem@davemloft.net
Cc: steffen.klassert@secunet.com, edumazet@google.com,
	netdev@vger.kernel.org
Subject: [PATCH] net: move padding in struct skb_shared_info
Date: Mon, 10 Apr 2017 11:07:56 +0300	[thread overview]
Message-ID: <20170410080755.GA24514@avx2> (raw)

commit 7f564528a480084e2318cd48caba7aef4a54a77f
("skbuff: Extend gso_type to unsigned int.") created padding as first
field of struct skb_shared_info requiring [R64+imm8] addressing mode
for all fields.

Patch bubbles up padding brinding code size down to original levels and
even smaller:

	add/remove: 0/0 grow/shrink: 4/304 up/down: 20/-720 (-700)
	function                                     old     new   delta
	iwl_trans_pcie_tx                           3994    4006     +12
	tap_do_read                                 1070    1074      +4
	packet_recvmsg                              1155    1157      +2
	be_xmit                                     2038    2040      +2
	zerocopy_sg_from_iter                        455     454      -1
		...
	__ef4_rx_packet                             1358    1349      -9
	hix5hd2_poll                                1787    1777     -10
	e1000_clean_jumbo_rx_irq                    3599    3587     -12
	skb_try_coalesce                            1118    1105     -13
	xenvif_tx_build_gops                        5057    5043     -14

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/skbuff.h |    1 -
 1 file changed, 1 deletion(-)

--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -413,7 +413,6 @@ struct ubuf_info {
  * the end of the header data, ie. at skb->end.
  */
 struct skb_shared_info {
-	unsigned short	_unused;
 	unsigned char	nr_frags;
 	__u8		tx_flags;
 	unsigned short	gso_size;

             reply	other threads:[~2017-04-10  8:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10  8:07 Alexey Dobriyan [this message]
2017-04-10 14:43 ` [PATCH] net: move padding in struct skb_shared_info Eric Dumazet
2017-04-11  9:41   ` Alexey Dobriyan
2017-04-11 14:47     ` Eric Dumazet
2017-04-11 14:52     ` David Miller

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=20170410080755.GA24514@avx2 \
    --to=adobriyan@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).