Displaying 20 results from an estimated 169 matches for "vhost_net_f_virtio_net_hdr".
2018 Jun 08
2
[PATCH net] vhost_net: remove VHOST_NET_F_VIRTIO_NET_HDR support
On 2018?06?08? 12:46, Michael S. Tsirkin wrote:
> On Fri, Jun 08, 2018 at 11:50:42AM +0800, Jason Wang wrote:
>> This feature bit is duplicated with VIRTIO_F_ANY_LAYOUT, this means if
>> a userpsace want to enable VRITIO_F_ANY_LAYOUT,
>> VHOST_NET_F_VIRTIO_NET_HDR will be implied too. This is wrong and will
>> break networking.
> What breaks networking exactly? VHOST_NET supported ANY_LAYOUT
> from day one. For this reason it does not need to know about
> VRITIO_F_ANY_LAYOUT and we reused the bit for other purposes.
It's the knowledge of...
2018 Jun 08
2
[PATCH net] vhost_net: remove VHOST_NET_F_VIRTIO_NET_HDR support
On 2018?06?08? 12:46, Michael S. Tsirkin wrote:
> On Fri, Jun 08, 2018 at 11:50:42AM +0800, Jason Wang wrote:
>> This feature bit is duplicated with VIRTIO_F_ANY_LAYOUT, this means if
>> a userpsace want to enable VRITIO_F_ANY_LAYOUT,
>> VHOST_NET_F_VIRTIO_NET_HDR will be implied too. This is wrong and will
>> break networking.
> What breaks networking exactly? VHOST_NET supported ANY_LAYOUT
> from day one. For this reason it does not need to know about
> VRITIO_F_ANY_LAYOUT and we reused the bit for other purposes.
It's the knowledge of...
2018 Jun 11
1
[PATCH net] vhost_net: remove VHOST_NET_F_VIRTIO_NET_HDR support
...>> On 2018?06?08? 12:46, Michael S. Tsirkin wrote:
>>> On Fri, Jun 08, 2018 at 11:50:42AM +0800, Jason Wang wrote:
>>>> This feature bit is duplicated with VIRTIO_F_ANY_LAYOUT, this means if
>>>> a userpsace want to enable VRITIO_F_ANY_LAYOUT,
>>>> VHOST_NET_F_VIRTIO_NET_HDR will be implied too. This is wrong and will
>>>> break networking.
>>> What breaks networking exactly? VHOST_NET supported ANY_LAYOUT
>>> from day one. For this reason it does not need to know about
>>> VRITIO_F_ANY_LAYOUT and we reused the bit for other purpo...
2018 Jun 08
3
[PATCH net] vhost_net: remove VHOST_NET_F_VIRTIO_NET_HDR support
This feature bit is duplicated with VIRTIO_F_ANY_LAYOUT, this means if
a userpsace want to enable VRITIO_F_ANY_LAYOUT,
VHOST_NET_F_VIRTIO_NET_HDR will be implied too. This is wrong and will
break networking. Fixing this by safely removing
VHOST_NET_F_VIRTIO_NET_HDR support. There should be very few or even
no userspace can use this. Further cleanups could be done for
-net-next for safety.
In the future, we need a vhost dedicated feature set...
2018 Jun 08
3
[PATCH net] vhost_net: remove VHOST_NET_F_VIRTIO_NET_HDR support
This feature bit is duplicated with VIRTIO_F_ANY_LAYOUT, this means if
a userpsace want to enable VRITIO_F_ANY_LAYOUT,
VHOST_NET_F_VIRTIO_NET_HDR will be implied too. This is wrong and will
break networking. Fixing this by safely removing
VHOST_NET_F_VIRTIO_NET_HDR support. There should be very few or even
no userspace can use this. Further cleanups could be done for
-net-next for safety.
In the future, we need a vhost dedicated feature set...
2018 Jun 11
0
[PATCH net] vhost_net: remove VHOST_NET_F_VIRTIO_NET_HDR support
...>
>
> On 2018?06?08? 12:46, Michael S. Tsirkin wrote:
> > On Fri, Jun 08, 2018 at 11:50:42AM +0800, Jason Wang wrote:
> > > This feature bit is duplicated with VIRTIO_F_ANY_LAYOUT, this means if
> > > a userpsace want to enable VRITIO_F_ANY_LAYOUT,
> > > VHOST_NET_F_VIRTIO_NET_HDR will be implied too. This is wrong and will
> > > break networking.
> > What breaks networking exactly? VHOST_NET supported ANY_LAYOUT
> > from day one. For this reason it does not need to know about
> > VRITIO_F_ANY_LAYOUT and we reused the bit for other purposes.
>...
2018 Jun 08
0
[PATCH net] vhost_net: remove VHOST_NET_F_VIRTIO_NET_HDR support
On Fri, Jun 08, 2018 at 11:50:42AM +0800, Jason Wang wrote:
> This feature bit is duplicated with VIRTIO_F_ANY_LAYOUT, this means if
> a userpsace want to enable VRITIO_F_ANY_LAYOUT,
> VHOST_NET_F_VIRTIO_NET_HDR will be implied too. This is wrong and will
> break networking.
What breaks networking exactly? VHOST_NET supported ANY_LAYOUT
from day one. For this reason it does not need to know about
VRITIO_F_ANY_LAYOUT and we reused the bit for other purposes.
> Fixing this by safely removing
> V...
2010 Apr 06
1
[PATCH v3] Add Mergeable receive buffer support to vhost_net
...uld check and handle checksum. */
+ if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF)) {
+ struct virtio_net_hdr_mrg_rxbuf *vhdr =
+ (struct virtio_net_hdr_mrg_rxbuf *)
+ vq->iov[0].iov_base;
+ /* add num_buffers */
+ if (vhost_has_feature(&net->dev,
+ VHOST_NET_F_VIRTIO_NET_HDR))
+ hdr.num_buffers = headcount;
+ else if (vq->iov[0].iov_len < sizeof(*vhdr)) {
+ vq_err(vq, "tiny buffers < %d unsupported",
+ vq->iov[0].iov_len);
+ vhost_discard_desc(vq, headcount);
+ break;
+ } else if (put_user(headcount, &vhdr->num_buffers))...
2010 Apr 06
1
[PATCH v3] Add Mergeable receive buffer support to vhost_net
...uld check and handle checksum. */
+ if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF)) {
+ struct virtio_net_hdr_mrg_rxbuf *vhdr =
+ (struct virtio_net_hdr_mrg_rxbuf *)
+ vq->iov[0].iov_base;
+ /* add num_buffers */
+ if (vhost_has_feature(&net->dev,
+ VHOST_NET_F_VIRTIO_NET_HDR))
+ hdr.num_buffers = headcount;
+ else if (vq->iov[0].iov_len < sizeof(*vhdr)) {
+ vq_err(vq, "tiny buffers < %d unsupported",
+ vq->iov[0].iov_len);
+ vhost_discard_desc(vq, headcount);
+ break;
+ } else if (put_user(headcount, &vhdr->num_buffers))...
2010 Mar 03
1
[RFC][ PATCH 3/3] vhost-net: Add mergeable RX buffer support to vhost-net
...st_discard(vq, 1);
+ vhost_discard(vq, headcount);
continue;
}
len = err;
@@ -573,8 +560,6 @@
static int vhost_net_set_features(struct vhost_net *n, u64 features)
{
- size_t hdr_size = features & (1 << VHOST_NET_F_VIRTIO_NET_HDR) ?
- sizeof(struct virtio_net_hdr) : 0;
int i;
mutex_lock(&n->dev.mutex);
if ((features & (1 << VHOST_F_LOG_ALL)) &&
diff -ruN net-next-p2/drivers/vhost/vhost.c
net-next-p3/drivers/vhost/vhost.c
--- net-next-p2/drivers/vhost/vhost.c...
2010 Mar 03
1
[RFC][ PATCH 3/3] vhost-net: Add mergeable RX buffer support to vhost-net
...st_discard(vq, 1);
+ vhost_discard(vq, headcount);
continue;
}
len = err;
@@ -573,8 +560,6 @@
static int vhost_net_set_features(struct vhost_net *n, u64 features)
{
- size_t hdr_size = features & (1 << VHOST_NET_F_VIRTIO_NET_HDR) ?
- sizeof(struct virtio_net_hdr) : 0;
int i;
mutex_lock(&n->dev.mutex);
if ((features & (1 << VHOST_F_LOG_ALL)) &&
diff -ruN net-next-p2/drivers/vhost/vhost.c
net-next-p3/drivers/vhost/vhost.c
--- net-next-p2/drivers/vhost/vhost.c...
2010 Apr 26
1
[PATCH v6] Add mergeable rx buffer support to vhost_net
...l_n(&net->dev, vq, vq->heads,
+ headcount);
if (unlikely(vq_log))
vhost_log_write(vq, vq_log, log, len);
total_len += len;
@@ -561,9 +582,24 @@ done:
static int vhost_net_set_features(struct vhost_net *n, u64 features)
{
- size_t hdr_size = features & (1 << VHOST_NET_F_VIRTIO_NET_HDR) ?
- sizeof(struct virtio_net_hdr) : 0;
+ size_t vhost_hlen;
+ size_t sock_hlen;
int i;
+
+ if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
+ /* vhost provides vnet_hdr */
+ vhost_hlen = sizeof(struct virtio_net_hdr);
+ if (features & (1 << VIRTIO_NET_F_MRG_RXBUF))
+...
2010 Apr 26
1
[PATCH v6] Add mergeable rx buffer support to vhost_net
...l_n(&net->dev, vq, vq->heads,
+ headcount);
if (unlikely(vq_log))
vhost_log_write(vq, vq_log, log, len);
total_len += len;
@@ -561,9 +582,24 @@ done:
static int vhost_net_set_features(struct vhost_net *n, u64 features)
{
- size_t hdr_size = features & (1 << VHOST_NET_F_VIRTIO_NET_HDR) ?
- sizeof(struct virtio_net_hdr) : 0;
+ size_t vhost_hlen;
+ size_t sock_hlen;
int i;
+
+ if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
+ /* vhost provides vnet_hdr */
+ vhost_hlen = sizeof(struct virtio_net_hdr);
+ if (features & (1 << VIRTIO_NET_F_MRG_RXBUF))
+...
2010 Apr 19
2
[PATCH v4] Add mergeable RX bufs support to vhost
..._and_signal_n(&net->dev, vq, vq->heads, headcount);
if (unlikely(vq_log))
vhost_log_write(vq, vq_log, log, len);
total_len += len;
@@ -560,9 +579,24 @@ done:
static int vhost_net_set_features(struct vhost_net *n, u64 features)
{
- size_t hdr_size = features & (1 << VHOST_NET_F_VIRTIO_NET_HDR) ?
- sizeof(struct virtio_net_hdr) : 0;
+ size_t vhost_hlen;
+ size_t sock_hlen;
int i;
+
+ if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
+ /* vhost provides vnet_hdr */
+ vhost_hlen = sizeof(struct virtio_net_hdr);
+ if (features & (1 << VIRTIO_NET_F_MRG_RXBUF))
+...
2010 Apr 19
2
[PATCH v4] Add mergeable RX bufs support to vhost
..._and_signal_n(&net->dev, vq, vq->heads, headcount);
if (unlikely(vq_log))
vhost_log_write(vq, vq_log, log, len);
total_len += len;
@@ -560,9 +579,24 @@ done:
static int vhost_net_set_features(struct vhost_net *n, u64 features)
{
- size_t hdr_size = features & (1 << VHOST_NET_F_VIRTIO_NET_HDR) ?
- sizeof(struct virtio_net_hdr) : 0;
+ size_t vhost_hlen;
+ size_t sock_hlen;
int i;
+
+ if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
+ /* vhost provides vnet_hdr */
+ vhost_hlen = sizeof(struct virtio_net_hdr);
+ if (features & (1 << VIRTIO_NET_F_MRG_RXBUF))
+...
2014 Nov 27
1
[PATCH v6 33/46] vhost/net: larger header for virtio 1.0
...hdr_len = (features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ?
+ hdr_len = (features & ((1ULL << VIRTIO_NET_F_MRG_RXBUF) |
+ (1ULL << VIRTIO_F_VERSION_1))) ?
sizeof(struct virtio_net_hdr_mrg_rxbuf) :
sizeof(struct virtio_net_hdr);
if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
--
MST
2014 Nov 27
1
[PATCH v6 33/46] vhost/net: larger header for virtio 1.0
...hdr_len = (features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ?
+ hdr_len = (features & ((1ULL << VIRTIO_NET_F_MRG_RXBUF) |
+ (1ULL << VIRTIO_F_VERSION_1))) ?
sizeof(struct virtio_net_hdr_mrg_rxbuf) :
sizeof(struct virtio_net_hdr);
if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
--
MST
2010 Apr 23
1
[PATCHv5] add mergeable receiver buffers support to vhost
...l_n(&net->dev, vq, vq->heads,
+ headcount);
if (unlikely(vq_log))
vhost_log_write(vq, vq_log, log, len);
total_len += len;
@@ -561,9 +582,24 @@ done:
static int vhost_net_set_features(struct vhost_net *n, u64 features)
{
- size_t hdr_size = features & (1 << VHOST_NET_F_VIRTIO_NET_HDR) ?
- sizeof(struct virtio_net_hdr) : 0;
+ size_t vhost_hlen;
+ size_t sock_hlen;
int i;
+
+ if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
+ /* vhost provides vnet_hdr */
+ vhost_hlen = sizeof(struct virtio_net_hdr);
+ if (features & (1 << VIRTIO_NET_F_MRG_RXBUF))
+...
2010 Apr 23
1
[PATCHv5] add mergeable receiver buffers support to vhost
...l_n(&net->dev, vq, vq->heads,
+ headcount);
if (unlikely(vq_log))
vhost_log_write(vq, vq_log, log, len);
total_len += len;
@@ -561,9 +582,24 @@ done:
static int vhost_net_set_features(struct vhost_net *n, u64 features)
{
- size_t hdr_size = features & (1 << VHOST_NET_F_VIRTIO_NET_HDR) ?
- sizeof(struct virtio_net_hdr) : 0;
+ size_t vhost_hlen;
+ size_t sock_hlen;
int i;
+
+ if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
+ /* vhost provides vnet_hdr */
+ vhost_hlen = sizeof(struct virtio_net_hdr);
+ if (features & (1 << VIRTIO_NET_F_MRG_RXBUF))
+...
2013 May 03
4
[PATCH 0/3] vhost cleanups and separate module
Asias He (3):
vhost: Remove vhost_enable_zcopy in vhost.h
vhost: Move VHOST_NET_FEATURES to net.c
vhost: Make vhost a separate module
drivers/vhost/Kconfig | 8 ++++++++
drivers/vhost/Makefile | 3 ++-
drivers/vhost/net.c | 6 ++++++
drivers/vhost/scsi.c | 1 -
drivers/vhost/vhost.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
drivers/vhost/vhost.h | 8 ++------
6