DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xie, Huawei" <huawei.xie@intel.com>
To: Wei-Chun Chao <weichunc@plumgrid.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] VM2VM_HARDWARE mode on i350
Date: Sat, 12 Jul 2014 08:20:24 +0000	[thread overview]
Message-ID: <C37D651A908B024F974696C65296B57B0F231081@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <CACviX4E45gmpE8FzyS2acqL2LsLyzLCQdYnw=kXS9EPmPPh+kw@mail.gmail.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei-Chun Chao
> Sent: Saturday, July 12, 2014 4:48 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] VM2VM_HARDWARE mode on i350
> 
> Hi,
> I was playing with vhost example to measure VM to VM throughput. With
> default SW mode I saw 9Gbps. While trying HW mode, traffic does not
> work.
> 
> Looking at the code I saw a snippet in
> lib/librte_pmd_ixgbe/ixgbe_rxtx.c:ixgbe_vmdq_rx_hw_configure -
> 
>         /* PFDMA Tx General Switch Control Enables VMDQ loopback */
>         if (cfg->enable_loop_back) {
>                 IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC,
> IXGBE_PFDTXGSWC_VT_LBEN);
>                 for (i = 0; i < RTE_IXGBE_VMTXSW_REGISTER_COUNT; i++)
>                         IXGBE_WRITE_REG(hw, IXGBE_VMTXSW(i), UINT32_MAX);
>         }
> 
> But there is no corresponding code in
> lib/librte_pmd_e1000/igb_rxtx.c:igb_vmdq_rx_hw_configure.
> 
> Is this expected behavior? Or just something not implemented?
> 
> I tried adding some code similar to the following but it didn't help.
> 
>                 dtxswc = rd32(E1000_TXSWC);
>                 if (enable)
>                         dtxswc |= E1000_DTXSWC_VMDQ_LOOPBACK_EN;
>                 else
>                         dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN;
>                 wr32(E1000_TXSWC, dtxswc);
> 
> Another question: I have a i210 that doesn't support VMDq and vhost
> example does not run even with vm2vm_software. Why is VMDq needed for
> sw mode?
> 
> Thanks,
> Weichun

Replying to your second question. VMDQ is a must in vhost example, in which each virtio device is bound to a pool in VMDQ.  The vm2vm_software mode means the for each xmit packet from virtio TX ring,  the software will play the role of packet switch, find the destination and do the packet forwarding, while enable_loop_back mode will directly send the packet out through hardware TX queue, and let the hardware L2 switch play the role of packet switch.





      reply	other threads:[~2014-07-12  8:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11 20:47 Wei-Chun Chao
2014-07-12  8:20 ` Xie, Huawei [this message]

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=C37D651A908B024F974696C65296B57B0F231081@SHSMSX101.ccr.corp.intel.com \
    --to=huawei.xie@intel.com \
    --cc=dev@dpdk.org \
    --cc=weichunc@plumgrid.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).