path: root/drivers/net/ring
diff options
authorFerruh Yigit <>2018-06-29 13:41:13 +0100
committerFerruh Yigit <>2018-07-03 01:35:58 +0200
commit70815c9ecadd780af101810119d385009cb0eb2d (patch)
treecb3eaf16b2569665df505dcbc6c5b7a0d18d0da6 /drivers/net/ring
parent4ed05fcd441bc7720386950a95d0bd85a72a5cee (diff)
ethdev: add new offload flag to keep CRC
DEV_RX_OFFLOAD_KEEP_CRC offload flag is added. PMDs that support keeping CRC should advertise this offload capability. DEV_RX_OFFLOAD_CRC_STRIP flag will remain one more release default behavior in PMDs are to keep the CRC until this flag removed Until DEV_RX_OFFLOAD_CRC_STRIP flag is removed: - Setting both KEEP_CRC & CRC_STRIP is INVALID - Setting only CRC_STRIP PMD should strip the CRC - Setting only KEEP_CRC PMD should keep the CRC - Not setting both PMD should keep the CRC A helper function rte_eth_dev_is_keep_crc() has been added to be able to change the no flag behavior with minimal changes in PMDs. The PMDs that doesn't report the DEV_RX_OFFLOAD_KEEP_CRC offload can remove rte_eth_dev_is_keep_crc() checks next release, related code commented to help the maintenance task. And DEV_RX_OFFLOAD_CRC_STRIP has been added to virtual drivers since they don't use CRC at all, when an application requires this offload virtual PMDs should not return error. Signed-off-by: Ferruh Yigit <> Acked-by: Allain Legacy <> Acked-by: Andrew Rybchenko <> Acked-by: Thomas Monjalon <>
Diffstat (limited to 'drivers/net/ring')
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 35b837c..5aa48da 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -164,6 +164,7 @@ eth_dev_info(struct rte_eth_dev *dev,
dev_info->max_rx_queues = (uint16_t)internals->max_rx_queues;
dev_info->max_tx_queues = (uint16_t)internals->max_tx_queues;
dev_info->min_rx_bufsize = 0;
+ dev_info->rx_offload_capa = DEV_RX_OFFLOAD_CRC_STRIP;
static int