summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQiming Yang <qiming.yang@intel.com>2019-03-25 17:01:02 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-29 17:25:31 +0100
commitd7d150b93070d590aedc0938baa30948ce27d3f0 (patch)
tree594e4a97dd90bcc0777002b95afb90b52029ad38 /drivers
parent37f4ac5f5946655fddedb8a78c079f2b190fa70e (diff)
downloaddpdk-next-eventdev-d7d150b93070d590aedc0938baa30948ce27d3f0.zip
dpdk-next-eventdev-d7d150b93070d590aedc0938baa30948ce27d3f0.tar.gz
dpdk-next-eventdev-d7d150b93070d590aedc0938baa30948ce27d3f0.tar.xz
net/ice: enable RSS when device init
This patch enabled RSS for UPD/TCP/SCTP+IPV4/IPV6 packets. Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ice/ice_ethdev.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c1c1efc..85311dd 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -10,6 +10,7 @@
#include <unistd.h>
#include "base/ice_sched.h"
+#include "base/ice_flow.h"
#include "ice_ethdev.h"
#include "ice_rxtx.h"
@@ -1634,6 +1635,44 @@ static int ice_init_rss(struct ice_pf *pf)
if (ret)
return -EINVAL;
+ /* 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 rss 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);
+
+ /* 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);
+
return 0;
}