[PATCH v2] ioreq_broadcast(): accept partial broadcast success

Per Bilse posted 1 patch 1 year, 4 months ago
Failed in applying to current master (apply log)
xen/common/ioreq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH v2] ioreq_broadcast(): accept partial broadcast success
Posted by Per Bilse 1 year, 4 months ago
Avoid incorrectly triggering an error when a broadcast buffered ioreq
is not handled by all registered clients, as long as the failure is
strictly because the client doesn't handle buffered ioreqs.

Signed-off-by: Per Bilse <per.bilse@citrix.com>
---
v2: Complete rethink with better information. A lot of simplicity was added.
---
 xen/common/ioreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/common/ioreq.c b/xen/common/ioreq.c
index 4617aef29b..568e7aea91 100644
--- a/xen/common/ioreq.c
+++ b/xen/common/ioreq.c
@@ -1317,7 +1317,8 @@ unsigned int ioreq_broadcast(ioreq_t *p, bool buffered)
 
     FOR_EACH_IOREQ_SERVER(d, id, s)
     {
-        if ( !s->enabled )
+        if ( !s->enabled || (buffered &&
+                    s->bufioreq_handling == HVM_IOREQSRV_BUFIOREQ_OFF) )
             continue;
 
         if ( ioreq_send(s, p, buffered) == IOREQ_STATUS_UNHANDLED )
-- 
2.31.1
Re: [PATCH v2] ioreq_broadcast(): accept partial broadcast success
Posted by Jan Beulich 1 year, 4 months ago
On 06.12.2022 18:52, Per Bilse wrote:
> --- a/xen/common/ioreq.c
> +++ b/xen/common/ioreq.c
> @@ -1317,7 +1317,8 @@ unsigned int ioreq_broadcast(ioreq_t *p, bool buffered)
>  
>      FOR_EACH_IOREQ_SERVER(d, id, s)
>      {
> -        if ( !s->enabled )
> +        if ( !s->enabled || (buffered &&
> +                    s->bufioreq_handling == HVM_IOREQSRV_BUFIOREQ_OFF) )

Nit: Bad indentation. Since inserting the missing blanks would make
the line too long, the expression wants re-wrapping. Can certainly
be done while committing.

Jan
Re: [PATCH v2] ioreq_broadcast(): accept partial broadcast success
Posted by Paul Durrant 1 year, 4 months ago
On 06/12/2022 17:52, Per Bilse wrote:
> Avoid incorrectly triggering an error when a broadcast buffered ioreq
> is not handled by all registered clients, as long as the failure is
> strictly because the client doesn't handle buffered ioreqs.
> 
> Signed-off-by: Per Bilse <per.bilse@citrix.com>
> ---
> v2: Complete rethink with better information. A lot of simplicity was added.
> ---

Reviewed-by: Paul Durrant <paul@xen.org>