patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] vhost: fix MTU device feature check
@ 2017-06-29  7:58 Maxime Coquelin
  2017-06-29  8:01 ` Tan, Jianfeng
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Coquelin @ 2017-06-29  7:58 UTC (permalink / raw)
  To: dev, yliu; +Cc: i.dyukov, jianfeng.tan, stable, Maxime Coquelin

The MTU feature support check has to be done against MTU
feature bit mask, and not bit position.

Cc: stable@dpdk.org
Fixes: 72e8543093df ("vhost: add API to get MTU value")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---

This is a follow-up of Ivan's patch, which made me check I didn't
introduced same bug elsewhere.

 lib/librte_vhost/vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 19c5a43..653152f 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -272,7 +272,7 @@ rte_vhost_get_mtu(int vid, uint16_t *mtu)
 	if (!(dev->flags & VIRTIO_DEV_READY))
 		return -EAGAIN;
 
-	if (!(dev->features & VIRTIO_NET_F_MTU))
+	if (!(dev->features & (1ULL << VIRTIO_NET_F_MTU)))
 		return -ENOTSUP;
 
 	*mtu = dev->mtu;
-- 
2.9.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] vhost: fix MTU device feature check
  2017-06-29  7:58 [dpdk-stable] [PATCH] vhost: fix MTU device feature check Maxime Coquelin
@ 2017-06-29  8:01 ` Tan, Jianfeng
  2017-07-01 23:36   ` Yuanhan Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Tan, Jianfeng @ 2017-06-29  8:01 UTC (permalink / raw)
  To: Maxime Coquelin, dev, yliu; +Cc: i.dyukov, stable



> -----Original Message-----
> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
> Sent: Thursday, June 29, 2017 3:58 PM
> To: dev@dpdk.org; yliu@fridaylinux.org
> Cc: i.dyukov@samsung.com; Tan, Jianfeng; stable@dpdk.org; Maxime
> Coquelin
> Subject: [PATCH] vhost: fix MTU device feature check
> 
> The MTU feature support check has to be done against MTU
> feature bit mask, and not bit position.
> 
> Cc: stable@dpdk.org
> Fixes: 72e8543093df ("vhost: add API to get MTU value")
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] vhost: fix MTU device feature check
  2017-06-29  8:01 ` Tan, Jianfeng
@ 2017-07-01 23:36   ` Yuanhan Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Yuanhan Liu @ 2017-07-01 23:36 UTC (permalink / raw)
  To: Tan, Jianfeng; +Cc: Maxime Coquelin, dev, i.dyukov, stable

On Thu, Jun 29, 2017 at 08:01:45AM +0000, Tan, Jianfeng wrote:
> 
> 
> > -----Original Message-----
> > From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
> > Sent: Thursday, June 29, 2017 3:58 PM
> > To: dev@dpdk.org; yliu@fridaylinux.org
> > Cc: i.dyukov@samsung.com; Tan, Jianfeng; stable@dpdk.org; Maxime
> > Coquelin
> > Subject: [PATCH] vhost: fix MTU device feature check
> > 
> > The MTU feature support check has to be done against MTU
> > feature bit mask, and not bit position.
> > 
> > Cc: stable@dpdk.org
> > Fixes: 72e8543093df ("vhost: add API to get MTU value")
> > 
> > Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>

Applied to dpdk-next-virtio.

Thanks.

	--yliu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-01 23:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29  7:58 [dpdk-stable] [PATCH] vhost: fix MTU device feature check Maxime Coquelin
2017-06-29  8:01 ` Tan, Jianfeng
2017-07-01 23:36   ` Yuanhan Liu

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).