From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) by dpdk.org (Postfix) with ESMTP id 188971B22F for ; Mon, 9 Oct 2017 17:01:21 +0200 (CEST) Received: by mail-lf0-f51.google.com with SMTP id 75so291583lfx.1 for ; Mon, 09 Oct 2017 08:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ElX8uU06XGXLAPCd81rW3GMrNoGSODG+kiXagRO5nv8=; b=nE2ajXrQS6BActDokfGmZbXQMTZGOeUj5FKtlWVMgHN/AD2EK+9DAoJqicMrRfKRlz /7VlxlTG5lHvGl57W5d2r9ClW1Kv+weuerxKy3bs7B5KYjwXScvvNdUSp7zcc3pncQjF u7532TFN86Nx+vyGmzJBQ1ab+atB1Q4H1rPsArZQSs9HCoAeyNVfE7ti3y+L+sPcSpo+ HCp3fBAUl8Vfagd+1hZiW2UbHGAFozQ/7KDur5AzuCkyEl5HeOn//KwO71nCFNMmq7OD 61vTYgvmv1k1o6g7lgLUx60LFYVaUgl7BKf7BXDwnxg7uCI7xOlNEB+tTZb3XZNQ9wee agiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ElX8uU06XGXLAPCd81rW3GMrNoGSODG+kiXagRO5nv8=; b=FgPWvtHIGMTuikrsQw3ZflUVCpPzdelYcFyVR5ZXztgo8qdydjdqkY0i2yFCM9jMTm YfRZGKt8FxcJa7QLiENq+4u8wbxhTSmCudTMBOWj1CIpLzA83437VPAS4V/8bvfkA3XP J2YUEEBAo5uzdo6vaZ8jPbdmSE7Akm2dnoS+evYW/cHvM3w1meoQ+WgoPbHmXpkyJUlT GKOevi5sbYrTDJDAbMjLtfPpd2rbKgJequHfWE0k1M5zJbA0oaG47r8qgrXtgf3nrZzv PeYhMxhKwoV6DcFavsryG7t0JlaZ8pd5ZjdYXQWQEeyHc18h0+GRMWKR+b9pbUVtkjVL /iCA== X-Gm-Message-State: AMCzsaXYF4SpXXK/z+mDvfLBkHxmRjJZSBT+rEvKyxSh6Rq55Ixz7puI KhZk0o001rSzWPIDmEskZ6OcjFDOj/I= X-Google-Smtp-Source: AOwi7QA5xhY+afYJkLNQGsa5CDGXnzONQ4GZbVqjkF/1muT3FxVI2c37bWRQVsqL+gFojAo/TUo/+A== X-Received: by 10.46.83.74 with SMTP id t10mr3711892ljd.180.1507561281281; Mon, 09 Oct 2017 08:01:21 -0700 (PDT) Received: from tdu.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id z64sm1352637lfa.91.2017.10.09.08.01.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Oct 2017 08:01:20 -0700 (PDT) From: Tomasz Duszynski To: dev@dpdk.org Cc: mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com, Jianbo.liu@linaro.org, Tomasz Duszynski , Jacek Siuda Date: Mon, 9 Oct 2017 17:00:41 +0200 Message-Id: <1507561244-20115-14-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507561244-20115-1-git-send-email-tdu@semihalf.com> References: <1507031500-11473-1-git-send-email-tdu@semihalf.com> <1507561244-20115-1-git-send-email-tdu@semihalf.com> Subject: [dpdk-dev] [PATCH v4 13/16] net/mrvl: add packet type parsing support. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2017 15:01:22 -0000 Add packet type parsing support. Signed-off-by: Jacek Siuda Signed-off-by: Tomasz Duszynski --- doc/guides/nics/features/mrvl.ini | 1 + drivers/net/mrvl/mrvl_ethdev.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/doc/guides/nics/features/mrvl.ini b/doc/guides/nics/features/mrvl.ini index 8407b60..31b8a9c 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 f7dbdba..d7a8527 100644 --- a/drivers/net/mrvl/mrvl_ethdev.c +++ b/drivers/net/mrvl/mrvl_ethdev.c @@ -884,6 +884,33 @@ mrvl_dev_infos_get(struct rte_eth_dev *dev __rte_unused, } /** + * 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. * * @param dev @@ -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, -- 2.7.4