打开IXGBE调试日志发发现:tx使用ixgbe_xmit_pkts_vec,默认tx offload无效了
PMD: ixgbe_set_tx_function(): Using simple tx code path
PMD: ixgbe_set_tx_function(): Vector tx enabled.
PMD: ixgbe_set_tx_function(): Using ixgbe_xmit_pkts_vec
解法:
打开ixgbe_ethdev.c 3113行 修订:
dev_info->default_txconf = (struct rte_eth_txconf) {
……
.txq_flags = 0/*ETH_TXQ_FLAGS_NOMULTSEGS |
ETH_TXQ_FLAGS_NOOFFLOADS*/,
};
另:
/* 修订接口默认配置,如启用TX VLAN OFFLOAD */
struct rte_eth_dev_info dev_info;
struct rte_eth_txconf *txconf;
rte_eth_dev_info_get (port_id, &dev_info);
txconf = &dev_info.default_txconf;
/* Enable vlan offload */
txconf->txq_flags &= ~ETH_TXQ_FLAGS_NOVLANOFFL;