diff mbox

[ovs-dev,1/2] datapath-windows: don't map output buffer in OVS_IOCTL_WRITE

Message ID 1463697109-3376-1-git-send-email-nithin@vmware.com
State Accepted
Headers show

Commit Message

Nithin Raju May 19, 2016, 10:31 p.m. UTC
The contract of OVS_IOCTL_WRITE is that write operations
will not need the output buffer. Only the input buffer
will be used in the IRP. So, better to not map the output
buffer at all.

Signed-off-by: Nithin Raju <nithin@vmware.com>
---
 datapath-windows/ovsext/Datapath.c | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Paul Boca May 20, 2016, 6:48 a.m. UTC | #1
Acked-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>


> -----Original Message-----

> From: dev [mailto:dev-bounces@openvswitch.org] On Behalf Of Nithin Raju

> Sent: Friday, May 20, 2016 1:32 AM

> To: dev@openvswitch.org

> Subject: [ovs-dev] [PATCH 1/2] datapath-windows: don't map output buffer in

> OVS_IOCTL_WRITE

> 

> The contract of OVS_IOCTL_WRITE is that write operations

> will not need the output buffer. Only the input buffer

> will be used in the IRP. So, better to not map the output

> buffer at all.

> 

> Signed-off-by: Nithin Raju <nithin@vmware.com>

> ---

>  datapath-windows/ovsext/Datapath.c | 13 -------------

>  1 file changed, 13 deletions(-)

> 

> diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-

> windows/ovsext/Datapath.c

> index 1f89964..e33027c 100644

> --- a/datapath-windows/ovsext/Datapath.c

> +++ b/datapath-windows/ovsext/Datapath.c

> @@ -869,19 +869,6 @@ OvsDeviceControl(PDEVICE_OBJECT deviceObject,

>              goto done;

>          }

> 

> -        /*

> -         * Output buffer not mandatory but map it in case we have something

> -         * to return to requester.

> -        */

> -        if (outputBufferLen != 0) {

> -            status = MapIrpOutputBuffer(irp, outputBufferLen,

> -                sizeof *ovsMsg, &outputBuffer);

> -            if (status != STATUS_SUCCESS) {

> -                goto done;

> -            }

> -            ASSERT(outputBuffer);

> -        }

> -

>          ovsMsg = inputBuffer;

>          ovsMsgLength = inputBufferLen;

>          devOp = OVS_WRITE_DEV_OP;

> --

> 2.7.1.windows.1

> 

> _______________________________________________

> dev mailing list

> dev@openvswitch.org

> http://openvswitch.org/mailman/listinfo/dev
Joe Stringer May 25, 2016, 5:34 p.m. UTC | #2
On 19 May 2016 at 23:48, Paul Boca <pboca@cloudbasesolutions.com> wrote:
> Acked-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@openvswitch.org] On Behalf Of Nithin Raju
>> Sent: Friday, May 20, 2016 1:32 AM
>> To: dev@openvswitch.org
>> Subject: [ovs-dev] [PATCH 1/2] datapath-windows: don't map output buffer in
>> OVS_IOCTL_WRITE
>>
>> The contract of OVS_IOCTL_WRITE is that write operations
>> will not need the output buffer. Only the input buffer
>> will be used in the IRP. So, better to not map the output
>> buffer at all.
>>
>> Signed-off-by: Nithin Raju <nithin@vmware.com>


Thanks, applied
Alin Serdean May 25, 2016, 5:39 p.m. UTC | #3
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>



> -----Mesaj original-----

> De la: dev [mailto:dev-bounces@openvswitch.org] În numele Nithin Raju

> Trimis: Friday, May 20, 2016 1:32 AM

> Către: dev@openvswitch.org

> Subiect: [ovs-dev] [PATCH 1/2] datapath-windows: don't map output buffer

> in OVS_IOCTL_WRITE

> 

> The contract of OVS_IOCTL_WRITE is that write operations will not need the

> output buffer. Only the input buffer will be used in the IRP. So, better to not

> map the output buffer at all.

> 

> Signed-off-by: Nithin Raju <nithin@vmware.com>

> ---

>  datapath-windows/ovsext/Datapath.c | 13 -------------

>  1 file changed, 13 deletions(-)

> 

> diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-

> windows/ovsext/Datapath.c

> index 1f89964..e33027c 100644

> --- a/datapath-windows/ovsext/Datapath.c

> +++ b/datapath-windows/ovsext/Datapath.c

> @@ -869,19 +869,6 @@ OvsDeviceControl(PDEVICE_OBJECT deviceObject,

>              goto done;

>          }

> 

> -        /*

> -         * Output buffer not mandatory but map it in case we have something

> -         * to return to requester.

> -        */

> -        if (outputBufferLen != 0) {

> -            status = MapIrpOutputBuffer(irp, outputBufferLen,

> -                sizeof *ovsMsg, &outputBuffer);

> -            if (status != STATUS_SUCCESS) {

> -                goto done;

> -            }

> -            ASSERT(outputBuffer);

> -        }

> -

>          ovsMsg = inputBuffer;

>          ovsMsgLength = inputBufferLen;

>          devOp = OVS_WRITE_DEV_OP;

> --

> 2.7.1.windows.1

> 

> _______________________________________________

> dev mailing list

> dev@openvswitch.org

> http://openvswitch.org/mailman/listinfo/dev
diff mbox

Patch

diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c
index 1f89964..e33027c 100644
--- a/datapath-windows/ovsext/Datapath.c
+++ b/datapath-windows/ovsext/Datapath.c
@@ -869,19 +869,6 @@  OvsDeviceControl(PDEVICE_OBJECT deviceObject,
             goto done;
         }
 
-        /*
-         * Output buffer not mandatory but map it in case we have something
-         * to return to requester.
-        */
-        if (outputBufferLen != 0) {
-            status = MapIrpOutputBuffer(irp, outputBufferLen,
-                sizeof *ovsMsg, &outputBuffer);
-            if (status != STATUS_SUCCESS) {
-                goto done;
-            }
-            ASSERT(outputBuffer);
-        }
-
         ovsMsg = inputBuffer;
         ovsMsgLength = inputBufferLen;
         devOp = OVS_WRITE_DEV_OP;