From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC89EA00E6 for ; Tue, 6 Aug 2019 10:02:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 787751BDFD; Tue, 6 Aug 2019 10:02:36 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 907DE1BDE8 for ; Tue, 6 Aug 2019 10:02:34 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7680T8k010368; Tue, 6 Aug 2019 01:02:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=bAKG9vmj4Kwj+W/QPjYNLXikhbKg8WRxslJftLzG3vg=; b=q8zQYYIKnqlM5LmDivbnrHS3UEIXHA87w9zyWl4Z609Bgq6gCZWBX3PyRlbwsNQ2kj5o wmQ/A80hngh65U89C1hhiS2327OCC0a5dt4aoBsDBjX9BcOPpyVke8atOwSod7NG6EO0 9d4JYXn/XhMz0efDZu+JTjdou/0ua27vZPsZlzwrmHiy29Fshx794+OvL61rzYT4MOwq E+BidE+vZNx1GY2bm7x5pKX05rXQ6ZiKFGhVCudXrASynm5f5HknqG/RreyTl13hlbsd wvGGg/HO7/PP2+UB0rwzRzaHn9A6qO+ZWfqt/nxWinLU/NE6cNcsky7/pdA4dHwikVxQ Ug== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2u57mr29yt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 06 Aug 2019 01:02:27 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 6 Aug 2019 01:02:26 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 6 Aug 2019 01:02:26 -0700 Received: from BG-LT7430.marvell.com (unknown [10.28.17.50]) by maili.marvell.com (Postfix) with ESMTP id 4B1F33F703F; Tue, 6 Aug 2019 01:02:15 -0700 (PDT) From: To: , Igor Russkikh , "Pavel Belous" , Ajit Khaparde , Somnath Kotur , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , Wenzhuo Lu , Gagandeep Singh , John Daley , Hyong Youb Kim , Gaetan Rivet , Qi Zhang , Xiao Wang , Beilei Xing , Jingjing Wu , Qiming Yang , "Konstantin Ananyev" , Matan Azrad , Shahaf Shuler , Yongseok Koh , Viacheslav Ovsiienko , Zyta Szpak , Liron Himi , Tomasz Duszynski , Stephen Hemminger , "K. Y. Srinivasan" , Haiyang Zhang , Alejandro Lucero , Nithin Dabilpuram , Kiran Kumar K , "Rasesh Mody" , Shahed Shaikh , Keith Wiles , Maciej Czekaj , Yong Wang CC: , Pavan Nikhilesh Date: Tue, 6 Aug 2019 13:32:03 +0530 Message-ID: <20190806080206.1572-3-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190806080206.1572-1-pbhagavatula@marvell.com> References: <20190806080206.1572-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-06_04:2019-07-31,2019-08-06 signatures=0 Subject: [dpdk-dev] [RFC 2/3] net: update Rx offload capabilities 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh Add DEV_RX_OFFLOAD_PTYPE flag for all supported NICs. Signed-off-by: Pavan Nikhilesh --- drivers/net/atlantic/atl_ethdev.c | 3 ++- drivers/net/bnxt/bnxt_ethdev.c | 3 ++- drivers/net/cxgbe/cxgbe.h | 3 ++- drivers/net/dpaa/dpaa_ethdev.c | 3 ++- drivers/net/dpaa2/dpaa2_ethdev.c | 3 ++- drivers/net/e1000/em_rxtx.c | 3 ++- drivers/net/e1000/igb_rxtx.c | 3 ++- drivers/net/enetc/enetc_ethdev.c | 3 ++- drivers/net/enic/enic_res.c | 3 ++- drivers/net/failsafe/failsafe_ops.c | 6 ++++-- drivers/net/fm10k/fm10k_ethdev.c | 15 ++++++++------- drivers/net/i40e/i40e_ethdev.c | 3 ++- drivers/net/iavf/iavf_ethdev.c | 3 ++- drivers/net/ice/ice_ethdev.c | 3 ++- drivers/net/ixgbe/ixgbe_rxtx.c | 3 ++- drivers/net/mlx4/mlx4_rxq.c | 3 ++- drivers/net/mlx5/mlx5_rxq.c | 3 ++- drivers/net/mvneta/mvneta_ethdev.h | 3 ++- drivers/net/mvpp2/mrvl_ethdev.c | 3 ++- drivers/net/netvsc/hn_rndis.c | 3 ++- drivers/net/nfp/nfp_net.c | 3 ++- drivers/net/octeontx/octeontx_ethdev.h | 3 ++- drivers/net/octeontx2/otx2_ethdev.c | 5 +++++ drivers/net/octeontx2/otx2_ethdev.h | 15 ++++++++------- drivers/net/qede/qede_ethdev.c | 3 ++- drivers/net/tap/rte_eth_tap.c | 3 ++- drivers/net/thunderx/nicvf_ethdev.h | 3 ++- drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 ++- 28 files changed, 73 insertions(+), 40 deletions(-) diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index 3c1b349df..d3ae1fb1e 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -168,7 +168,8 @@ static struct rte_pci_driver rte_atl_pmd = { | DEV_RX_OFFLOAD_TCP_CKSUM \ | DEV_RX_OFFLOAD_JUMBO_FRAME \ | DEV_RX_OFFLOAD_MACSEC_STRIP \ - | DEV_RX_OFFLOAD_VLAN_FILTER) + | DEV_RX_OFFLOAD_VLAN_FILTER \ + | DEV_RX_OFFLOAD_PTYPE) #define ATL_TX_OFFLOADS (DEV_TX_OFFLOAD_VLAN_INSERT \ | DEV_TX_OFFLOAD_IPV4_CKSUM \ diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 25a345cd4..fda0bf176 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -160,7 +160,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = { DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \ DEV_RX_OFFLOAD_JUMBO_FRAME | \ DEV_RX_OFFLOAD_KEEP_CRC | \ - DEV_RX_OFFLOAD_TCP_LRO) + DEV_RX_OFFLOAD_TCP_LRO | \ + DEV_RX_OFFLOAD_PTYPE) static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask); static void bnxt_print_link_info(struct rte_eth_dev *eth_dev); diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h index 3f97fa58b..6315192ab 100644 --- a/drivers/net/cxgbe/cxgbe.h +++ b/drivers/net/cxgbe/cxgbe.h @@ -47,7 +47,8 @@ DEV_RX_OFFLOAD_UDP_CKSUM | \ DEV_RX_OFFLOAD_TCP_CKSUM | \ DEV_RX_OFFLOAD_JUMBO_FRAME | \ - DEV_RX_OFFLOAD_SCATTER) + DEV_RX_OFFLOAD_SCATTER | \ + DEV_RX_OFFLOAD_PTYPE) #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan" diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 7154fb9b4..960783116 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -49,7 +49,8 @@ /* Supported Rx offloads */ static uint64_t dev_rx_offloads_sup = DEV_RX_OFFLOAD_JUMBO_FRAME | - DEV_RX_OFFLOAD_SCATTER; + DEV_RX_OFFLOAD_SCATTER | + DEV_RX_OFFLOAD_PTYPE; /* Rx offloads which cannot be disabled */ static uint64_t dev_rx_offloads_nodis = diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index dd6a78f9f..a1c8ad95c 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -38,7 +38,8 @@ static uint64_t dev_rx_offloads_sup = DEV_RX_OFFLOAD_TCP_CKSUM | DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | DEV_RX_OFFLOAD_VLAN_FILTER | - DEV_RX_OFFLOAD_JUMBO_FRAME; + DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_PTYPE; /* Rx offloads which cannot be disabled */ static uint64_t dev_rx_offloads_nodis = diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 6f40b45a3..c556e11af 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -1373,7 +1373,8 @@ em_get_rx_port_offloads_capa(struct rte_eth_dev *dev) DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM | DEV_RX_OFFLOAD_KEEP_CRC | - DEV_RX_OFFLOAD_SCATTER; + DEV_RX_OFFLOAD_SCATTER | + DEV_RX_OFFLOAD_PTYPE; if (max_rx_pktlen > RTE_ETHER_MAX_LEN) rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME; diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index c5606de5d..f082bb9f1 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -1646,7 +1646,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev) DEV_RX_OFFLOAD_TCP_CKSUM | DEV_RX_OFFLOAD_JUMBO_FRAME | DEV_RX_OFFLOAD_KEEP_CRC | - DEV_RX_OFFLOAD_SCATTER; + DEV_RX_OFFLOAD_SCATTER | + DEV_RX_OFFLOAD_PTYPE; return rx_offload_capa; } diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index 6c5501acb..b6613922b 100644 --- a/drivers/net/enetc/enetc_ethdev.c +++ b/drivers/net/enetc/enetc_ethdev.c @@ -167,7 +167,8 @@ enetc_dev_infos_get(struct rte_eth_dev *dev __rte_unused, DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM | DEV_RX_OFFLOAD_KEEP_CRC | - DEV_RX_OFFLOAD_JUMBO_FRAME); + DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_PTYPE); } static int diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c index 9405e1933..395dccb5d 100644 --- a/drivers/net/enic/enic_res.c +++ b/drivers/net/enic/enic_res.c @@ -198,7 +198,8 @@ int enic_get_vnic_config(struct enic *enic) DEV_RX_OFFLOAD_VLAN_STRIP | DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM; + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_PTYPE; enic->tx_offload_mask = PKT_TX_IPV6 | PKT_TX_IPV4 | diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 96e05d4dc..b6f73a5fb 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -895,7 +895,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev, DEV_RX_OFFLOAD_JUMBO_FRAME | DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_TIMESTAMP | - DEV_RX_OFFLOAD_SECURITY; + DEV_RX_OFFLOAD_SECURITY | + DEV_RX_OFFLOAD_PTYPE; infos->rx_queue_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP | @@ -912,7 +913,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev, DEV_RX_OFFLOAD_JUMBO_FRAME | DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_TIMESTAMP | - DEV_RX_OFFLOAD_SECURITY; + DEV_RX_OFFLOAD_SECURITY | + DEV_RX_OFFLOAD_PTYPE; infos->tx_offload_capa = DEV_TX_OFFLOAD_MULTI_SEGS | diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index db4d72129..ed07dae2a 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -1791,13 +1791,14 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev) { RTE_SET_USED(dev); - return (uint64_t)(DEV_RX_OFFLOAD_VLAN_STRIP | - DEV_RX_OFFLOAD_VLAN_FILTER | - DEV_RX_OFFLOAD_IPV4_CKSUM | - DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM | - DEV_RX_OFFLOAD_JUMBO_FRAME | - DEV_RX_OFFLOAD_HEADER_SPLIT); + return (uint64_t)(DEV_RX_OFFLOAD_VLAN_STRIP | + DEV_RX_OFFLOAD_VLAN_FILTER | + DEV_RX_OFFLOAD_IPV4_CKSUM | + DEV_RX_OFFLOAD_UDP_CKSUM | + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_HEADER_SPLIT | + DEV_RX_OFFLOAD_PTYPE); } static int diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 4e40b7ab5..75f219b17 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -3511,7 +3511,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_VLAN_EXTEND | DEV_RX_OFFLOAD_VLAN_FILTER | - DEV_RX_OFFLOAD_JUMBO_FRAME; + DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_PTYPE; dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE; dev_info->tx_offload_capa = diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 8f3907378..7cf71ecd4 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -517,7 +517,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_JUMBO_FRAME | - DEV_RX_OFFLOAD_VLAN_FILTER; + DEV_RX_OFFLOAD_VLAN_FILTER | + DEV_RX_OFFLOAD_PTYPE; dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT | DEV_TX_OFFLOAD_QINQ_INSERT | diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 8c60a988a..28e3c6f8f 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2118,7 +2118,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) DEV_RX_OFFLOAD_JUMBO_FRAME | DEV_RX_OFFLOAD_KEEP_CRC | DEV_RX_OFFLOAD_SCATTER | - DEV_RX_OFFLOAD_VLAN_FILTER; + DEV_RX_OFFLOAD_VLAN_FILTER | + DEV_RX_OFFLOAD_PTYPE; dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT | DEV_TX_OFFLOAD_TCP_TSO | diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index edcfa60ce..942454cb4 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -2872,7 +2872,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev) DEV_RX_OFFLOAD_KEEP_CRC | DEV_RX_OFFLOAD_JUMBO_FRAME | DEV_RX_OFFLOAD_VLAN_FILTER | - DEV_RX_OFFLOAD_SCATTER; + DEV_RX_OFFLOAD_SCATTER | + DEV_RX_OFFLOAD_PTYPE; if (hw->mac.type == ixgbe_mac_82598EB) offloads |= DEV_RX_OFFLOAD_VLAN_STRIP; diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c index f45c1ff85..e915a7c6f 100644 --- a/drivers/net/mlx4/mlx4_rxq.c +++ b/drivers/net/mlx4/mlx4_rxq.c @@ -685,7 +685,8 @@ mlx4_get_rx_queue_offloads(struct mlx4_priv *priv) { uint64_t offloads = DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_KEEP_CRC | - DEV_RX_OFFLOAD_JUMBO_FRAME; + DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_PTYPE; if (priv->hw_csum) offloads |= DEV_RX_OFFLOAD_CHECKSUM; diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index a1fdeef2a..c3c35a7c1 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -368,7 +368,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev) struct mlx5_dev_config *config = &priv->config; uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_TIMESTAMP | - DEV_RX_OFFLOAD_JUMBO_FRAME); + DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_PTYPE); if (config->hw_fcs_strip) offloads |= DEV_RX_OFFLOAD_KEEP_CRC; diff --git a/drivers/net/mvneta/mvneta_ethdev.h b/drivers/net/mvneta/mvneta_ethdev.h index ef8067790..cee859679 100644 --- a/drivers/net/mvneta/mvneta_ethdev.h +++ b/drivers/net/mvneta/mvneta_ethdev.h @@ -55,7 +55,8 @@ /** Rx offloads capabilities */ #define MVNETA_RX_OFFLOADS (DEV_RX_OFFLOAD_JUMBO_FRAME | \ - DEV_RX_OFFLOAD_CHECKSUM) + DEV_RX_OFFLOAD_CHECKSUM | \ + DEV_RX_OFFLOAD_PTYPE) /** Tx offloads capabilities */ #define MVNETA_TX_OFFLOAD_CHECKSUM (DEV_TX_OFFLOAD_IPV4_CKSUM | \ diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index 810a703fc..e5dd96fa6 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -60,7 +60,8 @@ /** Port Rx offload capabilities */ #define MRVL_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_FILTER | \ DEV_RX_OFFLOAD_JUMBO_FRAME | \ - DEV_RX_OFFLOAD_CHECKSUM) + DEV_RX_OFFLOAD_CHECKSUM | \ + DEV_RX_OFFLOAD_PTYPE) /** Port Tx offloads capabilities */ #define MRVL_TX_OFFLOADS (DEV_TX_OFFLOAD_IPV4_CKSUM | \ diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c index a67bc7a79..13a9da90f 100644 --- a/drivers/net/netvsc/hn_rndis.c +++ b/drivers/net/netvsc/hn_rndis.c @@ -897,7 +897,8 @@ int hn_rndis_get_offload(struct hn_data *hv, == HN_NDIS_LSOV2_CAP_IP6) dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO; - dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP; + dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP | + DEV_RX_OFFLOAD_PTYPE; if (hwcaps.ndis_csum.ndis_ip4_rxcsum & NDIS_RXCSUM_CAP_IP4) dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_IPV4_CKSUM; diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index f1a3ef2f9..ce27ac763 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -1226,7 +1226,8 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM; - dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME; + dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_PTYPE; if (hw->cap & NFP_NET_CFG_CTRL_TXVLAN) dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT; diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h index fd2e99edf..20703977e 100644 --- a/drivers/net/octeontx/octeontx_ethdev.h +++ b/drivers/net/octeontx/octeontx_ethdev.h @@ -29,7 +29,8 @@ #define OCTEONTX_MAX_BGX_PORTS 4 #define OCTEONTX_MAX_LMAC_PER_BGX 4 -#define OCTEONTX_RX_OFFLOADS DEV_RX_OFFLOAD_CHECKSUM +#define OCTEONTX_RX_OFFLOADS (DEV_RX_OFFLOAD_CHECKSUM | \ + DEV_RX_OFFLOAD_PTYPE) #define OCTEONTX_TX_OFFLOADS DEV_TX_OFFLOAD_MT_LOCKFREE static inline struct octeontx_nic * diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index b84128fef..ca01bf081 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -590,6 +590,11 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev) if ((dev->rx_offloads & DEV_RX_OFFLOAD_TIMESTAMP)) flags |= NIX_RX_OFFLOAD_TSTAMP_F; + if ((dev->rx_offloads & DEV_RX_OFFLOAD_PTYPE)) + flags |= NIX_RX_OFFLOAD_PTYPE_F; + else + flags &= ~NIX_RX_OFFLOAD_PTYPE_F; + return flags; } diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h index 7b15d6bc8..2eeb07c9c 100644 --- a/drivers/net/octeontx2/otx2_ethdev.h +++ b/drivers/net/octeontx2/otx2_ethdev.h @@ -122,8 +122,8 @@ DEV_TX_OFFLOAD_MT_LOCKFREE | \ DEV_TX_OFFLOAD_VLAN_INSERT | \ DEV_TX_OFFLOAD_QINQ_INSERT | \ - DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \ - DEV_TX_OFFLOAD_OUTER_UDP_CKSUM | \ + DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \ + DEV_TX_OFFLOAD_OUTER_UDP_CKSUM | \ DEV_TX_OFFLOAD_TCP_CKSUM | \ DEV_TX_OFFLOAD_UDP_CKSUM | \ DEV_TX_OFFLOAD_SCTP_CKSUM | \ @@ -136,11 +136,12 @@ DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \ DEV_RX_OFFLOAD_SCATTER | \ DEV_RX_OFFLOAD_JUMBO_FRAME | \ - DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \ - DEV_RX_OFFLOAD_VLAN_STRIP | \ - DEV_RX_OFFLOAD_VLAN_FILTER | \ - DEV_RX_OFFLOAD_QINQ_STRIP | \ - DEV_RX_OFFLOAD_TIMESTAMP) + DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \ + DEV_RX_OFFLOAD_VLAN_STRIP | \ + DEV_RX_OFFLOAD_VLAN_FILTER | \ + DEV_RX_OFFLOAD_QINQ_STRIP | \ + DEV_RX_OFFLOAD_TIMESTAMP | \ + DEV_RX_OFFLOAD_PTYPE) #define NIX_DEFAULT_RSS_CTX_GROUP 0 #define NIX_DEFAULT_RSS_MCAM_IDX -1 diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 528b33e8c..2af69416b 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -1291,7 +1291,8 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev, DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_JUMBO_FRAME | DEV_RX_OFFLOAD_VLAN_FILTER | - DEV_RX_OFFLOAD_VLAN_STRIP); + DEV_RX_OFFLOAD_VLAN_STRIP | + DEV_RX_OFFLOAD_PTYPE); dev_info->rx_queue_offload_capa = 0; /* TX offloads are on a per-packet basis, so it is applicable diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 64bd04911..21307d9b9 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -336,7 +336,8 @@ tap_rx_offload_get_queue_capa(void) return DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM; + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_PTYPE; } /* Callback to handle the rx burst of packets to the correct interface and diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h index c0bfbf848..6b1e433d2 100644 --- a/drivers/net/thunderx/nicvf_ethdev.h +++ b/drivers/net/thunderx/nicvf_ethdev.h @@ -41,7 +41,8 @@ DEV_RX_OFFLOAD_CHECKSUM | \ DEV_RX_OFFLOAD_VLAN_STRIP | \ DEV_RX_OFFLOAD_JUMBO_FRAME | \ - DEV_RX_OFFLOAD_SCATTER) + DEV_RX_OFFLOAD_SCATTER | \ + DEV_RX_OFFLOAD_PTYPE) #define NICVF_DEFAULT_RX_FREE_THRESH 224 #define NICVF_DEFAULT_TX_FREE_THRESH 224 diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 57feb3773..2276c811a 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -58,7 +58,8 @@ DEV_RX_OFFLOAD_UDP_CKSUM | \ DEV_RX_OFFLOAD_TCP_CKSUM | \ DEV_RX_OFFLOAD_TCP_LRO | \ - DEV_RX_OFFLOAD_JUMBO_FRAME) + DEV_RX_OFFLOAD_JUMBO_FRAME | \ + DEV_RX_OFFLOAD_PTYPE) static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev); static int eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev); -- 2.17.1