* Re: [dpdk-dev] [PATCH 5/7] net: update Rx flow action offload capabilities
@ 2019-08-17 12:31 Pavan Nikhilesh Bhagavatula
0 siblings, 0 replies; 3+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2019-08-17 12:31 UTC (permalink / raw)
To: Andrew Rybchenko, Jerin Jacob Kollanukkaran, ferruh.yigit,
Ajit Khaparde, Somnath Kotur, John Daley, Hyong Youb Kim,
Beilei Xing, Qi Zhang, Jingjing Wu, Wenzhuo Lu, Qiming Yang,
Konstantin Ananyev, Shahaf Shuler, Yongseok Koh,
Viacheslav Ovsiienko, Nithin Kumar Dabilpuram,
Kiran Kumar Kokkilagadda
Cc: dev
>Prefix "net: " is typically used for lib/librte_net. It should be
>"drivers/net: " here.
>
>"Rx flow action offload" sounds strange. May be "Rx flow mark offload".
>
>On 8/16/19 8:55 AM, pbhagavatula@marvell.com wrote:
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Add DEV_RX_OFFLOAD_FLOW_MARK flag for all supported NICs.
>
>"all supported NICs" sounds wrong here as well.
>It sounds like all NICs supported by DPDK.
>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
>[snip]
>
>> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
>> index 695580b22..0f842e9e9 100644
>> --- a/drivers/net/sfc/sfc_rx.c
>> +++ b/drivers/net/sfc/sfc_rx.c
>> @@ -619,7 +619,8 @@ struct sfc_dp_rx sfc_efx_rx = {
>> .features = SFC_DP_RX_FEAT_INTR,
>> .dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM,
>> .queue_offload_capa = DEV_RX_OFFLOAD_SCATTER |
>> - DEV_RX_OFFLOAD_RSS_HASH,
>> + DEV_RX_OFFLOAD_RSS_HASH |
>> + DEV_RX_OFFLOAD_FLOW_MARK,
>> .qsize_up_rings = sfc_efx_rx_qsize_up_rings,
>> .qcreate = sfc_efx_rx_qcreate,
>> .qdestroy = sfc_efx_rx_qdestroy,
>
>In the case of net/sfc it is supported by sfc_ef10_essb_rx only
>(drivers/net/sfc/sfc_ef10_essb_rx.c).
Will fix in v2.
Pavan.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH 0/7] ethdev: add new Rx offload flags
@ 2019-08-16 5:55 pbhagavatula
2019-08-16 5:55 ` [dpdk-dev] [PATCH 5/7] net: update Rx flow action offload capabilities pbhagavatula
0 siblings, 1 reply; 3+ messages in thread
From: pbhagavatula @ 2019-08-16 5:55 UTC (permalink / raw)
To: jerinj, ferruh.yigit; +Cc: dev, Pavan Nikhilesh
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Add new Rx offload flags `DEV_RX_OFFLOAD_RSS_HASH` and
`DEV_RX_OFFLOAD_FLOW_MARK`. These flags can be used to enable/disable PMD
writes to rte_mbuf fields `hash.rss` and `hash.fdir.hi` and also
`ol_flags:PKT_RX_RSS` and `ol_flags:PKT_RX_FDIR`.
Add new packet type set function `rte_eth_dev_set_supported_ptypes`, allows
application to inform PMDs about the packet types it is interested in.
Based on ptypes requested by application PMDs can optimize the Rx path.
For example, if a given PMD doesn't support any packet types that the
application is interested in then the application can disable[1] writes
to `mbuf.packet_type` done by the PMD and use a software ptype parser.
[1] rte_eth_dev_set_supported_ptypes(*port_id*, 0);
Pavan Nikhilesh (7):
ethdev: add set ptype function
ethdev: add mbuf RSS update as a offload
ethdev: add flow action type update as an offload
net: update Rx RSS hash offload capabilities
net: update Rx flow action offload capabilities
net: add ptype set default functionality
examples/eventdev_pipeline: add new Rx RSS hash offload
doc/guides/nics/features.rst | 24 ++++++++++++++++++---
drivers/net/atlantic/atl_ethdev.c | 12 +++++++++++
drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++++++-
drivers/net/cxgbe/cxgbe.h | 3 ++-
drivers/net/cxgbe/cxgbe_ethdev.c | 10 +++++++++
drivers/net/dpaa/dpaa_ethdev.c | 13 +++++++++++-
drivers/net/dpaa2/dpaa2_ethdev.c | 13 +++++++++++-
drivers/net/e1000/igb_ethdev.c | 13 ++++++++++++
drivers/net/e1000/igb_rxtx.c | 3 ++-
drivers/net/enetc/enetc_ethdev.c | 10 +++++++++
drivers/net/enic/enic_ethdev.c | 10 +++++++++
drivers/net/enic/enic_res.c | 4 +++-
drivers/net/failsafe/failsafe_ops.c | 10 +++++++++
drivers/net/fm10k/fm10k_ethdev.c | 13 +++++++++++-
drivers/net/hinic/hinic_pmd_ethdev.c | 3 ++-
drivers/net/i40e/i40e_ethdev.c | 5 ++++-
drivers/net/i40e/i40e_ethdev_vf.c | 1 +
drivers/net/i40e/i40e_rxtx.c | 9 ++++++++
drivers/net/i40e/i40e_rxtx.h | 1 +
drivers/net/iavf/iavf_ethdev.c | 16 +++++++++++++-
drivers/net/ice/ice_ethdev.c | 5 ++++-
drivers/net/ice/ice_rxtx.c | 9 ++++++++
drivers/net/ice/ice_rxtx.h | 1 +
drivers/net/ixgbe/ixgbe_ethdev.c | 13 ++++++++++++
drivers/net/ixgbe/ixgbe_rxtx.c | 4 +++-
drivers/net/liquidio/lio_ethdev.c | 3 ++-
drivers/net/mlx4/mlx4.c | 1 +
drivers/net/mlx4/mlx4.h | 1 +
drivers/net/mlx4/mlx4_ethdev.c | 21 +++++++++++++++++++
drivers/net/mlx4/mlx4_rxq.c | 3 ++-
drivers/net/mlx5/mlx5.c | 2 ++
drivers/net/mlx5/mlx5.h | 1 +
drivers/net/mlx5/mlx5_ethdev.c | 21 +++++++++++++++++++
drivers/net/mlx5/mlx5_rxq.c | 4 +++-
drivers/net/mvneta/mvneta_ethdev.c | 22 +++++++++++++++++++
drivers/net/mvpp2/mrvl_ethdev.c | 22 +++++++++++++++++++
drivers/net/netvsc/hn_ethdev.c | 3 ++-
drivers/net/netvsc/hn_rndis.c | 3 ++-
drivers/net/netvsc/hn_var.h | 3 ++-
drivers/net/netvsc/hn_vf.c | 10 ++++++++-
drivers/net/nfp/nfp_net.c | 13 +++++++++++-
drivers/net/octeontx/octeontx_ethdev.c | 10 +++++++++
drivers/net/octeontx2/otx2_ethdev.c | 4 +++-
drivers/net/octeontx2/otx2_ethdev.h | 17 ++++++++-------
drivers/net/octeontx2/otx2_flow_parse.c | 3 ++-
drivers/net/octeontx2/otx2_lookup.c | 9 ++++++++
drivers/net/qede/qede_ethdev.c | 14 ++++++++++++-
drivers/net/sfc/sfc_ethdev.c | 11 ++++++++++
drivers/net/sfc/sfc_rx.c | 4 +++-
drivers/net/tap/rte_eth_tap.c | 10 +++++++++
drivers/net/thunderx/nicvf_ethdev.c | 10 +++++++++
drivers/net/thunderx/nicvf_ethdev.h | 3 ++-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 15 ++++++++++++-
examples/eventdev_pipeline/main.c | 4 ++++
lib/librte_ethdev/rte_ethdev.c | 28 +++++++++++++++++++++++++
lib/librte_ethdev/rte_ethdev.h | 19 +++++++++++++++++
lib/librte_ethdev/rte_ethdev_core.h | 6 ++++++
57 files changed, 483 insertions(+), 36 deletions(-)
--
2.22.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH 5/7] net: update Rx flow action offload capabilities
2019-08-16 5:55 [dpdk-dev] [PATCH 0/7] ethdev: add new Rx offload flags pbhagavatula
@ 2019-08-16 5:55 ` pbhagavatula
2019-08-16 7:50 ` Andrew Rybchenko
0 siblings, 1 reply; 3+ messages in thread
From: pbhagavatula @ 2019-08-16 5:55 UTC (permalink / raw)
To: jerinj, ferruh.yigit, Ajit Khaparde, Somnath Kotur, John Daley,
Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu, Wenzhuo Lu,
Qiming Yang, Konstantin Ananyev, Shahaf Shuler, Yongseok Koh,
Viacheslav Ovsiienko, Nithin Dabilpuram, Kiran Kumar K,
Andrew Rybchenko
Cc: dev, Pavan Nikhilesh
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Add DEV_RX_OFFLOAD_FLOW_MARK flag for all supported NICs.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
drivers/net/enic/enic_res.c | 3 ++-
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/mlx5/mlx5_rxq.c | 3 ++-
drivers/net/octeontx2/otx2_ethdev.h | 3 ++-
drivers/net/octeontx2/otx2_flow_parse.c | 3 ++-
drivers/net/sfc/sfc_rx.c | 3 ++-
10 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6c106baf7..fd1fb7eda 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -161,7 +161,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
DEV_RX_OFFLOAD_JUMBO_FRAME | \
DEV_RX_OFFLOAD_KEEP_CRC | \
DEV_RX_OFFLOAD_TCP_LRO | \
- DEV_RX_OFFLOAD_RSS_HASH)
+ DEV_RX_OFFLOAD_RSS_HASH | \
+ DEV_RX_OFFLOAD_FLOW_MARK)
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/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 607a085f8..3503d5d7e 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -199,7 +199,8 @@ int enic_get_vnic_config(struct enic *enic)
DEV_RX_OFFLOAD_IPV4_CKSUM |
DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM |
- DEV_RX_OFFLOAD_RSS_HASH;
+ DEV_RX_OFFLOAD_RSS_HASH |
+ DEV_RX_OFFLOAD_FLOW_MARK;
enic->tx_offload_mask =
PKT_TX_IPV6 |
PKT_TX_IPV4 |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7058e0213..6311943be 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3512,7 +3512,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
DEV_RX_OFFLOAD_VLAN_EXTEND |
DEV_RX_OFFLOAD_VLAN_FILTER |
DEV_RX_OFFLOAD_JUMBO_FRAME |
- DEV_RX_OFFLOAD_RSS_HASH;
+ DEV_RX_OFFLOAD_RSS_HASH |
+ DEV_RX_OFFLOAD_FLOW_MARK;
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 aef91a79b..7bdaa87b1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -518,7 +518,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
DEV_RX_OFFLOAD_SCATTER |
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_VLAN_FILTER |
- DEV_RX_OFFLOAD_RSS_HASH;
+ DEV_RX_OFFLOAD_RSS_HASH |
+ DEV_RX_OFFLOAD_FLOW_MARK;
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 fc0f0003f..8b8d55e4a 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2134,7 +2134,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
DEV_RX_OFFLOAD_QINQ_STRIP |
DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
DEV_RX_OFFLOAD_VLAN_EXTEND |
- DEV_RX_OFFLOAD_RSS_HASH;
+ DEV_RX_OFFLOAD_RSS_HASH |
+ DEV_RX_OFFLOAD_FLOW_MARK;
dev_info->tx_offload_capa |=
DEV_TX_OFFLOAD_QINQ_INSERT |
DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index fa572d184..1481e2426 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2873,7 +2873,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_VLAN_FILTER |
DEV_RX_OFFLOAD_SCATTER |
- DEV_RX_OFFLOAD_RSS_HASH;
+ DEV_RX_OFFLOAD_RSS_HASH |
+ DEV_RX_OFFLOAD_FLOW_MARK;
if (hw->mac.type == ixgbe_mac_82598EB)
offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index b5fd57693..1bf01bda3 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -369,7 +369,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
DEV_RX_OFFLOAD_TIMESTAMP |
DEV_RX_OFFLOAD_JUMBO_FRAME |
- DEV_RX_OFFLOAD_RSS_HASH);
+ DEV_RX_OFFLOAD_RSS_HASH |
+ DEV_RX_OFFLOAD_FLOW_MARK);
if (config->hw_fcs_strip)
offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 0cca6746d..97c1a636a 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -141,7 +141,8 @@
DEV_RX_OFFLOAD_VLAN_FILTER | \
DEV_RX_OFFLOAD_QINQ_STRIP | \
DEV_RX_OFFLOAD_TIMESTAMP | \
- DEV_RX_OFFLOAD_RSS_HASH)
+ DEV_RX_OFFLOAD_RSS_HASH | \
+ DEV_RX_OFFLOAD_FLOW_MARK)
#define NIX_DEFAULT_RSS_CTX_GROUP 0
#define NIX_DEFAULT_RSS_MCAM_IDX -1
diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 6670c1a70..bf0a160be 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -979,7 +979,8 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
if (mark)
flow->npc_action |= (uint64_t)mark << 40;
- if (rte_atomic32_read(&npc->mark_actions) == 1) {
+ if (rte_atomic32_read(&npc->mark_actions) == 1 &&
+ (hw->rx_offloads & DEV_RX_OFFLOAD_FLOW_MARK)) {
hw->rx_offload_flags |=
NIX_RX_OFFLOAD_MARK_UPDATE_F;
otx2_eth_set_rx_function(dev);
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 695580b22..0f842e9e9 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -619,7 +619,8 @@ struct sfc_dp_rx sfc_efx_rx = {
.features = SFC_DP_RX_FEAT_INTR,
.dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM,
.queue_offload_capa = DEV_RX_OFFLOAD_SCATTER |
- DEV_RX_OFFLOAD_RSS_HASH,
+ DEV_RX_OFFLOAD_RSS_HASH |
+ DEV_RX_OFFLOAD_FLOW_MARK,
.qsize_up_rings = sfc_efx_rx_qsize_up_rings,
.qcreate = sfc_efx_rx_qcreate,
.qdestroy = sfc_efx_rx_qdestroy,
--
2.22.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH 5/7] net: update Rx flow action offload capabilities
2019-08-16 5:55 ` [dpdk-dev] [PATCH 5/7] net: update Rx flow action offload capabilities pbhagavatula
@ 2019-08-16 7:50 ` Andrew Rybchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Rybchenko @ 2019-08-16 7:50 UTC (permalink / raw)
To: pbhagavatula, jerinj, ferruh.yigit, Ajit Khaparde, Somnath Kotur,
John Daley, Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu,
Wenzhuo Lu, Qiming Yang, Konstantin Ananyev, Shahaf Shuler,
Yongseok Koh, Viacheslav Ovsiienko, Nithin Dabilpuram,
Kiran Kumar K
Cc: dev
Prefix "net: " is typically used for lib/librte_net. It should be
"drivers/net: " here.
"Rx flow action offload" sounds strange. May be "Rx flow mark offload".
On 8/16/19 8:55 AM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add DEV_RX_OFFLOAD_FLOW_MARK flag for all supported NICs.
"all supported NICs" sounds wrong here as well.
It sounds like all NICs supported by DPDK.
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
[snip]
> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
> index 695580b22..0f842e9e9 100644
> --- a/drivers/net/sfc/sfc_rx.c
> +++ b/drivers/net/sfc/sfc_rx.c
> @@ -619,7 +619,8 @@ struct sfc_dp_rx sfc_efx_rx = {
> .features = SFC_DP_RX_FEAT_INTR,
> .dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM,
> .queue_offload_capa = DEV_RX_OFFLOAD_SCATTER |
> - DEV_RX_OFFLOAD_RSS_HASH,
> + DEV_RX_OFFLOAD_RSS_HASH |
> + DEV_RX_OFFLOAD_FLOW_MARK,
> .qsize_up_rings = sfc_efx_rx_qsize_up_rings,
> .qcreate = sfc_efx_rx_qcreate,
> .qdestroy = sfc_efx_rx_qdestroy,
In the case of net/sfc it is supported by sfc_ef10_essb_rx only
(drivers/net/sfc/sfc_ef10_essb_rx.c).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-17 12:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-17 12:31 [dpdk-dev] [PATCH 5/7] net: update Rx flow action offload capabilities Pavan Nikhilesh Bhagavatula
-- strict thread matches above, loose matches on Subject: below --
2019-08-16 5:55 [dpdk-dev] [PATCH 0/7] ethdev: add new Rx offload flags pbhagavatula
2019-08-16 5:55 ` [dpdk-dev] [PATCH 5/7] net: update Rx flow action offload capabilities pbhagavatula
2019-08-16 7:50 ` Andrew Rybchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).