net/mrvl: support packet type parsing
authorTomasz Duszynski <tdu@semihalf.com>
Mon, 9 Oct 2017 15:00:41 +0000 (17:00 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 12 Oct 2017 00:36:58 +0000 (01:36 +0100)
Add packet type parsing support.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
doc/guides/nics/features/mrvl.ini
drivers/net/mrvl/mrvl_ethdev.c

index 8407b60..31b8a9c 100644 (file)
@@ -17,3 +17,4 @@ VLAN filter          = Y
 CRC offload          = Y
 L3 checksum offload  = Y
 L4 checksum offload  = Y
+Packet type parsing  = Y
index f7dbdba..d7a8527 100644 (file)
@@ -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,