From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: Re: [PATCH 5/8] driver/virtio:enqueue vhost TX offload Date: Fri, 30 Oct 2015 13:14:58 +0100 Message-ID: References: <1445402801-27806-1-git-send-email-jijiang.liu@intel.com> <1445402801-27806-6-git-send-email-jijiang.liu@intel.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC22BC6494@SHSMSX101.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" To: "Liu, Jijiang" Return-path: Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by dpdk.org (Postfix) with ESMTP id 0715F5A69 for ; Fri, 30 Oct 2015 13:14:59 +0100 (CET) Received: by oies66 with SMTP id s66so57488529oie.1 for ; Fri, 30 Oct 2015 05:14:58 -0700 (PDT) In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC22BC6494@SHSMSX101.ccr.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Oct 30, 2015 at 12:45 PM, Liu, Jijiang wrote: > > 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. > You are supposed to only handle mbuf with offloads if VIRTIO_NET_F_CSUM was enabled in the first place through the capabilities. So looking at ol_flags means that you implicitely check for VIRTIO_NET_F_CSUM. This is just an optimisation, so do as you like. Anyway, I just want to confirm, is this patchset for 2.2 ? -- David Marchand