From patchwork Thu Jan 22 16:09:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 43529 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 45640240DB for ; Thu, 22 Jan 2015 16:10:03 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf1558175wgg.0 for ; Thu, 22 Jan 2015 08:10:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=tmK8t11f1+cYCN4BO2WpuaOoUzNO5C4MRSxbqeuplZc=; b=Aj+H0iyQvKmRjOGJBOljbRYNOyj0rD8pkRqKgEEB3okm6IUB8CD/4ul08IAl7UmL0V OU9qFnBBp3M4QRkjFw3Fcpmv4jrkKcxgeuBO1e0BtNqpmbMyKH/euoKWoOGSMVepOdT5 33SJ4wkj68bt/15BFmJatTBFJui8b8WOFjRKoxqwUlv6scYz+rElDLYapqJrsV9rZ5+U DfG2r90C1XlLDAZypFRG/c39ObUP+p7AaTTsrR7EaosMOPUci8OrtI9vHhVW18pAJS6W FHt1oG1nIciYnRh7mXEJeksiJdne6zaON/JkduPAKllSnuKlbhmIt3s5qG7NODD6i/U1 elyQ== X-Gm-Message-State: ALoCoQme9fjAJC6e5JqZzHMg1sW+Cbr02vw06i+rScuEdFts/huSMFVnVN+A3X3AAilW7UkNIapI X-Received: by 10.152.170.201 with SMTP id ao9mr354909lac.5.1421943002535; Thu, 22 Jan 2015 08:10:02 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.73 with SMTP id o9ls167427laj.65.gmail; Thu, 22 Jan 2015 08:10:02 -0800 (PST) X-Received: by 10.152.203.201 with SMTP id ks9mr2472634lac.57.1421943002382; Thu, 22 Jan 2015 08:10:02 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id tf9si21091048lbb.67.2015.01.22.08.10.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 08:10:02 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id pn19so2474136lab.9 for ; Thu, 22 Jan 2015 08:10:02 -0800 (PST) X-Received: by 10.112.173.202 with SMTP id bm10mr2622121lbc.24.1421943000799; Thu, 22 Jan 2015 08:10:00 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp311873lbb; Thu, 22 Jan 2015 08:10:00 -0800 (PST) X-Received: by 10.236.31.38 with SMTP id l26mr1334299yha.9.1421942999479; Thu, 22 Jan 2015 08:09:59 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id c12si760771yhn.154.2015.01.22.08.09.58 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:09:59 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEKKS-0008WQ-3G; Thu, 22 Jan 2015 16:09:56 +0000 Received: from mail-la0-f52.google.com ([209.85.215.52]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEKK8-0008S3-E5 for lng-odp@lists.linaro.org; Thu, 22 Jan 2015 16:09:36 +0000 Received: by mail-la0-f52.google.com with SMTP id hs14so2462075lab.11 for ; Thu, 22 Jan 2015 08:09:30 -0800 (PST) X-Received: by 10.112.57.226 with SMTP id l2mr2548564lbq.27.1421942970932; Thu, 22 Jan 2015 08:09:30 -0800 (PST) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id v4sm6429275lav.25.2015.01.22.08.09.29 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:09:30 -0800 (PST) From: Ciprian Barbu To: zoltan.kiss@linaro.org, lng-odp@lists.linaro.org Date: Thu, 22 Jan 2015 18:09:09 +0200 Message-Id: <1421942949-12189-6-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1421942949-12189-1-git-send-email-ciprian.barbu@linaro.org> References: <1421942949-12189-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 5/5] utilities: remove dependency on kernel module for ODP netdev X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ciprian.barbu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Ciprian Barbu --- ODP netdev does not rely on kernel datapath switching, this makes it possible to start in ODP mode without the kernel module. utilities/ovs-ctl.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index 8914b58..bb030a3 100755 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -47,16 +47,16 @@ insert_mod_if_required () { # If the bridge module is loaded, then that might be blocking # openvswitch. Try to unload it, if there are no bridges. - test -e /sys/module/bridge || return 1 + test -e /sys/module/bridge || "X$USE_ODP" == "Xyes" && return 0 || return 1 bridges=`echo /sys/class/net/*/bridge | sed 's,/sys/class/net/,,g;s,/bridge,,g'` if test "$bridges" != "*"; then log_warning_msg "not removing bridge module because bridges exist ($bridges)" return 1 fi - action "removing bridge module" rmmod bridge || return 1 + action "removing bridge module" rmmod bridge || "X$USE_ODP" == "Xyes" && return 0 || return 1 # Try loading openvswitch again. - action "Inserting openvswitch module" modprobe openvswitch + action "Inserting openvswitch module" modprobe openvswitch || "X$USE_ODP" == "Xyes" && return 0 } ovs_vsctl () { @@ -225,7 +225,9 @@ add_managers () { start_forwarding () { check_force_cores - insert_mod_if_required || return 1 + if test X"$USE_ODP" != Xno; then + insert_mod_if_required || return 1 + fi if daemon_is_running ovs-vswitchd; then log_success_msg "ovs-vswitchd is already running"