From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE705C4360C for ; Fri, 4 Oct 2019 23:19:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E712215EA for ; Fri, 4 Oct 2019 23:19:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="XX/VGP24" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731254AbfJDXTn (ORCPT ); Fri, 4 Oct 2019 19:19:43 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:46544 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbfJDXTn (ORCPT ); Fri, 4 Oct 2019 19:19:43 -0400 Received: by mail-qt1-f194.google.com with SMTP id u22so10801049qtq.13 for ; Fri, 04 Oct 2019 16:19:42 -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:mime-version :content-transfer-encoding; bh=JLr7bExcnmQvsGjy61840oTbll0Y4GYLRzDw92J99Uc=; b=XX/VGP24QAitc5KCDGUPSp406yGxt8unaNbNB2aGIckToyPsTahwFqcksI8h8+xIDW hAAdQiyqB+k6fYp+MfmdRgN78SsbFDduCMeIZehEos/iXn+p4Ym7lANSwU+HjimNypGE Hfi8vp+erP9yWg9JGN53WaKRc2qa7ycKqthgZOFd/shxLGLo6vlRjIYHXIpyLL6ruche gcEcMq92GtE3fWAY0uqryx/5oj3Qv/W248Z1dcvqwHQ7qH3UeKNUFJCM9nImS0r5qwcJ pDrspltqutxBxPaZbNLIjaC4BnLtRYRkUVkjagqno8xyMuavtul9KcvW0pPIJkHHYTHC pNBw== 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:mime-version :content-transfer-encoding; bh=JLr7bExcnmQvsGjy61840oTbll0Y4GYLRzDw92J99Uc=; b=SgSGT0oVLsjD3O+51SjAehmG7CiZA5CtLZPFoX5o+jhJUuh1vBLU8DhXCdGPEz9ktr 6f4ZjPwSZn3hiHRpzoRyDPktVPWqF2mobVDAcczmtebvVN3SLPVGIDbiolGZCS+W7dIT Z04pjuOGFCWir2Z3wPevxbS6l3tUgCzJdH0h9FjxIxxolkY/YLSo5N0KBHzJFb4CaPw1 RUIIt3LOFRY00ORE1WXQRVPIMY6eqZ15b6ilBrpea50BVmKkg0ktVvFKLnAN1UsdwSin e0CJvANMqhHwAOUXYPI+htCnqlSI8kxQjELq+StR8lhQVQ3Ayi8fJmzS5l0yGFFnl4rR 2U0Q== X-Gm-Message-State: APjAAAWUX2tw0wrGTcMvkqs1mEWFZoT5jzK9WZtctgpObAlwvOSzbjbq knwR0SnNRmtuYfg7QTdv+vo19g== X-Google-Smtp-Source: APXvYqzZohaqceDFCdR3yd5vca0geeA7wOdvSrX1ZxI5CH6K/wbeLEtBumkNP6989k5XNRYOFixH1A== X-Received: by 2002:a0c:9638:: with SMTP id 53mr16851154qvx.13.1570231182417; Fri, 04 Oct 2019 16:19:42 -0700 (PDT) Received: from jkicinski-Precision-T1700.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id z46sm4653398qth.62.2019.10.04.16.19.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Oct 2019 16:19:41 -0700 (PDT) From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, davejwatson@fb.com, borisp@mellanox.com, aviadye@mellanox.com, john.fastabend@gmail.com, daniel@iogearbox.net, Jakub Kicinski Subject: [PATCH net-next 0/6] net/tls: add ctrl path tracing and statistics Date: Fri, 4 Oct 2019 16:19:21 -0700 Message-Id: <20191004231927.21134-1-jakub.kicinski@netronome.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi! This set adds trace events related to TLS offload and basic MIB stats for TLS. First patch contains the TLS offload related trace points. Those are helpful in troubleshooting offload issues, especially around the resync paths. Second patch adds a tracepoint to the fastpath of device offload, it's separated out in case there will be objections to adding fast path tracepoints. Again, it's quite useful for debugging offload issues. Next four patches add MIB statistics. The statistics are implemented as per-cpu per-netns counters. Since there are currently no fast path statistics we could move to atomic variables. Per-CPU seem more common. Most basic statistics are number of created and live sessions, broken out to offloaded and non-offloaded. Users seem to like those a lot. Next there is a statistic for decryption errors. These are primarily useful for device offload debug, in normal deployments decryption errors should not be common. Last but not least a counter for device RX resync. Jakub Kicinski (6): net/tls: add tracing for device/offload events net/tls: add device decrypted trace point net/tls: add skeleton of MIB statistics net/tls: add statistics for installed sessions net/tls: add TlsDecryptError stat net/tls: add TlsDeviceRxResync statistic Documentation/networking/tls.rst | 30 +++ .../ethernet/netronome/nfp/nfp_net_common.c | 3 +- include/net/netns/mib.h | 3 + include/net/snmp.h | 6 + include/net/tls.h | 21 +- include/uapi/linux/snmp.h | 17 ++ net/tls/Makefile | 4 +- net/tls/tls_device.c | 36 +++- net/tls/tls_main.c | 60 +++++- net/tls/tls_proc.c | 47 ++++ net/tls/tls_sw.c | 5 + net/tls/trace.c | 10 + net/tls/trace.h | 202 ++++++++++++++++++ 13 files changed, 429 insertions(+), 15 deletions(-) create mode 100644 net/tls/tls_proc.c create mode 100644 net/tls/trace.c create mode 100644 net/tls/trace.h -- 2.21.0