From: Jianfeng Tan <jianfeng.tan@intel.com>
To: dev@dpdk.org
Cc: yuanhan.liu@linux.intel.com, Jianfeng Tan <jianfeng.tan@intel.com>
Subject: [dpdk-dev] [PATCH] net/virtio-user: fix net status report
Date: Thu, 13 Apr 2017 10:50:08 +0000 [thread overview]
Message-ID: <1492080608-31084-1-git-send-email-jianfeng.tan@intel.com> (raw)
We only enabled LSC when using vhost-user as the backend, but it is
reported even when using vhost-kernel as the backend.
Fix it by only reportting LSC support when using vhost-user as the
backend.
Fixes: 37a7eb2ae816("net/virtio-user: support to report net status")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 299ee16..c9e8ac5 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -379,7 +379,8 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
}
/* The backend will not report this feature, we add it explicitly */
- dev->device_features |= (1ull << VIRTIO_NET_F_STATUS);
+ if (is_vhost_user_by_type(dev->path))
+ dev->device_features |= (1ull << VIRTIO_NET_F_STATUS);
dev->device_features &= VIRTIO_USER_SUPPORTED_FEATURES;
--
2.7.4
next reply other threads:[~2017-04-13 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 10:50 Jianfeng Tan [this message]
2017-04-13 14:16 ` [dpdk-dev] [PATCH v2] " Jianfeng Tan
2017-04-14 4:37 ` Yuanhan Liu
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=1492080608-31084-1-git-send-email-jianfeng.tan@intel.com \
--to=jianfeng.tan@intel.com \
--cc=dev@dpdk.org \
--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).