mbuf: replace data pointer by an offset
authorOlivier Matz <olivier.matz@6wind.com>
Thu, 11 Sep 2014 13:15:35 +0000 (14:15 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 17 Sep 2014 16:53:40 +0000 (18:53 +0200)
commit08b563ffb19d8baf59dd84200f25bc85031d18a7
tree3255773d53c7dc983b33936dd3970c0b95137935
parent7869536f3f8edace05043be6f322b835702b201c
mbuf: replace data pointer by an offset

The mbuf structure already contains a pointer to the beginning of the
buffer (m->buf_addr). It is not needed to use 8 bytes again to store
another pointer to the beginning of the data.

Using a 16 bits unsigned integer is enough as we know that a mbuf is
never longer than 64KB. We gain 6 bytes in the structure thanks to
this modification.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
* Updated to apply to latest on mainline.
* Disabled vector PMD in config as it relies heavily on the mbuf layout
  This will be re-enabled in a subsequent commit once vPMD has been
  reworked to take account of mbuf changes.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
35 files changed:
app/test-pmd/csumonly.c
app/test-pmd/flowgen.c
app/test-pmd/icmpecho.c
app/test-pmd/ieee1588fwd.c
app/test-pmd/macfwd-retry.c
app/test-pmd/macfwd.c
app/test-pmd/macswap.c
app/test-pmd/rxonly.c
app/test-pmd/testpmd.c
app/test-pmd/txonly.c
app/test/packet_burst_generator.c
app/test/test_mbuf.c
app/test/test_table_acl.c
app/test/test_table_pipeline.c
config/common_linuxapp
examples/exception_path/main.c
examples/vhost/main.c
examples/vhost_xen/main.c
lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h
lib/librte_eal/linuxapp/kni/kni_net.c
lib/librte_ip_frag/rte_ipv4_fragmentation.c
lib/librte_ip_frag/rte_ipv6_fragmentation.c
lib/librte_mbuf/rte_mbuf.c
lib/librte_mbuf/rte_mbuf.h
lib/librte_pmd_bond/rte_eth_bond_pmd.c
lib/librte_pmd_e1000/em_rxtx.c
lib/librte_pmd_e1000/igb_rxtx.c
lib/librte_pmd_i40e/i40e_rxtx.c
lib/librte_pmd_ixgbe/ixgbe_rxtx.c
lib/librte_pmd_ixgbe/ixgbe_rxtx.h
lib/librte_pmd_pcap/rte_eth_pcap.c
lib/librte_pmd_virtio/virtio_rxtx.c
lib/librte_pmd_virtio/virtqueue.h
lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
lib/librte_pmd_xenvirt/rte_eth_xenvirt.c