From patchwork Thu Jun 21 13:35:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hurley X-Patchwork-Id: 932739 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netronome.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="coC8uDnx"; dkim-atps=neutral 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 41BN5D3Z7hz9s19 for ; Thu, 21 Jun 2018 23:36:15 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 5DD99C0C; Thu, 21 Jun 2018 13:36:12 +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 95346BE6 for ; Thu, 21 Jun 2018 13:36:10 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 0891D1A0 for ; Thu, 21 Jun 2018 13:36:09 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id v16-v6so5215509wmh.5 for ; Thu, 21 Jun 2018 06:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=NrSEN/tkyYNZga04OJeNgiki8dJErULHV/rrvhJOpzg=; b=coC8uDnxOQXwqg6wxYVAYyknJWoIqxmRA8WUXULCvNr53ONhecJsgyQ/MvVVFkSYTI upDjXXBIfN5vAqL17QQhr+h8h25EVPGbWfhp8zlhXeXm1kRDEIMROfNaZgEjFf7S9zt1 PqlTdCKXrjgdkYBX32W3ix3YRCmj8urUlbZ+vnKAvqt4tr/iCxvLWp3PJnS3LhV8XNwZ +Vsz/HKeU8yEBMs8amz1CGP4+sFSA+xqtybDWDV/xc8CCBom+1jJxsrIQ7fmLnDY8gbb CO1U6Wy0Mie11TL4GzvQ+808qBvDIjXkisYQXuFN2FJzUWSdY/aZ4uXmChfwwjrRUhYg 8P/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NrSEN/tkyYNZga04OJeNgiki8dJErULHV/rrvhJOpzg=; b=hy1h4ZRE/T5PWTnhAK/Hz7PGswH8a0oXfvVezz+nfOMd0C5Y47CXc+q59Z43FtTtLc VzVLVBpdwdsZtz/MnPqMHD7WTuMRcKn5/XYxVjpaAZODD7mQSoivWMogpS5OpYnTYDf/ j9FDk7fz0alrCKMcIJRxjtMwsZQw99/0QzlQci6TeXiM8hODiMFKh8+ODm930BSykfle nXlBaYKPzhrZNgrFwLpeehMCzWFrMk6axQ1aDyVyK/+IvwJbjBEa+wb3SwozFG9FeosD 3NxbRp0kSLhdNpkMa8LkDg5lg0J6VG2CaRMArAlvWI8oztcG5CcgOz2/xEc3WM8CyZX0 Yckg== X-Gm-Message-State: APt69E0Dk5A2S3j0Xz3GBII8mrJ0dGAGNZdx1VfUa/JqJRXZAazHAsxO lpxgTwvY+blF0fi7hfwV6OSMe+TJ X-Google-Smtp-Source: ADUXVKI+1Tl8/T0rm7rPWCfZdYXlpSTiTqBKPMqnsC5oofjt+BEaf64dTw8XWoP6erMu7L2fj9kdIg== X-Received: by 2002:a1c:7506:: with SMTP id o6-v6mr5244816wmc.60.1529588168206; Thu, 21 Jun 2018 06:36:08 -0700 (PDT) Received: from jhurley-Precision-Tower-3420.netronome.com ([80.76.204.157]) by smtp.gmail.com with ESMTPSA id e63-v6sm8406382wma.46.2018.06.21.06.36.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jun 2018 06:36:07 -0700 (PDT) From: John Hurley To: dev@openvswitch.org, roid@mellanox.com, gavi@mellanox.com, paulb@mellanox.com, fbl@sysclose.org, simon.horman@netronome.com Date: Thu, 21 Jun 2018 14:35:55 +0100 Message-Id: <1529588161-15934-1-git-send-email-john.hurley@netronome.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 0/6] offload Linux LAG devices to the TC datapath 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 This patchset extends OvS TC and the linux-netdev implementation to support the offloading of Linux Link Aggregation devices (LAG) and their slaves. TC blocks are used to provide this offload. Blocks, in TC, group together a series of qdiscs. If a filter is added to one of these qdiscs then it applied to all. Similarly, if a packet is matched on one of the grouped qdiscs then the stats for the entire block are increased. The basis of the LAG offload is that the LAG master (attached to the OvS bridge) and slaves that may exist outside of OvS are all added to the same TC block. OvS can then control the filters and collect the stats on the slaves via its interaction with the LAG master. The TC API is extended within OvS to allow the addition of a block id to ingress qdisc adds. Block ids are then assigned to each LAG master that is attached to the OvS bridge. The linux netdev netlink socket is used to monitor slave devices. If a LAG slave is found whose master is on the bridge then it is added to the same block as its master. If the underlying slaves belong to an offloadable device then the Linux LAG device can be offloaded to hardware. John Hurley (6): tc: allow offloading of block ids netdev-provider: add class op to get block_id rtnetlink: extend parser to include kind of master and slave netdev-linux: indicate if netdev is a LAG master netdev-linux: assign LAG devs to tc blocks netdev-linux: monitor and offload LAG slaves to TC lib/netdev-bsd.c | 3 +- lib/netdev-dpdk.c | 3 +- lib/netdev-dummy.c | 3 +- lib/netdev-linux.c | 128 ++++++++++++++++++++++++++++++++++++++++++++--- lib/netdev-provider.h | 4 ++ lib/netdev-tc-offloads.c | 82 +++++++++++++++++++++++------- lib/netdev-vport.c | 3 +- lib/netdev.c | 10 ++++ lib/netdev.h | 1 + lib/rtnetlink.c | 43 ++++++++++++++++ lib/rtnetlink.h | 4 ++ lib/tc.c | 60 +++++++++++++++------- lib/tc.h | 12 ++--- 13 files changed, 305 insertions(+), 51 deletions(-) mode change 100644 => 100755 lib/rtnetlink.h