Skip to contentSkip to conversation

Drivers: hv: vmbus: Enable interrupt driven flow control

PATCH Superseded K. Y. Srinivasan 2 participants 4 messages Sep 5, 2014 Hyper-V/Azure core and drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Drivers: hv: vmbus: Enable interrupt driven flow control

This is a win8 feature that has been implemented. Turn on the feature bit to enable the feature. With this feature turned on, when the host is waiting for space to become available on the ringbuffer (host to guest), the guest will interrupt the host when space becomes available (as part of draining the ring buffer).

---
 drivers/hv/ring_buffer.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/hv/ring_buffer.c +5 -0
index 15db66b..6361d12 100644
@@ -361,6 +361,11 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info,
 	ring_info->ring_buffer->read_index =
 		ring_info->ring_buffer->write_index = 0;
 
+	/*
+	 * Set the feature bit for enabling flow control.
+	 */
+	ring_info->ring_buffer->feature_bits.value = 1;
+
 	ring_info->ring_size = buflen;
 	ring_info->ring_datasize = buflen - sizeof(struct hv_ring_buffer);
 
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 2 lines · K. Y. Srinivasan

This is a win8 feature that has been implemented. Turn on the feature bit to enable the feature.

What does those two sentances even mean?

Quoted 1 line

With this feature turned on,

What is "this"?

Quoted 15 lines

when the host is waiting
for space to become available on the ringbuffer (host to guest), the guest will interrupt the host when space becomes available (as part of draining the ring buffer).

---
 drivers/hv/ring_buffer.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/hv/ring_buffer.c +0 -0
index 15db66b..6361d12 100644

drivers/hv/ring_buffer.c int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info, · line 367

Quoted 7 lines
drivers/hv/ring_buffer.c +4 -0
@@ -361,6 +361,11 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info,
 	ring_info->ring_buffer->read_index =
 		ring_info->ring_buffer->write_index = 0;
 
+	/*
+	 * Set the feature bit for enabling flow control.
+	 */
+	ring_info->ring_buffer->feature_bits.value = 1;

What happens if you are running on an old system that doesn't support this new "feature"?

thanks,

greg k-h

#2 lore raw
Quoted 11 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Friday, September 5, 2014 12:12 PM
To: KY Srinivasan
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Enable interrupt driven flow control

Quoted 5 lines
Quoted 2 lines · K. Y. Srinivasan

This is a win8 feature that has been implemented. Turn on the feature bit to enable the feature.

What does those two sentances even mean?

Greg,

The feature has been implemented and has been in the tree for a while. However, the feature was not advertised to the host and this patch does just that.

Quoted 4 lines
Quoted 2 lines

With this feature turned on,

What is "this"?

"this" refers to the feature bit.

Quoted 20 lines

drivers/hv/ring_buffer.c int hv_ringbuffer_init(struct hv_ring_buffer_info

Quoted 16 lines

when the host is waiting
for space to become available on the ringbuffer (host to guest), the guest will interrupt the host when space becomes available (as part of draining the ring buffer).

---
 drivers/hv/ring_buffer.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/hv/ring_buffer.c index renamed from drivers/hv/ring_buffer.c +0 -0

15db66b..6361d12 100644

drivers/hv/ring_buffer.c +0 -0
@@ -361,6 +361,11 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info

*ring_info,

Quoted 3 lines
drivers/hv/ring_buffer.c +0 -0
 	ring_info->ring_buffer->read_index =
 		ring_info->ring_buffer->write_index = 0;
 
Quoted 7 lines

drivers/hv/ring_buffer.c int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info, · line 367

Quoted 4 lines
drivers/hv/ring_buffer.c +4 -0
+	/*
+	 * Set the feature bit for enabling flow control.
+	 */
+	ring_info->ring_buffer->feature_bits.value = 1;

What happens if you are running on an old system that doesn't support this new "feature"?

The control structure for the ring buffer (where this feature bit is) has not changed and so, for hosts that don't understand this, it does not matter.

Hope this helps. Let me know if you want me to rewrite comment and resend this patch.

Regards,

K. Y

#3 lore raw
Quoted 11 lines · KY Srinivasan
Quoted 11 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Friday, September 5, 2014 12:12 PM
To: KY Srinivasan
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Enable interrupt driven flow control

Quoted 8 lines
Quoted 5 lines · K. Y. Srinivasan
Quoted 2 lines

This is a win8 feature that has been implemented. Turn on the feature bit to enable the feature.

What does those two sentances even mean?

Greg,

The feature has been implemented and has been in the tree for a while.

What feature? What is "This" in the first sentance?

Quoted 33 lines

However, the feature was not advertised to the host and this patch does just that.

Quoted 4 lines
Quoted 2 lines

With this feature turned on,

What is "this"?

"this" refers to the feature bit.

Quoted 20 lines

drivers/hv/ring_buffer.c int hv_ringbuffer_init(struct hv_ring_buffer_info

Quoted 16 lines

when the host is waiting
for space to become available on the ringbuffer (host to guest), the guest will interrupt the host when space becomes available (as part of draining the ring buffer).

---
 drivers/hv/ring_buffer.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/hv/ring_buffer.c index renamed from drivers/hv/ring_buffer.c +0 -0

15db66b..6361d12 100644

drivers/hv/ring_buffer.c +0 -0
@@ -361,6 +361,11 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info

*ring_info,

Quoted 3 lines
drivers/hv/ring_buffer.c +0 -0
 	ring_info->ring_buffer->read_index =
 		ring_info->ring_buffer->write_index = 0;
 
Quoted 7 lines

drivers/hv/ring_buffer.c int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info, · line 367

Quoted 4 lines
drivers/hv/ring_buffer.c +4 -0
+	/*
+	 * Set the feature bit for enabling flow control.
+	 */
+	ring_info->ring_buffer->feature_bits.value = 1;

What happens if you are running on an old system that doesn't support this new "feature"?

Quoted 4 lines

The control structure for the ring buffer (where this feature bit is) has not changed and so, for hosts that don't understand this, it does not matter.

Hope this helps. Let me know if you want me to rewrite comment and resend this patch.

Please do, it's confusing :)

thanks,

greg k-h