From patchwork Tue Nov 10 22:42:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Mauricio_V=C3=A1squez?= X-Patchwork-Id: 542640 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3483114141D for ; Wed, 11 Nov 2015 09:42:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=studenti.polito.it header.i=@studenti.polito.it header.b=nLA+agfO; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 745B0109AC; Tue, 10 Nov 2015 14:42:39 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 9CEC610618 for ; Tue, 10 Nov 2015 14:42:37 -0800 (PST) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id E51A11E00C1 for ; Tue, 10 Nov 2015 15:42:36 -0700 (MST) X-ASG-Debug-ID: 1447195355-09eadd036423fe50001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id d0PGQ1eGg6AbJXga (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 10 Nov 2015 15:42:35 -0700 (MST) X-Barracuda-Envelope-From: mauricio.vasquezbernal@studenti.polito.it X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO compass.polito.it) (130.192.55.110) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 10 Nov 2015 22:42:34 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at studenti.polito.it designates 130.192.55.110 as permitted sender) X-Barracuda-Apparent-Source-IP: 130.192.55.110 X-Barracuda-RBL-IP: 130.192.55.110 Received: from localhost (localhost [127.0.0.1]) by compass.polito.it (Postfix) with ESMTP id 6D0331000EB for ; Tue, 10 Nov 2015 23:42:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= studenti.polito.it; h=content-type:content-type:to:from:from :subject:subject:message-id:date:date:received:mime-version :received:received:received; s=y2k10; t=1447195351; bh=hJEm5foNZ mRxxOqXP3damx00fdBCq6+YwHuvQ58ueBw=; b=nLA+agfOWhgTtCs56gOYwvjFC 5XW0zDbj2i06eMCXSOlkP74c16etTgJtMHyaE0IaY4a6bUs0QVqLaZBro95DW1w4 Z7Z9A2pwQUo1lUROAS+S5WpEw8QfoExhQpcXCkV3LStKOOYfcUFhItKU7fCxTBNu WoB0QzqW4wc4s22osI= X-Virus-Scanned: amavisd-new at studenti.polito.it Received: from compass.polito.it ([127.0.0.1]) by localhost (compass.polito.it [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5wlI2dC83JLd for ; Tue, 10 Nov 2015 23:42:31 +0100 (CET) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: s203403@studenti.polito.it) by compass.polito.it (Postfix) with ESMTPSA id 53106100123 for ; Tue, 10 Nov 2015 23:42:31 +0100 (CET) Received: by lbbcs9 with SMTP id cs9so7105038lbb.1 for ; Tue, 10 Nov 2015 14:42:30 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.112.190.35 with SMTP id gn3mr2971551lbc.96.1447195350788; Tue, 10 Nov 2015 14:42:30 -0800 (PST) Received: by 10.25.77.69 with HTTP; Tue, 10 Nov 2015 14:42:30 -0800 (PST) Date: Tue, 10 Nov 2015 23:42:30 +0100 X-Gmail-Original-Message-ID: Message-ID: X-CudaMail-MID: CM-E2-1109092206 X-CudaMail-DTE: 111015 X-CudaMail-Originating-IP: 130.192.55.110 X-CudaMail-Envelope-Sender: mauricio.vasquezbernal@studenti.polito.it X-ASG-Orig-Subj: [##CM-E2-1109092206##][PATCH] netdev-dpdk: Modify rings creation attributes From: =?UTF-8?Q?Mauricio_V=C3=A1squez?= To: dev@openvswitch.org X-GBUdb-Analysis: 0, 130.192.55.110, Ugly c=0 p=0 Source New X-MessageSniffer-Rules: 0-0-0-10479-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1447195355 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=3.0 tests=BSF_SC5_MJ1963, DKIM_SIGNED, HTML_MESSAGE, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.24284 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.00 HTML_MESSAGE BODY: HTML included in message 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Subject: [ovs-dev] [PATCH] netdev-dpdk: Modify rings creation attributes X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" 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 --- 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; 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) {