From: Tomasz Duszynski Date: Mon, 9 Oct 2017 15:00:41 +0000 (+0200) Subject: net/mrvl: support packet type parsing X-Git-Tag: spdx-start~1484 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f3f0d77db6b04736f4829896ebb80ec757f1f48e;p=dpdk.git net/mrvl: support packet type parsing Add packet type parsing support. Signed-off-by: Jacek Siuda Signed-off-by: Tomasz Duszynski --- diff --git a/doc/guides/nics/features/mrvl.ini b/doc/guides/nics/features/mrvl.ini index 8407b60e1e..31b8a9c19e 100644 --- a/doc/guides/nics/features/mrvl.ini +++ b/doc/guides/nics/features/mrvl.ini @@ -17,3 +17,4 @@ VLAN filter = Y CRC offload = Y L3 checksum offload = Y L4 checksum offload = Y +Packet type parsing = Y diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c index f7dbdba711..d7a8527e4f 100644 --- a/drivers/net/mrvl/mrvl_ethdev.c +++ b/drivers/net/mrvl/mrvl_ethdev.c @@ -883,6 +883,33 @@ mrvl_dev_infos_get(struct rte_eth_dev *dev __rte_unused, info->max_rx_pktlen = MRVL_PKT_SIZE_MAX; } +/** + * Return supported packet types. + * + * @param dev + * Pointer to Ethernet device structure (unused). + * + * @return + * Const pointer to the table with supported packet types. + */ +static const uint32_t * +mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused) +{ + static const uint32_t ptypes[] = { + RTE_PTYPE_L2_ETHER, + RTE_PTYPE_L3_IPV4, + RTE_PTYPE_L3_IPV4_EXT, + RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, + RTE_PTYPE_L3_IPV6, + RTE_PTYPE_L3_IPV6_EXT, + RTE_PTYPE_L2_ETHER_ARP, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP + }; + + return ptypes; +} + /** * DPDK callback to get information about specific receive queue. * @@ -1255,6 +1282,7 @@ static const struct eth_dev_ops mrvl_ops = { .mac_addr_set = mrvl_mac_addr_set, .mtu_set = mrvl_mtu_set, .dev_infos_get = mrvl_dev_infos_get, + .dev_supported_ptypes_get = mrvl_dev_supported_ptypes_get, .rxq_info_get = mrvl_rxq_info_get, .txq_info_get = mrvl_txq_info_get, .vlan_filter_set = mrvl_vlan_filter_set,