From patchwork Sun Dec 25 11:39:32 2016
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Paul Blakey
X-Patchwork-Id: 708694
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Received: from mail.linuxfoundation.org (mail.linuxfoundation.org
[140.211.169.12])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
bits)) (No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 3tmgQN2vr4z9t17
for ;
Sun, 25 Dec 2016 22:49:16 +1100 (AEDT)
Received: from mail.linux-foundation.org (localhost [127.0.0.1])
by mail.linuxfoundation.org (Postfix) with ESMTP id 444849BA;
Sun, 25 Dec 2016 11:47:27 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@mail.linuxfoundation.org
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id 5AE1A8D9
for ; Sun, 25 Dec 2016 11:47:21 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])
by smtp1.linuxfoundation.org (Postfix) with ESMTP id 4B98B13A
for ; Sun, 25 Dec 2016 11:47:20 +0000 (UTC)
Received: from Internal Mail-Server by MTLPINE1 (envelope-from
paulb@mellanox.com)
with ESMTPS (AES256-SHA encrypted); 25 Dec 2016 13:40:34 +0200
Received: from dev-r-vrt-176.mtr.labs.mlnx (dev-r-vrt-176.mtr.labs.mlnx
[10.212.176.1])
by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id uBPBeXb4029898;
Sun, 25 Dec 2016 13:40:34 +0200
From: Paul Blakey
To: dev@openvswitch.org, Andy Gospodarek ,
Simon Horman ,
Jiri Pirko ,
John Fastabend ,
Lance Richardson ,
Marcelo Ricardo Leitner , Joe Stringer
Date: Sun, 25 Dec 2016 13:39:32 +0200
Message-Id: <1482665989-791-5-git-send-email-paulb@mellanox.com>
X-Mailer: git-send-email 1.8.4.3
In-Reply-To: <1482665989-791-1-git-send-email-paulb@mellanox.com>
References: <1482665989-791-1-git-send-email-paulb@mellanox.com>
X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,
UNPARSEABLE_RELAY autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
smtp1.linux-foundation.org
Cc: Shahar Klein , Mark Bloch ,
Hadar Hen Zion , Rony Efraim ,
Or Gerlitz
Subject: [ovs-dev] [PATCH ovs V2 04/21] other-config: Add skip-hw switch to
control tc flower flag
X-BeenThere: ovs-dev@openvswitch.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
MIME-Version: 1.0
Sender: ovs-dev-bounces@openvswitch.org
Errors-To: ovs-dev-bounces@openvswitch.org
Add a new configuration option - skip-hw that controls tc
flower flag. Enabling this option, will set skip_hw flag for
any inserted flower filter using tc api, This will make tc
handle the offloaded flows instead of HW. Default is disabled,
which means flows will be inserted to HW.
Signed-off-by: Paul Blakey
Reviewed-by: Roi Dayan
---
vswitchd/bridge.c | 2 ++
vswitchd/vswitch.xml | 14 ++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index e90a31a..a83da89 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -68,6 +68,7 @@
#include "lib/vswitch-idl.h"
#include "xenserver.h"
#include "vlan-bitmap.h"
+#include "tc.h"
VLOG_DEFINE_THIS_MODULE(bridge);
@@ -2921,6 +2922,7 @@ bridge_run(void)
if (cfg) {
netdev_set_flow_api_enabled(smap_get_bool(&cfg->other_config,
"hw-offload", false));
+ tc_set_skip_hw(smap_get_bool(&cfg->other_config, "skip-hw", false));
dpdk_init(&cfg->other_config);
}
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 9bc9f5f..31fa717 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -199,6 +199,20 @@
+
+
+ Set this value to true
for flows offloaded using tc flower
+ flower classifier be handled in software (use skip_hw flower flag).
+
+
+ This is only relevant if HW offloading is enabled (hw-offload).
+
+
+ The default value is false
.
+
+
+