Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Shannon Nelson <snelson@pensando.io>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: Shannon Nelson <snelson@pensando.io>
Subject: [PATCH net-next 3/5] ionic: struct reorder for faster access
Date: Mon, 31 Aug 2020 16:35:56 -0700 [thread overview]
Message-ID: <20200831233558.71417-4-snelson@pensando.io> (raw)
In-Reply-To: <20200831233558.71417-1-snelson@pensando.io>
Move a few active struct fields to the front of the struct
for a little better cache use and performance.
Signed-off-by: Shannon Nelson <snelson@pensando.io>
---
.../net/ethernet/pensando/ionic/ionic_dev.h | 18 +++++++++---------
.../net/ethernet/pensando/ionic/ionic_lif.h | 14 +++++++-------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.h b/drivers/net/ethernet/pensando/ionic/ionic_dev.h
index 2b2eb5f2a0e5..87debc512755 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_dev.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.h
@@ -199,16 +199,17 @@ struct ionic_desc_info {
struct ionic_queue {
struct device *dev;
- u64 dbell_count;
- u64 drop;
- u64 stop;
- u64 wake;
struct ionic_lif *lif;
struct ionic_desc_info *info;
- struct ionic_dev *idev;
u16 head_idx;
u16 tail_idx;
unsigned int index;
+ unsigned int num_descs;
+ u64 dbell_count;
+ u64 stop;
+ u64 wake;
+ u64 drop;
+ struct ionic_dev *idev;
unsigned int type;
unsigned int hw_index;
unsigned int hw_type;
@@ -226,7 +227,6 @@ struct ionic_queue {
};
dma_addr_t base_pa;
dma_addr_t sg_base_pa;
- unsigned int num_descs;
unsigned int desc_size;
unsigned int sg_desc_size;
unsigned int pid;
@@ -246,8 +246,6 @@ struct ionic_intr_info {
};
struct ionic_cq {
- void *base;
- dma_addr_t base_pa;
struct ionic_lif *lif;
struct ionic_cq_info *info;
struct ionic_queue *bound_q;
@@ -255,8 +253,10 @@ struct ionic_cq {
u16 tail_idx;
bool done_color;
unsigned int num_descs;
- u64 compl_count;
unsigned int desc_size;
+ u64 compl_count;
+ void *base;
+ dma_addr_t base_pa;
};
struct ionic;
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.h b/drivers/net/ethernet/pensando/ionic/ionic_lif.h
index e1e6ff1a0918..11ea9e0c6a4a 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.h
@@ -16,32 +16,32 @@
#define IONIC_TX_BUDGET_DEFAULT 256
struct ionic_tx_stats {
- u64 dma_map_err;
u64 pkts;
u64 bytes;
- u64 clean;
- u64 linearize;
u64 csum_none;
u64 csum;
- u64 crc32_csum;
u64 tso;
u64 tso_bytes;
u64 frags;
u64 vlan_inserted;
+ u64 clean;
+ u64 linearize;
+ u64 crc32_csum;
u64 sg_cntr[IONIC_MAX_NUM_SG_CNTR];
+ u64 dma_map_err;
};
struct ionic_rx_stats {
- u64 dma_map_err;
- u64 alloc_err;
u64 pkts;
u64 bytes;
u64 csum_none;
u64 csum_complete;
- u64 csum_error;
u64 buffers_posted;
u64 dropped;
u64 vlan_stripped;
+ u64 csum_error;
+ u64 dma_map_err;
+ u64 alloc_err;
};
#define IONIC_QCQ_F_INITED BIT(0)
--
2.17.1
next prev parent reply other threads:[~2020-08-31 23:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 23:35 [PATCH net-next 0/5] ionic: struct cleanups Shannon Nelson
2020-08-31 23:35 ` [PATCH net-next 1/5] ionic: clean up page handling code Shannon Nelson
2020-09-01 0:14 ` David Miller
2020-09-01 4:19 ` Shannon Nelson
2020-08-31 23:35 ` [PATCH net-next 2/5] ionic: smaller coalesce default Shannon Nelson
2020-08-31 23:50 ` Jakub Kicinski
2020-09-01 0:16 ` David Miller
2020-09-01 4:20 ` Shannon Nelson
2020-08-31 23:35 ` Shannon Nelson [this message]
2020-08-31 23:35 ` [PATCH net-next 4/5] ionic: clean up desc_info and cq_info structs Shannon Nelson
2020-08-31 23:35 ` [PATCH net-next 5/5] ionic: clean adminq service routine Shannon Nelson
2020-09-01 0:47 ` [PATCH net-next 0/5] ionic: struct cleanups Florian Fainelli
2020-09-01 4:21 ` Shannon Nelson
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=20200831233558.71417-4-snelson@pensando.io \
--to=snelson@pensando.io \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--subject='Re: [PATCH net-next 3/5] ionic: struct reorder for faster access' \
/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
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).