From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/5] ixgbe: make register maps const
Date: Fri, 6 Mar 2015 18:23:21 -0800 [thread overview]
Message-ID: <1425695004-29605-3-git-send-email-stephen@networkplumber.org> (raw)
In-Reply-To: <1425695004-29605-1-git-send-email-stephen@networkplumber.org>
These are const data structures, just put them in txt segment
rather than having compiler emit code to set them up on the stack.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index e6aec8f..8706c1e 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -860,14 +860,14 @@ rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs)
{
uint64_t pkt_flags;
- static uint64_t ip_pkt_types_map[16] = {
+ static const uint64_t ip_pkt_types_map[16] = {
0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, PKT_RX_IPV4_HDR_EXT,
PKT_RX_IPV6_HDR, 0, 0, 0,
PKT_RX_IPV6_HDR_EXT, 0, 0, 0,
PKT_RX_IPV6_HDR_EXT, 0, 0, 0,
};
- static uint64_t ip_rss_types_map[16] = {
+ static const uint64_t ip_rss_types_map[16] = {
0, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH,
0, PKT_RX_RSS_HASH, 0, PKT_RX_RSS_HASH,
PKT_RX_RSS_HASH, 0, 0, 0,
--
2.1.4
next prev parent reply other threads:[~2015-03-07 2:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-07 2:23 [dpdk-dev] [PATCH 0/5] ixgbe: cleanup patches Stephen Hemminger
2015-03-07 2:23 ` [dpdk-dev] [PATCH 1/5] ixgbe: make txq_ops const Stephen Hemminger
2015-03-09 13:31 ` Bruce Richardson
2015-03-10 4:40 ` Ouyang, Changchun
2015-03-07 2:23 ` Stephen Hemminger [this message]
2015-03-09 13:33 ` [dpdk-dev] [PATCH 2/5] ixgbe: make register maps const Bruce Richardson
2015-03-10 4:47 ` Ouyang, Changchun
2015-03-07 2:23 ` [dpdk-dev] [PATCH 3/5] ixgbe: make bulk alloc static Stephen Hemminger
2015-03-09 13:39 ` Bruce Richardson
2015-03-10 5:08 ` Ouyang, Changchun
2015-03-07 2:23 ` [dpdk-dev] [PATCH 4/5] ixgbe: rename set_tx_function Stephen Hemminger
2015-03-09 13:43 ` Bruce Richardson
2015-03-10 5:12 ` Ouyang, Changchun
2015-03-07 2:23 ` [dpdk-dev] [PATCH 5/5] ixgbe: rename igb_* to ixgbe_* Stephen Hemminger
2015-03-09 13:49 ` Bruce Richardson
2015-03-10 5:14 ` Ouyang, Changchun
2015-03-10 14:24 ` [dpdk-dev] [PATCH 0/5] ixgbe: cleanup patches Thomas Monjalon
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=1425695004-29605-3-git-send-email-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/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).