diff mbox

[ovs-dev] netdev-dpdk: Modify rings creation attributes

Message ID CAPwdgqjrg__wZZKRzZ+DVBV6JjJEnHbq_nVV0+Hr0p9kdA_55A@mail.gmail.com
State Not Applicable
Headers show

Commit Message

Mauricio Vásquez Nov. 10, 2015, 10:42 p.m. UTC
Although netdev does explicit locking, it is only valid from the ovs
perspective, then only the ring ends used by ovs should be declared as
single producer / single consumer.
The other ends that are used by the application should be declared as
multiple producer / multiple consumer that is the most general case.

Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it
>
---
 lib/netdev-dpdk.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

         rte_free(ivshmem);
         return ENOMEM;
@@ -1944,9 +1944,9 @@ dpdk_ring_create(const char dev_name[], unsigned int
port_no,
         return -err;
     }

-    /* Create single consumer/producer rings, netdev does explicit
locking. */
+    /* Create single consumer rx ring, netdev does explicit locking. */
     ivshmem->cring_rx = rte_ring_create(ring_name, DPDK_RING_SIZE, SOCKET0,
-                                        RING_F_SP_ENQ | RING_F_SC_DEQ);
+                                        RING_F_SC_DEQ);
     if (ivshmem->cring_rx == NULL) {
         rte_free(ivshmem);
         return ENOMEM;

Comments

Mauricio Vásquez Nov. 10, 2015, 11:10 p.m. UTC | #1
Right now I realized that I did not respect the 79 characters width limit
on
the description.

Should I resend the path?

Thank you very much.

On 10 November 2015 at 23:42, Mauricio Vásquez <
mauricio.vasquezbernal@studenti.polito.it> wrote:

> Although netdev does explicit locking, it is only valid from the ovs
> perspective, then only the ring ends used by ovs should be declared as
> single producer / single consumer.
> The other ends that are used by the application should be declared as
> multiple producer / multiple consumer that is the most general case.
>
> Signed-off-by: Mauricio Vasquez B <
> mauricio.vasquezbernal@studenti.polito.it>
> ---
>  lib/netdev-dpdk.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 4658416..e3a0771 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -1931,9 +1931,9 @@ dpdk_ring_create(const char dev_name[], unsigned int
> port_no,
>          return -err;
>      }
>
> -    /* Create single consumer/producer rings, netdev does explicit
> locking. */
> +    /* Create single producer tx ring, netdev does explicit locking. */
>      ivshmem->cring_tx = rte_ring_create(ring_name, DPDK_RING_SIZE,
> SOCKET0,
> -                                        RING_F_SP_ENQ | RING_F_SC_DEQ);
> +                                        RING_F_SP_ENQ);
>      if (ivshmem->cring_tx == NULL) {
>          rte_free(ivshmem);
>          return ENOMEM;
> @@ -1944,9 +1944,9 @@ dpdk_ring_create(const char dev_name[], unsigned int
> port_no,
>          return -err;
>      }
>
> -    /* Create single consumer/producer rings, netdev does explicit
> locking. */
> +    /* Create single consumer rx ring, netdev does explicit locking. */
>      ivshmem->cring_rx = rte_ring_create(ring_name, DPDK_RING_SIZE,
> SOCKET0,
> -                                        RING_F_SP_ENQ | RING_F_SC_DEQ);
> +                                        RING_F_SC_DEQ);
>      if (ivshmem->cring_rx == NULL) {
>          rte_free(ivshmem);
>          return ENOMEM;
> --
> 1.9.1
>
Ben Pfaff Nov. 10, 2015, 11:34 p.m. UTC | #2
On Wed, Nov 11, 2015 at 12:10:06AM +0100, Mauricio Vásquez wrote:
> Right now I realized that I did not respect the 79 characters width limit
> on
> the description.
> 
> Should I resend the path?
> 
> Thank you very much.

It looks to me like your patch is word-wrapped.  That is a more serious
issue than the width of the commit message, because it makes it
difficult to apply the patch.

I would re-send it with "git send-email" or with an email client that
does not word wrap.
diff mbox

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 4658416..e3a0771 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1931,9 +1931,9 @@  dpdk_ring_create(const char dev_name[], unsigned int
port_no,
         return -err;
     }

-    /* Create single consumer/producer rings, netdev does explicit
locking. */
+    /* Create single producer tx ring, netdev does explicit locking. */
     ivshmem->cring_tx = rte_ring_create(ring_name, DPDK_RING_SIZE, SOCKET0,
-                                        RING_F_SP_ENQ | RING_F_SC_DEQ);
+                                        RING_F_SP_ENQ);
     if (ivshmem->cring_tx == NULL) {