ixgbe: prefer enabling olflags rather than not disabling
authorCunming Liang <cunming.liang@intel.com>
Thu, 26 Jun 2014 06:53:32 +0000 (14:53 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 26 Jun 2014 11:04:18 +0000 (13:04 +0200)
RTE_IXGBE_RX_OLFLAGS_ENABLE gives a hint whick keeping packet type
in RX ol_flags or not.
By default it is set to update ol_flags in RX mbuf header.
If unset it, will gain addtional performance, but will lose packet
type information.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
config/common_linuxapp
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c

index 5b896c3..b19c4d9 100644 (file)
@@ -192,7 +192,7 @@ CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n
 CONFIG_RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC=y
 CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=n
 CONFIG_RTE_IXGBE_INC_VECTOR=y
-CONFIG_RTE_IXGBE_RX_OLFLAGS_DISABLE=n
+CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y
 
 #
 # Compile burst-oriented I40E PMD driver
index 74d1b36..09e19a3 100644 (file)
@@ -145,7 +145,7 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq)
  * gives improved performance, at the cost of losing the offload info
  * in the received packet
  */
-#ifndef RTE_IXGBE_RX_OLFLAGS_DISABLE
+#ifdef RTE_IXGBE_RX_OLFLAGS_ENABLE
 
 #define OLFLAGS_MASK     ((uint16_t)(PKT_RX_VLAN_PKT | PKT_RX_IPV4_HDR |\
                                     PKT_RX_IPV4_HDR_EXT | PKT_RX_IPV6_HDR |\
@@ -679,7 +679,7 @@ int ixgbe_rx_vec_condition_check(struct rte_eth_dev *dev)
        struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
        struct rte_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;
 
-#ifdef RTE_IXGBE_RX_OLFLAGS_DISABLE
+#ifndef RTE_IXGBE_RX_OLFLAGS_ENABLE
        /* whithout rx ol_flags, no VP flag report */
        if (rxmode->hw_vlan_strip != 0 ||
            rxmode->hw_vlan_extend != 0)