DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Stillwell Jr, Paul M" <paul.m.stillwell.jr@intel.com>
To: "Zhao1, Wei" <wei.zhao1@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	 "Zhao1, Wei" <wei.zhao1@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/ice: enable VLAN filter offloads support
Date: Wed, 13 Feb 2019 18:43:44 +0000	[thread overview]
Message-ID: <F8A4ECA1C1D86B4081DD6BF503D1F436C743DC23@fmsmsx120.amr.corp.intel.com> (raw)
In-Reply-To: <1550029788-45809-1-git-send-email-wei.zhao1@intel.com>

Your patch description says we should be checking dev_conf.rxmode.offloads should be checked to enable VLAN, but I don't see the patch checking for that. What am I missing?

Paul

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao
Sent: Tuesday, February 12, 2019 7:50 PM
To: dev@dpdk.org
Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH v2] net/ice: enable VLAN filter offloads support

There is need to check whether dev_conf.rxmode.offloads is set when start ice device, if one of the vlan related bits is set, for example DEV_RX_OFFLOAD_VLAN_FILTER and so on, sevice start process to enable this offloads request.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
-rework patch for compile error.
---
 drivers/net/ice/ice_ethdev.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 6b0113b..a23c63a 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1714,7 +1714,7 @@ ice_dev_start(struct rte_eth_dev *dev)
 	struct ice_vsi *vsi = pf->main_vsi;
 	uint16_t nb_rxq = 0;
 	uint16_t nb_txq, i;
-	int ret;
+	int mask, ret;
 
 	/* program Tx queues' context in hardware */
 	for (nb_txq = 0; nb_txq < data->nb_tx_queues; nb_txq++) { @@ -1742,6 +1742,14 @@ ice_dev_start(struct rte_eth_dev *dev)
 
 	ice_set_rx_function(dev);
 
+	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |
+			ETH_VLAN_EXTEND_MASK;
+	ret = ice_vlan_offload_set(dev, mask);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Unable to set VLAN offload");
+		goto rx_err;
+	}
+
 	/* enable Rx interrput and mapping Rx queue to interrupt vector */
 	if (ice_rxq_intr_setup(dev))
 		return -EIO;
--
2.7.5

  reply	other threads:[~2019-02-13 18:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28  7:53 [dpdk-dev] [PATCH] " Wei Zhao
2019-02-13  3:30 ` [dpdk-dev] [PATCH v2] " Wei Zhao
2019-02-13  4:05   ` Zhao1, Wei
2019-02-13  3:49 ` Wei Zhao
2019-02-13 18:43   ` Stillwell Jr, Paul M [this message]
2019-02-18 12:39   ` Zhang, Qi Z

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=F8A4ECA1C1D86B4081DD6BF503D1F436C743DC23@fmsmsx120.amr.corp.intel.com \
    --to=paul.m.stillwell.jr@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wei.zhao1@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).