DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhu, Heqing" <heqing.zhu@intel.com>
To: Shiantung Wong <shianwong@gmail.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Avoid stripping vlan tag with I350 VF on a VM
Date: Mon, 1 Dec 2014 20:17:28 +0000	[thread overview]
Message-ID: <CAD16F236028A64DBBC0158B1636EA4510FC3678@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <CAMOKKKJ70a7jBnxY9sZArHEQ54y74yWLS_GqqacobpXV6avL6w@mail.gmail.com>

Did you try to remove the VLAN strip on the PF side?  

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shiantung Wong
Sent: Monday, December 01, 2014 11:29 AM
To: dev@dpdk.org
Subject: [dpdk-dev] Avoid stripping vlan tag with I350 VF on a VM

My application running on a VM needs to deal with multiple VLANS on packets received over I350 using Virtual Function. But I always see the received packets without vlan tag.
This is my setup:
  - host: 3.13.6-031306-generic
  - QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.7)
  - guest: 2.6.32-358.el6.x86_64
  - dpdk: 1.6

And this is how I set up in the VM:
-------
    memset(&port_conf, 0, sizeof(port_conf));
    if (vlanCnt > 0)
         port_conf.rxmode.hw_vlan_filter = 1;

    port_conf.rxmode.jumbo_frame = 1;
    port_conf.rxmode.max_rx_pkt_len = 9018;

    ret = rte_eth_dev_configure(port, 1, 1, &port_conf);
    if (ret < 0) {
        rte_log(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, "Error on config port%u, ret=%d\n",
                    (unsigned)port, ret);
        return -1;
    }

    for(i = 0; i < vlanCnt; i++) {
        ret = rte_eth_dev_vlan_filter(port, vlan[i], 1);
        if (ret < 0) {
            rte_log(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, "Error on config port%u, vlan%d ret=%d\n",
                    (unsigned)port, vlan[i], ret);
            return -1;
        }
    }
-----

If I also try to explicitly disable the stripping with next, but get an error return -ENOSUP.

ret = rte_eth_dev_set_vlan_strip_on_queue(port, 0, 0);

I appreciate anyone can help. on how to set it up.

Thanks,
Shian Wong

  reply	other threads:[~2014-12-01 20:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01 18:29 Shiantung Wong
2014-12-01 20:17 ` Zhu, Heqing [this message]
2014-12-01 22:07   ` Shiantung Wong

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=CAD16F236028A64DBBC0158B1636EA4510FC3678@SHSMSX104.ccr.corp.intel.com \
    --to=heqing.zhu@intel.com \
    --cc=dev@dpdk.org \
    --cc=shianwong@gmail.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).