From patchwork Thu Jan 22 16:11:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 43534 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9F2B240DB for ; Thu, 22 Jan 2015 16:12:05 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id b57sf2203278eek.0 for ; Thu, 22 Jan 2015 08:12:05 -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=hux1GkS35+onrIBzm/LwrcCb0AE0Y454QUXv+U749JGdHzMgYV6nXEUV8cCEnIxLZ8 o1eBeVJpPYWJ/as6XteXf/6VlJz/HnOWHBD4Hzw0W0369scEd2HcBDFqVHPAqUtICtyQ yMFMk9fC0bC7KZrnavOEhm0PE/OGFKyIYI0DH1IfHmQp0OG5YuaCwpbD5tSbci3tTRCo Cuwjp/QJwVzaXYlF6bzF1o0DX5Kfj49S0jc1b369GTpoNkixYYF28nSOjdFnGxey2GfN pcqzVb2JKxVR92z39ukfkz/AehiFN+Z2AQLX+6ISE0XThf6EGWt4oynvwb49ficXBqnl ywww== X-Gm-Message-State: ALoCoQnAeKMisvssV2nBaXLeQ3F5pNw1bgwaPhFVZT7w1aktRUbNJy0FNPjLpaHFxEtZKGZkKysU X-Received: by 10.112.213.72 with SMTP id nq8mr360110lbc.18.1421943125066; Thu, 22 Jan 2015 08:12:05 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.220.164 with SMTP id px4ls177343lac.34.gmail; Thu, 22 Jan 2015 08:12:04 -0800 (PST) X-Received: by 10.112.13.103 with SMTP id g7mr2581359lbc.29.1421943124891; Thu, 22 Jan 2015 08:12:04 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id kw4si1743081lac.133.2015.01.22.08.12.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 08:12:04 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id hs14so2478265lab.11 for ; Thu, 22 Jan 2015 08:12:04 -0800 (PST) X-Received: by 10.112.44.230 with SMTP id h6mr2561813lbm.98.1421943124756; Thu, 22 Jan 2015 08:12:04 -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 c8csp312669lbb; Thu, 22 Jan 2015 08:12:04 -0800 (PST) X-Received: by 10.140.89.18 with SMTP id u18mr3825227qgd.20.1421943123448; Thu, 22 Jan 2015 08:12:03 -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 t12si4972463qge.100.2015.01.22.08.12.02 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:12:03 -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 1YEKMT-0000ED-42; Thu, 22 Jan 2015 16:12:01 +0000 Received: from mail-la0-f47.google.com ([209.85.215.47]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEKM8-0000AW-B9 for lng-odp@lists.linaro.org; Thu, 22 Jan 2015 16:11:40 +0000 Received: by mail-la0-f47.google.com with SMTP id hz20so2492268lab.6 for ; Thu, 22 Jan 2015 08:11:34 -0800 (PST) X-Received: by 10.112.14.6 with SMTP id l6mr2536148lbc.91.1421943094157; Thu, 22 Jan 2015 08:11:34 -0800 (PST) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id o1sm6428902laj.29.2015.01.22.08.11.32 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:11:33 -0800 (PST) From: Ciprian Barbu To: zoltan.kiss@linaro.org, lng-odp@lists.linaro.org Date: Thu, 22 Jan 2015 18:11:16 +0200 Message-Id: <1421943076-12240-6-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1421943076-12240-1-git-send-email-ciprian.barbu@linaro.org> References: <1421943076-12240-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH odp-ovs 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.52 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"