[v1,03/12] net/ice: complete dev configure in DCF
diff mbox series

Message ID 20200605201737.33766-4-ting.xu@intel.com
State Superseded
Delegated to: xiaolong ye
Headers show
Series
  • enable DCF datapath configuration
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ting Xu June 5, 2020, 8:17 p.m. UTC
From: Qi Zhang <qi.z.zhang@intel.com>

Enable device configuration function in DCF.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Xiaolong Ye June 5, 2020, 2:56 p.m. UTC | #1
On 06/05, Ting Xu wrote:
>From: Qi Zhang <qi.z.zhang@intel.com>
>
>Enable device configuration function in DCF.
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
> drivers/net/ice/ice_dcf_ethdev.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
>diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
>index 7f24ef81a..e8bed1362 100644
>--- a/drivers/net/ice/ice_dcf_ethdev.c
>+++ b/drivers/net/ice/ice_dcf_ethdev.c
>@@ -59,6 +59,15 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)
> static int
> ice_dcf_dev_configure(__rte_unused struct rte_eth_dev *dev)

__rte_unused tag should be removed.

> {
>+	struct ice_dcf_adapter *dcf_ad = dev->data->dev_private;
>+	struct ice_adapter *ad = &dcf_ad->parent;
>+
>+	ad->rx_bulk_alloc_allowed = true;
>+	ad->tx_simple_allowed = true;
>+
>+	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
>+		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
>+
> 	return 0;
> }
> 
>-- 
>2.17.1
>

Patch
diff mbox series

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 7f24ef81a..e8bed1362 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -59,6 +59,15 @@  ice_dcf_dev_stop(struct rte_eth_dev *dev)
 static int
 ice_dcf_dev_configure(__rte_unused struct rte_eth_dev *dev)
 {
+	struct ice_dcf_adapter *dcf_ad = dev->data->dev_private;
+	struct ice_adapter *ad = &dcf_ad->parent;
+
+	ad->rx_bulk_alloc_allowed = true;
+	ad->tx_simple_allowed = true;
+
+	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
+		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
 	return 0;
 }