X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Focteontx%2Focteontx_ethdev.c;h=706cf88bb4246f3c97f5420c85196e2ab7b48dc7;hb=20186d433203adf38db4e981953c929a4b12970c;hp=100ac603b74239e0f0bd20fc51c8bd8c5d5cec2b;hpb=2d2c79184efdb8db6efdd99e780108dafdc89753;p=dpdk.git diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index 100ac603b7..706cf88bb4 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -47,6 +47,7 @@ #include #include "octeontx_ethdev.h" +#include "octeontx_rxtx.h" #include "octeontx_logs.h" struct octeontx_vdev_init_params { @@ -840,6 +841,26 @@ octeontx_dev_rx_queue_release(void *rxq) rte_free(rxq); } +static const uint32_t * +octeontx_dev_supported_ptypes_get(struct rte_eth_dev *dev) +{ + static const uint32_t ptypes[] = { + RTE_PTYPE_L3_IPV4, + RTE_PTYPE_L3_IPV4_EXT, + RTE_PTYPE_L3_IPV6, + RTE_PTYPE_L3_IPV6_EXT, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP, + RTE_PTYPE_L4_FRAG, + RTE_PTYPE_UNKNOWN + }; + + if (dev->rx_pkt_burst == octeontx_recv_pkts) + return ptypes; + + return NULL; +} + /* Initialize and register driver with DPDK Application */ static const struct eth_dev_ops octeontx_dev_ops = { .dev_configure = octeontx_dev_configure, @@ -856,6 +877,7 @@ static const struct eth_dev_ops octeontx_dev_ops = { .tx_queue_release = octeontx_dev_tx_queue_release, .rx_queue_setup = octeontx_dev_rx_queue_setup, .rx_queue_release = octeontx_dev_rx_queue_release, + .dev_supported_ptypes_get = octeontx_dev_supported_ptypes_get, }; /* Create Ethdev interface per BGX LMAC ports */