DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Pierre Pfister (ppfister)" <ppfister@cisco.com>
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>,
	Yuanhan Liu <yuanhan.liu@linux.intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] virtio: enable indirect descriptors feature
Date: Tue, 6 Sep 2016 08:32:13 -0700	[thread overview]
Message-ID: <20160906083213.6d2cc3bd@xeon-e3> (raw)
In-Reply-To: <27D7470D-6FC7-4922-92A4-341CAD203689@cisco.com>

On Tue, 6 Sep 2016 06:49:26 +0000
"Pierre Pfister (ppfister)" <ppfister@cisco.com> wrote:

> > Le 5 sept. 2016 à 23:08, Stephen Hemminger <stephen@networkplumber.org> a écrit :
> > 
> > On Mon, 5 Sep 2016 16:24:13 +0200
> > Maxime Coquelin <maxime.coquelin@redhat.com> wrote:
> >   
> >> Thanks Pierre for sending the fix.
> >> 
> >> Minor comments below:
> >> 
> >> On 09/05/2016 08:52 AM, Pierre Pfister (ppfister) wrote:  
> >>> Indirect descriptors support was disabled by commit 4a92b67151be11,
> >>> presumably by accident as it was correctly supported.
> >>> 
> >>> This patch simply adds VIRTIO_RING_F_INDIRECT_DESC back to
> >>> the supported features bit mask, hence enabling the use of
> >>> indirect descriptors when the feature is negociated with the
> >>> device.
> >>>   
> >> 
> >> You should add the below line:
> >> Fixes: 4a92b671 ("virtio: clarify feature bit handling")
> >> 
> >> Also, maybe we should consider add stable@dpdk.org in cc:,
> >> because the regression was introduced before v16.07 final tag.
> >> But the problem is that all the final validation has been done
> >> without this feature enabled, and it impact quite a few lines of
> >> code in Virtio PMD.
> >> 
> >> Other than that, you can add:
> >> Reviewed-by: Maxime Coquelin <maxime.coquelin@¶edhat.com>  
> > 
> > The patch is correct, but it doesn't fix a regression.
> > 
> > The original virtio DPDK did not support INDIRECT descriptors at all.
> > The original code in virtio_negotiate features was the inverse of what it is now.
> > Read carefully, the values in mask were the bits that were rejected during
> > guest negotiation at the time.
> > 
> > static void
> > virtio_negotiate_features(struct virtio_hw *hw)
> > {
> > -	uint32_t host_features, mask;
> > -
> > -	/* checksum offload not implemented */
> > -	mask = VIRTIO_NET_F_CSUM | VIRTIO_NET_F_GUEST_CSUM;
> > -
> > -	/* TSO and LRO are only available when their corresponding
> > -	 * checksum offload feature is also negotiated.
> > -	 */
> > -	mask |= VIRTIO_NET_F_HOST_TSO4 | VIRTIO_NET_F_HOST_TSO6 | VIRTIO_NET_F_HOST_ECN;
> > -	mask |= VIRTIO_NET_F_GUEST_TSO4 | VIRTIO_NET_F_GUEST_TSO6 | VIRTIO_NET_F_GUEST_ECN;
> > -	mask |= VTNET_LRO_FEATURES;
> > -
> > -	/* not negotiating INDIRECT descriptor table support */
> > -	mask |= VIRTIO_RING_F_INDIRECT_DESC;
> > +	uint32_t host_features;
> > 
> > 	/* Prepare guest_features: feature that driver wants to support */
> > -	hw->guest_features = VTNET_FEATURES & ~mask;
> > +	hw->guest_features = VIRTIO_PMD_GUEST_FEATURES;
> > 	PMD_INIT_LOG(DEBUG, "guest_features before negotiate = %x",
> > 		hw->guest_features);
> > 
> > Therefore INDIRECT descriptors were always disabled!  Don't blame any commit.
> > Use of indirect descriptors by DPDK did not happen until a later change.  
> 
> Oops. My bad, sorry. I will remove the blame from the commit message.
> It is strange though that 6dc5de3a6aef adds indirect buffer support but does not
> provide a way to enable it.

I agree that indirect descriptors should be negotiated. Probably the lack of
the bit is left over from testing the three ways to send.

  reply	other threads:[~2016-09-06 15:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 15:55 [dpdk-dev] [PATCH] " Pierre Pfister (ppfister)
2016-09-05  2:20 ` Yuanhan Liu
2016-09-05  6:49   ` Pierre Pfister (ppfister)
2016-09-05  6:49     ` Pierre Pfister (ppfister)
2016-09-05  6:49     ` Pierre Pfister (ppfister)
2016-09-05  6:52   ` [dpdk-dev] [PATCH v2] " Pierre Pfister (ppfister)
2016-09-05  6:52     ` Pierre Pfister (ppfister)
2016-09-05  6:52     ` Pierre Pfister (ppfister)
2016-09-05 14:24     ` Maxime Coquelin
2016-09-05 21:08       ` Stephen Hemminger
2016-09-06  6:49         ` Pierre Pfister (ppfister)
2016-09-06 15:32           ` Stephen Hemminger [this message]
2016-09-06 16:09             ` [dpdk-dev] [PATCH v3] " Pierre Pfister (ppfister)
2016-09-07  2:57               ` Yuanhan Liu
2016-09-06  7:44         ` [dpdk-dev] [PATCH v2] " Maxime Coquelin

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=20160906083213.6d2cc3bd@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=ppfister@cisco.com \
    --cc=yuanhan.liu@linux.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).