DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/avp: conforming to new ethdev offload API
@ 2018-03-19 13:48 Allain Legacy
  2018-03-27 19:09 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Allain Legacy @ 2018-03-19 13:48 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, matt.peters

This change updates the AVP driver to conform with the new ethdev
offload API.  As per these commits:

    commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")'
    commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")'

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
---
 drivers/net/avp/avp_ethdev.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index dba99120f..2f3cdef1a 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -2074,12 +2074,6 @@ avp_dev_start(struct rte_eth_dev *eth_dev)
 		goto unlock;
 	}
 
-	/* disable features that we do not support */
-	eth_dev->data->dev_conf.rxmode.hw_ip_checksum = 0;
-	eth_dev->data->dev_conf.rxmode.hw_vlan_filter = 0;
-	eth_dev->data->dev_conf.rxmode.hw_vlan_extend = 0;
-	eth_dev->data->dev_conf.rxmode.hw_strip_crc = 0;
-
 	/* update link state */
 	ret = avp_dev_ctrl_set_link_state(eth_dev, 1);
 	if (ret < 0) {
@@ -2222,10 +2216,12 @@ static int
 avp_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 {
 	struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
+	struct rte_eth_conf *dev_conf = &eth_dev->data->dev_conf;
+	uint64_t offloads = dev_conf->rxmode.offloads;
 
 	if (mask & ETH_VLAN_STRIP_MASK) {
 		if (avp->host_features & RTE_AVP_FEATURE_VLAN_OFFLOAD) {
-			if (eth_dev->data->dev_conf.rxmode.hw_vlan_strip)
+			if (offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
 				avp->features |= RTE_AVP_FEATURE_VLAN_OFFLOAD;
 			else
 				avp->features &= ~RTE_AVP_FEATURE_VLAN_OFFLOAD;
@@ -2235,12 +2231,12 @@ avp_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 	}
 
 	if (mask & ETH_VLAN_FILTER_MASK) {
-		if (eth_dev->data->dev_conf.rxmode.hw_vlan_filter)
+		if (offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 			PMD_DRV_LOG(ERR, "VLAN filter offload not supported\n");
 	}
 
 	if (mask & ETH_VLAN_EXTEND_MASK) {
-		if (eth_dev->data->dev_conf.rxmode.hw_vlan_extend)
+		if (offloads & DEV_RX_OFFLOAD_VLAN_EXTEND)
 			PMD_DRV_LOG(ERR, "VLAN extend offload not supported\n");
 	}
 
-- 
2.12.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/avp: conforming to new ethdev offload API
  2018-03-19 13:48 [dpdk-dev] [PATCH] net/avp: conforming to new ethdev offload API Allain Legacy
@ 2018-03-27 19:09 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2018-03-27 19:09 UTC (permalink / raw)
  To: Allain Legacy; +Cc: dev, matt.peters

On 3/19/2018 1:48 PM, Allain Legacy wrote:
> This change updates the AVP driver to conform with the new ethdev
> offload API.  As per these commits:
> 
>     commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")'
>     commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")'
> 
> Signed-off-by: Allain Legacy <allain.legacy@windriver.com>

Applied to dpdk-next-net/master, thanks.


btw, it seems AVP driver not switched to the SPDX tags yet, do you have any plan
for it?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-27 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 13:48 [dpdk-dev] [PATCH] net/avp: conforming to new ethdev offload API Allain Legacy
2018-03-27 19:09 ` Ferruh Yigit

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).