ixgbe: make register maps const
authorStephen Hemminger <stephen@networkplumber.org>
Sat, 7 Mar 2015 02:23:21 +0000 (18:23 -0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 10 Mar 2015 14:12:15 +0000 (15:12 +0100)
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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
lib/librte_pmd_ixgbe/ixgbe_rxtx.c

index b802555..3a4641c 100644 (file)
@@ -859,14 +859,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,