mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
netdev-dpdk: round up mbuf_size to cache_line_size
Some pmd driver(e.g: vNIC thunderx PMD) want mbuf_size to be multiple of cache_line_size. With out this fix, Netdev-dpdk initialization would fail for those PMD. Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com> Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com> Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
committed by
Ben Pfaff
parent
24aefb1845
commit
31b88c9751
@@ -76,9 +76,10 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
|
||||
#define MTU_TO_MAX_FRAME_LEN(mtu) ((mtu) + ETHER_HDR_MAX_LEN)
|
||||
#define FRAME_LEN_TO_MTU(frame_len) ((frame_len) \
|
||||
- ETHER_HDR_LEN - ETHER_CRC_LEN)
|
||||
#define MBUF_SIZE(mtu) (MTU_TO_MAX_FRAME_LEN(mtu) \
|
||||
+ sizeof(struct dp_packet) \
|
||||
+ RTE_PKTMBUF_HEADROOM)
|
||||
#define MBUF_SIZE(mtu) ROUND_UP((MTU_TO_MAX_FRAME_LEN(mtu) \
|
||||
+ sizeof(struct dp_packet) \
|
||||
+ RTE_PKTMBUF_HEADROOM), \
|
||||
RTE_CACHE_LINE_SIZE)
|
||||
#define NETDEV_DPDK_MBUF_ALIGN 1024
|
||||
#define NETDEV_DPDK_MAX_PKT_LEN 9728
|
||||
|
||||
|
Reference in New Issue
Block a user