[dpdk-dev] [PATCH] mbuf: clean old refcnt option

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Mar 31 19:58:22 CEST 2015


CONFIG_RTE_MBUF_SCATTER_GATHER was renamed into CONFIG_RTE_MBUF_REFCNT
by commit 62814bc2e923 and removed by commit 4769bc5a27cc.
Some traces remain because of delayed patches.

It can also be removed from doxygen config.
It is now poisoned in rte_mbuf.h to warn any misuse.

Fixes: d0dff9ba445e ("doc: sample application user guide")
Fixes: fc1f2750a3ec ("doc: programmers guide")
Fixes: 4769bc5a27cc ("mbuf: remove build option to disable refcnt")

Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
---
 doc/api/doxy-api.conf                              |  3 +--
 doc/guides/nics/ixgbe.rst                          |  2 --
 .../prog_guide/ip_fragment_reassembly_lib.rst      |  1 -
 doc/guides/sample_app_ug/vhost.rst                 | 22 ----------------------
 lib/librte_ether/rte_ether.h                       |  3 +--
 lib/librte_mbuf/rte_mbuf.h                         |  3 ++-
 6 files changed, 4 insertions(+), 30 deletions(-)

diff --git a/doc/api/doxy-api.conf b/doc/api/doxy-api.conf
index 5a71a76..da03e9b 100644
--- a/doc/api/doxy-api.conf
+++ b/doc/api/doxy-api.conf
@@ -59,8 +59,7 @@ INPUT                   = doc/api/doxy-api-index.md \
 FILE_PATTERNS           = rte_*.h \
                           cmdline.h
 PREDEFINED              = __DOXYGEN__ \
-                          __attribute__(x)= \
-                          RTE_MBUF_REFCNT
+                          __attribute__(x)=
 
 OPTIMIZE_OUTPUT_FOR_C   = YES
 ENABLE_PREPROCESSING    = YES
diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index d2c124e..70cd591 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -168,8 +168,6 @@ When CONFIG_RTE_IXGBE_RX_OLFLAGS_DISABLE=y, better performance can be achieved:
 
     ./x86_64-native-linuxapp-gcc/app/testpmd -c 300 -n 4 -- -i --burst=32 --rxfreet=32 --mbcache=250 --txpt=32 --rxht=8 --rxwt=0 --txfreet=32 --txrst=32 --txqflags=0xf01 --disable-hw-vlan
 
-If scatter gather lists are not required, set CONFIG_RTE_MBUF_SCATTER_GATHER=n for better throughput.
-
 l3fwd
 ^^^^^
 
diff --git a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
index d17daa7..7d6bdaa 100644
--- a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
+++ b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
@@ -54,7 +54,6 @@ Finally 'direct' and 'indirect' mbufs for each fragnemt are linked together via
 
 The caller has an ability to explicitly specify which mempools should be used to allocate 'direct' and 'indirect' mbufs from.
 
-Note that configuration macro RTE_MBUF_SCATTER_GATHER has to be enabled to make fragmentation library build and work correctly.
 For more information about direct and indirect mbufs, refer to the *DPDK Programmers guide 7.7 Direct and Indirect Buffers.*
 
 Packet reassembly
diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
index cd9b232..8a7eb3b 100644
--- a/doc/guides/sample_app_ug/vhost.rst
+++ b/doc/guides/sample_app_ug/vhost.rst
@@ -338,28 +338,6 @@ Compiling the Sample Code
 
     .. code-block:: console
 
-        make
-
-    .. note::
-
-        Note For zero copy, need firstly disable CONFIG_RTE_MBUF_SCATTER_GATHER,
-        CONFIG_RTE_LIBRTE_IP_FRAG and CONFIG_RTE_LIBRTE_DISTRIBUTOR
-        in the config file and then re-configure and compile the core lib, and then build the application:
-
-    .. code-block:: console
-
-        vi ${RTE_SDK}/config/common_linuxapp
-
-    change it as follows:
-
-    ::
-
-        CONFIG_RTE_MBUF_SCATTER_GATHER=n
-        CONFIG_RTE_LIBRTE_IP_FRAG=n
-        CONFIG_RTE_LIBRTE_DISTRIBUTOR=n
-
-    .. code-block:: console
-
         cd ${RTE_SDK}
         make config ${RTE_TARGET}
         make install ${RTE_TARGET}
diff --git a/lib/librte_ether/rte_ether.h b/lib/librte_ether/rte_ether.h
index bafeb2b..49f4576 100644
--- a/lib/librte_ether/rte_ether.h
+++ b/lib/librte_ether/rte_ether.h
@@ -383,7 +383,6 @@ static inline int rte_vlan_insert(struct rte_mbuf **m)
 	struct ether_hdr *oh, *nh;
 	struct vlan_hdr *vh;
 
-#ifdef RTE_MBUF_REFCNT
 	/* Can't insert header if mbuf is shared */
 	if (rte_mbuf_refcnt_read(*m) > 1) {
 		struct rte_mbuf *copy;
@@ -394,7 +393,7 @@ static inline int rte_vlan_insert(struct rte_mbuf **m)
 		rte_pktmbuf_free(*m);
 		*m = copy;
 	}
-#endif
+
 	oh = rte_pktmbuf_mtod(*m, struct ether_hdr *);
 	nh = (struct ether_hdr *)
 		rte_pktmbuf_prepend(*m, sizeof(struct vlan_hdr));
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 0265172..45f73c2 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -64,8 +64,9 @@
 extern "C" {
 #endif
 
-/* deprecated feature, renamed in RTE_MBUF_REFCNT */
+/* deprecated options */
 #pragma GCC poison RTE_MBUF_SCATTER_GATHER
+#pragma GCC poison RTE_MBUF_REFCNT
 
 /*
  * Packet Offload Features Flags. It also carry packet type information.
-- 
2.2.2



More information about the dev mailing list