[dpdk-dev] net/dpaa2: change vlan strip value to offload flag

Message ID 20180514105826.10964-1-shreyansh.jain@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

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

Commit Message

Shreyansh Jain May 14, 2018, 10:58 a.m. UTC
  Fixes: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")
Cc: sunil.kori@nxp.com

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
Note: Though checkpatch produces a warning for 80 char, this is more readable
      than splitting it across multiple lines.

 drivers/net/dpaa2/dpaa2_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit May 14, 2018, 12:25 p.m. UTC | #1
On 5/14/2018 11:58 AM, Shreyansh Jain wrote:
> Fixes: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")
> Cc: sunil.kori@nxp.com
> 
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>

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


> ---
> Note: Though checkpatch produces a warning for 80 char, this is more readable
>       than splitting it across multiple lines.

Agreed.
  

Patch

diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index dc0da9617..dac086d61 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -560,7 +560,7 @@  dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			bufs[num_rx] = eth_fd_to_mbuf(fd);
 		bufs[num_rx]->port = dev->data->port_id;
 
-		if (dev->data->dev_conf.rxmode.hw_vlan_strip)
+		if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
 			rte_vlan_strip(bufs[num_rx]);
 
 		dq_storage++;