ethdev: align device structure with cache line
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Tue, 3 May 2016 12:42:07 +0000 (18:12 +0530)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 22 Jun 2016 21:26:34 +0000 (23:26 +0200)
Elements of struct rte_eth_dev used in the fast path.
Make struct rte_eth_dev cache aligned to avoid the cases where
rte_eth_dev elements share the same cache line with other structures.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
lib/librte_ether/rte_ethdev.h

index 6cf4c58..fa45f1b 100644 (file)
@@ -1650,7 +1650,7 @@ struct rte_eth_dev {
        struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
        uint8_t attached; /**< Flag indicating the port is attached */
        enum rte_eth_dev_type dev_type; /**< Flag indicating the device type */
-};
+} __rte_cache_aligned;
 
 struct rte_eth_dev_sriov {
        uint8_t active;               /**< SRIOV is active with 16, 32 or 64 pools */