From: David Miller <davem@davemloft.net>
To: jakub.kicinski@netronome.com
Cc: netdev@vger.kernel.org, rolf.neugebauer@netronome.com,
jason.mcmullan@netronome.com, simon.horman@netronome.com
Subject: Re: [PATCH 2/2] net: add driver for Netronome NFP4000/NFP6000 NIC VFs
Date: Mon, 26 Oct 2015 18:23:07 -0700 (PDT) [thread overview]
Message-ID: <20151026.182307.873190227567325622.davem@davemloft.net> (raw)
In-Reply-To: <1445626691-19819-3-git-send-email-jakub.kicinski@netronome.com>
From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Fri, 23 Oct 2015 19:58:11 +0100
> +struct nfp_net_tx_buf {
> + struct sk_buff *skb;
> + dma_addr_t dma_addr;
> + short int fidx;
> + u16 pkt_cnt;
> + u32 real_len;
> +};
This packs very poorly, and has a lot of padding holes. Better ordering
would be:
struct nfp_net_tx_buf {
struct sk_buff *skb;
dma_addr_t dma_addr;
u32 real_len;
short int fidx;
u16 pkt_cnt;
};
You really should audit the most core datastructures in this driver
for the same problem.
next prev parent reply other threads:[~2015-10-27 1:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 18:58 [PATCH 0/2] Netronome NFP4000/NFP6000 NIC VF driver Jakub Kicinski
2015-10-23 18:58 ` [PATCH 1/2] pci_ids: add Netronome Systems vendor Jakub Kicinski
2015-10-23 18:58 ` [PATCH 2/2] net: add driver for Netronome NFP4000/NFP6000 NIC VFs Jakub Kicinski
2015-10-27 1:23 ` David Miller [this message]
2015-10-27 11:16 ` Jakub Kicinski
2015-10-27 13:45 ` 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=20151026.182307.873190227567325622.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=jason.mcmullan@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=rolf.neugebauer@netronome.com \
--cc=simon.horman@netronome.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).