Skip to contentSkip to conversation

xen/netback: Properly initialize credit_bytes

PATCH In review Ross Lagerwall 2 participants 2 messages May 11, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/netback: Properly initialize credit_bytes

Commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into queue struct") introduced a regression when moving queue-specific data into the queue struct by failing to set the credit_bytes field. This prevented bandwidth limiting from working. Initialize the field as it was done before multiqueue support was added.

---
 drivers/net/xen-netback/xenbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/xenbus.c +1 -1
index 3d8dbf5..1be3ef3 100644
@@ -793,7 +793,7 @@ static void connect(struct backend_info *be)
 			goto err;
 		}
 
-		queue->remaining_credit = credit_bytes;
+		queue->remaining_credit = queue->credit_bytes = credit_bytes;
 		queue->credit_usec = credit_usec;
 
 		err = connect_rings(be, queue);
Signature · 1 line
2.1.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ross Lagerwall

Commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into queue struct") introduced a regression when moving queue-specific data into the queue struct by failing to set the credit_bytes field. This prevented bandwidth limiting from working. Initialize the field as it was done before multiqueue support was added.

This needs to be sent to [email protected].

And please use "[PATCH net]" in subject line since this one is a candidate for stable tree.

Wei.

Quoted 19 lines
---
 drivers/net/xen-netback/xenbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/xenbus.c +1 -1
index 3d8dbf5..1be3ef3 100644
@@ -793,7 +793,7 @@ static void connect(struct backend_info *be)
 			goto err;
 		}
 
-		queue->remaining_credit = credit_bytes;
+		queue->remaining_credit = queue->credit_bytes = credit_bytes;
 		queue->credit_usec = credit_usec;
 
 		err = connect_rings(be, queue);
Signature · 1 line
2.1.0