DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qiming Yang <qiming.yang@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, paul.m.stillwell.jr@intel.com,
	Qiming Yang <qiming.yang@intel.com>
Subject: [dpdk-dev] [PATCH v2 3/4] net/ice: enable RSS when device init
Date: Wed, 20 Mar 2019 23:50:24 +0800	[thread overview]
Message-ID: <20190320155025.138173-4-qiming.yang@intel.com> (raw)
Message-ID: <20190320155024.hKMjlLh6AB86e9FIQaq6f9ZRXASaIFlgSmE61NpbHaU@z> (raw)
In-Reply-To: <20190320155025.138173-1-qiming.yang@intel.com>

This patch enabled RSS for UPD/TCP/SCTP+IPV4/IPV6 packets.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index a217da8..60aaedc 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -10,6 +10,7 @@
 #include <rte_ethdev_pci.h>
 
 #include "base/ice_sched.h"
+#include "base/ice_flow.h"
 #include "ice_ethdev.h"
 #include "ice_rxtx.h"
 
@@ -1627,6 +1628,44 @@ static int ice_init_rss(struct ice_pf *pf)
 	if (ret)
 		return -EINVAL;
 
+	/* configure RSS for tcp4 with input set IP src/dst, TCP src/dst */
+	ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV4,
+			      ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV4);
+	if (ret)
+		PMD_DRV_LOG(ERR, "%s TCP_IPV4 rss flow fail %d", __func__, ret);
+
+	/* configure RSS for udp4 with input set IP src/dst, UDP src/dst */
+	ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV4,
+			      ICE_FLOW_SEG_HDR_UDP | ICE_FLOW_SEG_HDR_IPV4);
+	if (ret)
+		PMD_DRV_LOG(ERR, "%s UDP_IPV4 rss flow fail %d", __func__, ret);
+
+	/* configure RSS for sctp4 with input set IP src/dst */
+	ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4,
+			      ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV4);
+	if (ret)
+		PMD_DRV_LOG(ERR, "%s SCTP_IPV4 rss flow fail %d",
+				__func__, ret);
+
+	/* configure RSS for tcp6 with input set IPv6 src/dst, TCP src/dst */
+	ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV6,
+			      ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV6);
+	if (ret)
+	PMD_DRV_LOG(ERR, "%s TCP_IPV6 rss flow fail %d", __func__, ret);
+
+	/* configure RSS for udp6 with input set IPv6 src/dst, UDP src/dst */
+	ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV6,
+			      ICE_FLOW_SEG_HDR_UDP | ICE_FLOW_SEG_HDR_IPV6);
+	if (ret)
+		PMD_DRV_LOG(ERR, "%s UDP_IPV6 flow fail %d", __func__, ret);
+
+	/* configure RSS for sctp6 with input set IPv6 src/dst */
+	ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV6,
+			      ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV6);
+	if (ret)
+		PMD_DRV_LOG(ERR, "%s SCTP_IPV6 rss flow fail %d",
+				__func__, ret);
+
 	return 0;
 }
 
-- 
2.9.5


  parent reply	other threads:[~2019-03-20  8:27 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01 12:46 [dpdk-dev] [PATCH 1/2] net/ice: suppport package download Qiming Yang
2019-03-01 12:46 ` [dpdk-dev] [PATCH 2/2] net/ice: disable advanced features in safe mode Qiming Yang
2019-03-01 18:38   ` Stephen Hemminger
2019-03-01 20:41   ` Stillwell Jr, Paul M
2019-03-01 13:40 ` [dpdk-dev] [PATCH 1/2] net/ice: suppport package download Thomas Monjalon
2019-03-06  2:36   ` Yang, Qiming
2019-03-01 18:39 ` Stephen Hemminger
2019-03-01 18:40 ` Stephen Hemminger
2019-03-04 17:54 ` Stillwell Jr, Paul M
2019-03-20 15:50 ` [dpdk-dev] [PATCH v2 0/4] enable package download in ice driver Qiming Yang
2019-03-20 15:50   ` Qiming Yang
2019-03-20 15:50   ` [dpdk-dev] [PATCH v2 1/4] net/ice: load OS default package Qiming Yang
2019-03-20 15:50     ` Qiming Yang
2019-03-20 15:50   ` [dpdk-dev] [PATCH v2 2/4] net/ice: add safe mode Qiming Yang
2019-03-20 15:50     ` Qiming Yang
2019-03-20 15:50   ` Qiming Yang [this message]
2019-03-20 15:50     ` [dpdk-dev] [PATCH v2 3/4] net/ice: enable RSS when device init Qiming Yang
2019-03-20 15:50   ` [dpdk-dev] [PATCH v2 4/4] doc: add document update for package download Qiming Yang
2019-03-20 15:50     ` Qiming Yang
2019-03-20 17:59   ` [dpdk-dev] [PATCH v3 0/3] enable package download in ice driver Qiming Yang
2019-03-20 17:59     ` Qiming Yang
2019-03-20 17:59     ` [dpdk-dev] [PATCH v3 1/3] net/ice: load OS default package Qiming Yang
2019-03-20 17:59       ` Qiming Yang
2019-03-20 17:59     ` [dpdk-dev] [PATCH v3 2/3] net/ice: add safe mode Qiming Yang
2019-03-20 17:59       ` Qiming Yang
2019-03-20 17:59     ` [dpdk-dev] [PATCH v3 3/3] net/ice: enable RSS when device init Qiming Yang
2019-03-20 17:59       ` Qiming Yang
2019-03-21 15:02     ` [dpdk-dev] [PATCH v4 0/3] enable package download in ice driver Qiming Yang
2019-03-21 15:02       ` Qiming Yang
2019-03-21 15:02       ` [dpdk-dev] [PATCH v4 1/3] net/ice: load OS default package Qiming Yang
2019-03-21 15:02         ` Qiming Yang
2019-03-25  2:29         ` [dpdk-dev] [PATCH v5 0/3] enable package download in ice driver Qiming Yang
2019-03-25  2:29           ` Qiming Yang
2019-03-25  2:29           ` [dpdk-dev] [PATCH v5 1/3] net/ice: load OS default package Qiming Yang
2019-03-25  2:29             ` Qiming Yang
2019-03-25  2:29           ` [dpdk-dev] [PATCH v5 2/3] net/ice: add safe mode Qiming Yang
2019-03-25  2:29             ` Qiming Yang
2019-03-25  2:29           ` [dpdk-dev] [PATCH v5 3/3] net/ice: enable RSS when device init Qiming Yang
2019-03-25  2:29             ` Qiming Yang
2019-03-25  4:25           ` [dpdk-dev] [PATCH v5 0/3] enable package download in ice driver Stillwell Jr, Paul M
2019-03-25  4:25             ` Stillwell Jr, Paul M
2019-03-25  9:00         ` [dpdk-dev] [PATCH v6 " Qiming Yang
2019-03-25  9:00           ` Qiming Yang
2019-03-25  9:01           ` [dpdk-dev] [PATCH v6 1/3] net/ice: load OS default package Qiming Yang
2019-03-25  9:01             ` Qiming Yang
2019-03-25 13:56             ` Zhang, Qi Z
2019-03-25 13:56               ` Zhang, Qi Z
2019-03-25  9:01           ` [dpdk-dev] [PATCH v6 2/3] net/ice: add safe mode Qiming Yang
2019-03-25  9:01             ` Qiming Yang
2019-03-25  9:01           ` [dpdk-dev] [PATCH v6 3/3] net/ice: enable RSS when device init Qiming Yang
2019-03-25  9:01             ` Qiming Yang
2019-03-25 14:00           ` [dpdk-dev] [PATCH v6 0/3] enable package download in ice driver Zhang, Qi Z
2019-03-25 14:00             ` Zhang, Qi Z
2019-03-21 15:02       ` [dpdk-dev] [PATCH v4 2/3] net/ice: add safe mode Qiming Yang
2019-03-21 15:02         ` Qiming Yang
2019-03-21 15:02       ` [dpdk-dev] [PATCH v4 3/3] net/ice: enable RSS when device init Qiming Yang
2019-03-21 15:02         ` Qiming Yang
2019-03-21 15:02       ` [dpdk-dev] [PATCH v4 0/3] enable package download in ice driver Qiming Yang
2019-03-21 15:02         ` Qiming Yang
2019-03-21 15:02       ` [dpdk-dev] [PATCH v4 1/3] net/ice: load OS default package Qiming Yang
2019-03-21 15:02         ` Qiming Yang
2019-03-21 15:02       ` [dpdk-dev] [PATCH v4 2/3] net/ice: add safe mode Qiming Yang
2019-03-21 15:02         ` Qiming Yang
2019-03-21 15:02       ` [dpdk-dev] [PATCH v4 3/3] net/ice: enable RSS when device init Qiming Yang
2019-03-21 15:02         ` Qiming Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190320155025.138173-4-qiming.yang@intel.com \
    --to=qiming.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=paul.m.stillwell.jr@intel.com \
    --cc=qi.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).