DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Liu, Jijiang" <jijiang.liu@intel.com>
To: 'David Marchand' <david.marchand@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 5/8] driver/virtio:enqueue vhost TX offload
Date: Fri, 30 Oct 2015 11:45:25 +0000	[thread overview]
Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC22BC6494@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <CALwxeUv7vm-YQeqipLo=7-5Wc6pUWyZJSOwX993VD_7f19bn9A@mail.gmail.com>

Hi David,

From: David Marchand [mailto:david.marchand@6wind.com]
Sent: Thursday, October 29, 2015 10:16 PM
To: Liu, Jijiang
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 5/8] driver/virtio:enqueue vhost TX offload

On Wed, Oct 21, 2015 at 6:46 AM, Jijiang Liu <jijiang.liu@intel.com<mailto:jijiang.liu@intel.com>> wrote:
@@ -221,6 +277,11 @@ virtqueue_enqueue_xmit(struct virtqueue *txvq, struct rte_mbuf *cookie)
        dxp->cookie = (void *)cookie;
        dxp->ndescs = needed;

+       if (vtpci_with_feature(txvq->hw, VIRTIO_NET_F_CSUM)) {
+               if (virtqueue_enqueue_offload(txvq, cookie, idx, head_size) < 0)
+                       return -EPERM;
+       }
+
        start_dp = txvq->vq_ring.desc;
        start_dp[idx].addr =
                txvq->virtio_net_hdr_mem + idx * head_size;

If the driver correctly reports negotiated offload capabilities (see my previous comment on patch 3), there is no need for the test on VIRTIO_NET_F_CSUM, because application is not supposed to ask for offloads on driver that do not support them.


> If the driver correctly reports negotiated offload capabilities, then application in guest will set the ol_flags in mbuf based on these offload capabilities.
If the VIRTIO_NET_F_CSUM is not enabled, and there is no need to call virtqueue_enqueue_offload() to check ol_flags in mbuf to see if the TX checksum and TSO is set ,and it will  not effect on the performance of disabling TX checksum path as much as possible.
So I think there is need for the check.

> I agree with your comments on patch 3, I will add TX offload capabilities in the dev_info to tell application driver support these offloads.



Same logic would apply to virtqueue_enqueue_offload() function.

In the end, we could always call this function (or move the code here).


--
David Marchand

  reply	other threads:[~2015-10-30 11:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21  4:46 [dpdk-dev] [PATCH 0/8] add vhost TX offload support Jijiang Liu
2015-10-21  4:46 ` [dpdk-dev] [PATCH 1/8] driver/virtio:add virtual addr for virtio net header Jijiang Liu
2015-10-26  7:07   ` Tan, Jianfeng
2015-10-21  4:46 ` [dpdk-dev] [PATCH 2/8] driver/virtio: record virtual address of " Jijiang Liu
2015-10-21  4:46 ` [dpdk-dev] [PATCH 3/8] driver/virtio:add vhost TX offload support capability in virtio-net Jijiang Liu
2015-10-29 12:44   ` David Marchand
2015-10-30  8:15     ` Liu, Jijiang
2015-10-21  4:46 ` [dpdk-dev] [PATCH 4/8] driver/virtio:add vhost TX offload support capability Jijiang Liu
2015-10-21  4:46 ` [dpdk-dev] [PATCH 5/8] driver/virtio:enqueue vhost TX offload Jijiang Liu
2015-10-29 14:15   ` David Marchand
2015-10-30 11:45     ` Liu, Jijiang [this message]
2015-10-30 12:14       ` David Marchand
2015-10-30 12:21         ` Liu, Jijiang
2015-10-21  4:46 ` [dpdk-dev] [PATCH 6/8] lib/librte_vhost:dequeue " Jijiang Liu
2015-10-21  4:46 ` [dpdk-dev] [PATCH 7/8] examples/vhost:support TX offload in vhost sample Jijiang Liu
2015-10-21  4:46 ` [dpdk-dev] [PATCH 8/8] app/testpmd:modify MAC address of csum forwarding Jijiang Liu
2015-10-26  6:45 ` [dpdk-dev] [PATCH 0/8] add vhost TX offload support Liu, Jijiang

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=1ED644BD7E0A5F4091CF203DAFB8E4CC22BC6494@SHSMSX101.ccr.corp.intel.com \
    --to=jijiang.liu@intel.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    /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).