[{"id":1774650,"web_url":"http://patchwork.ozlabs.org/comment/1774650/","msgid":"<20170925130050.62b99989@cakuba>","list_archive_url":null,"date":"2017-09-25T11:00:50","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":67484,"url":"http://patchwork.ozlabs.org/api/people/67484/","name":"Jakub Kicinski","email":"jakub.kicinski@netronome.com"},"content":"On Mon, 25 Sep 2017 12:23:34 +0200, Simon Horman wrote:\n> From: Simon Horman <simon.horman@netronome.com>\n> \n> John says:\n> \n> This patch set allows offloading of TC flower match and set tunnel fields\n> to the NFP. The initial focus is on VXLAN traffic. Due to the current\n> state of the NFP firmware, only VXLAN traffic on well known port 4789 is\n> handled. The match and action fields must explicity set this value to be\n> supported. Tunnel end point information is also offloaded to the NFP for\n> both encapsulation and decapsulation. The NFP expects 3 separate data sets\n> to be supplied.\n...\n\nAcked-by: Jakub Kicinski <jakub.kicinski@netronome.com>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=netronome-com.20150623.gappssmtp.com\n\theader.i=@netronome-com.20150623.gappssmtp.com\n\theader.b=\"wdf3795l\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y11NF72VXz9t3t\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 21:01:01 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S934830AbdIYLA6 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 07:00:58 -0400","from mail-wm0-f50.google.com ([74.125.82.50]:50221 \"EHLO\n\tmail-wm0-f50.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S934668AbdIYLA4 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 07:00:56 -0400","by mail-wm0-f50.google.com with SMTP id b195so18248008wmb.5\n\tfor <netdev@vger.kernel.org>; Mon, 25 Sep 2017 04:00:56 -0700 (PDT)","from cakuba (host-79-78-33-110.static.as9105.net. [79.78.33.110])\n\tby smtp.gmail.com with ESMTPSA id\n\tl32sm3490581ede.13.2017.09.25.04.00.53\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 25 Sep 2017 04:00:55 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=netronome-com.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:in-reply-to:references\n\t:organization:mime-version:content-transfer-encoding;\n\tbh=ro5fqS5I2nTRl/QFohfdLBWWrgpxek1I68NtQWLA7Is=;\n\tb=wdf3795lrx3NXl5gHvXV0tZ0zlZnJImAczl7U/2Tv1EYiBhs9y+NyFOd9UOUDlGegd\n\tbn420J5ITsPv82qge1llUPhYcN5hKggG6tZostPbiZva2ioB+cbO2M38VKwM8RQHyNXo\n\tjLPL3hPsxKDcdm1SwF4253/3n/H3UMYO4zpM/4NctRiy5SkE6HuvF4+dNYfTiqoFQRH/\n\tKL+xmAlcII/3v7u+bdrYMjAVXKkxyMbsTRsynetCJMzWdIB/xM8rLifoYJoid8nRtXQy\n\tu5OWdHZ+1+1BOTtWbFFUuO0BKh5acqKshjqosrrCj2VuZnXInLkUjgdcZ7vTZ3RN5rKJ\n\ts2Hw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to\n\t:references:organization:mime-version:content-transfer-encoding;\n\tbh=ro5fqS5I2nTRl/QFohfdLBWWrgpxek1I68NtQWLA7Is=;\n\tb=j0tshjFLn7lDYI4dHcxS+x6M/LDKYBnSvi4HdWwmh0L/xOUeEwFkIVMszToVqDFd47\n\tw281SQAcZgvNfrg3Wd5QgYnHtlLtzo/1wxhPpcUknNcw4o9sFNxKikPKrfkc9+E0U8Ag\n\tOFhjWIXm01cHLYmzsZ3cZ9fCvtTqedi96NqE9uT1nx+vbDp4aAO93x3VZUTkerqCmXt3\n\tN7eNuHD7qbPcfs/hY5pRDjgipszqwUR8um74Afq69UFEPmul1wOEL/X5eSCykKmBZnqQ\n\tZic5AMKvaTqo/Yg08FKkYsxwr75PoT5HJ2HEcOKDCv8TaYHgDoZ8GA1urkmaw9lCEYX0\n\tsxKQ==","X-Gm-Message-State":"AHPjjUiDGRhYw/Y0Wi1ahh1+eTyapsKp3tXm+/lXE40Q5LF+/89yRBlN\n\tVkmu5CPpNuWgffFEA2Ehar7StQ==","X-Google-Smtp-Source":"AOwi7QA7jCLKekn1Ll8+etvF6Kw389e+CHBl+mpWGgoi2MAVXauDthng45TZq7S1o01NnxSM+jM6Xg==","X-Received":"by 10.80.164.87 with SMTP id v23mr13317157edb.99.1506337255748; \n\tMon, 25 Sep 2017 04:00:55 -0700 (PDT)","Date":"Mon, 25 Sep 2017 13:00:50 +0200","From":"Jakub Kicinski <jakub.kicinski@netronome.com>","To":"Simon Horman <simon.horman@netronome.com>","Cc":"David Miller <davem@davemloft.net>, netdev@vger.kernel.org,\n\toss-drivers@netronome.com","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","Message-ID":"<20170925130050.62b99989@cakuba>","In-Reply-To":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>","Organization":"Netronome Systems, Ltd.","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1774801,"web_url":"http://patchwork.ozlabs.org/comment/1774801/","msgid":"<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>","list_archive_url":null,"date":"2017-09-25T15:25:03","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":64793,"url":"http://patchwork.ozlabs.org/api/people/64793/","name":"Or Gerlitz","email":"gerlitz.or@gmail.com"},"content":"On Mon, Sep 25, 2017 at 1:23 PM, Simon Horman\n<simon.horman@netronome.com> wrote:\n> From: Simon Horman <simon.horman@netronome.com>\n>\n> John says:\n>\n> This patch set allows offloading of TC flower match and set tunnel fields\n> to the NFP. The initial focus is on VXLAN traffic. Due to the current\n> state of the NFP firmware, only VXLAN traffic on well known port 4789 is\n> handled. The match and action fields must explicity set this value to be\n> supported. Tunnel end point information is also offloaded to the NFP for\n> both encapsulation and decapsulation. The NFP expects 3 separate data sets\n> to be supplied.\n\n> For decapsulation, 2 separate lists exist; a list of MAC addresses\n> referenced by an index comprised of the port number, and a list of IP\n> addresses. These IP addresses are not connected to a MAC or port.\n\nDo these IP addresses exist on the host kernel SW stack? can the same\nset of TC rules be fully functional and generate the same traffic\npattern when set to run in SW (skip_hw)?\n\n\n> The MAC\n> addresses can be written as a block or one at a time (because they have an\n> index, previous values can be overwritten) while the IP addresses are\n> always written as a list of all the available IPs. Because the MAC address\n> used as a tunnel end point may be associated with a physical port or may\n> be a virtual netdev like an OVS bridge, we do not know which addresses\n> should be offloaded. For this reason, all MAC addresses of active netdevs\n> are offloaded to the NFP. A notifier checks for changes to any currently\n> offloaded MACs or any new netdevs that may occur. For IP addresses, the\n> tunnel end point used in the rules is known as the destination IP address\n> must be specified in the flower classifier rule. When a new IP address\n> appears in a rule, the IP address is offloaded. The IP is removed from the\n> offloaded list when all rules matching on that IP are deleted.\n>\n> For encapsulation, a next hop table is updated on the NFP that contains\n> the source/dest IPs, MACs and egress port. These are written individually\n> when requested. If the NFP tries to encapsulate a packet but does not know\n> the next hop, then is sends a request to the host. The host carries out a\n> route lookup and populates the given entry on the NFP table. A notifier\n> also exists to check for any links changing or going down in the kernel\n> next hop table. If an offloaded next hop entry is removed from the kernel\n> then it is also removed on the NFP.\n>\n> The NFP periodically sends a message to the host telling it which tunnel\n> ports have packets egressing the system. The host uses this information to\n> update the used value in the neighbour entry. This means that, rather than\n> expire when it times out, the kernel will send an ARP to check if the link\n> is still live. From an NFP perspective, this means that valid entries will\n> not be removed from its next hop table.\n>\n> John Hurley (7):\n>   nfp: add helper to get flower cmsg length\n>   nfp: compile flower vxlan tunnel metadata match fields\n>   nfp: compile flower vxlan tunnel set actions\n>   nfp: offload flower vxlan endpoint MAC addresses\n>   nfp: offload vxlan IPv4 endpoints of flower rules\n>   nfp: flower vxlan neighbour offload\n>   nfp: flower vxlan neighbour keep-alive\n>\n>  drivers/net/ethernet/netronome/nfp/Makefile        |   3 +-\n>  drivers/net/ethernet/netronome/nfp/flower/action.c | 169 ++++-\n>  drivers/net/ethernet/netronome/nfp/flower/cmsg.c   |  16 +-\n>  drivers/net/ethernet/netronome/nfp/flower/cmsg.h   |  87 ++-\n>  drivers/net/ethernet/netronome/nfp/flower/main.c   |  13 +\n>  drivers/net/ethernet/netronome/nfp/flower/main.h   |  35 +\n>  drivers/net/ethernet/netronome/nfp/flower/match.c  |  75 +-\n>  .../net/ethernet/netronome/nfp/flower/metadata.c   |   2 +-\n>  .../net/ethernet/netronome/nfp/flower/offload.c    |  74 +-\n>  .../ethernet/netronome/nfp/flower/tunnel_conf.c    | 811 +++++++++++++++++++++\n>  10 files changed, 1243 insertions(+), 42 deletions(-)\n>  create mode 100644 drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c\n>\n> --\n> 2.1.4\n>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"M0X8S1Iz\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y17F15rBwz9tX8\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 26 Sep 2017 01:25:09 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S965097AbdIYPZG (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 11:25:06 -0400","from mail-oi0-f67.google.com ([209.85.218.67]:38719 \"EHLO\n\tmail-oi0-f67.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S964909AbdIYPZE (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 11:25:04 -0400","by mail-oi0-f67.google.com with SMTP id s145so4067653oie.5\n\tfor <netdev@vger.kernel.org>; Mon, 25 Sep 2017 08:25:04 -0700 (PDT)","by 10.202.168.151 with HTTP; Mon, 25 Sep 2017 08:25:03 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=KOLkD/U+bjX2Mm4oA6IELa8vhdFoYGZcGNMbAUPR4NI=;\n\tb=M0X8S1IzFh1lV74Z4+nPUWjTn5lg2pp0XOsZz9ryBmIo6HE8y9/+KKV1YfzVZaL4wg\n\twHsMlcVABz9MwXDTz7A6eJTzl+8TtTWD6IdkbaI3XpmTYZtHCsJzrxFgYbbuaGnemBRX\n\tmJAzQGWcrev+qWbXfxN/VqO52QggkFzp0Nfv5BDWwWYGYhSo0ySp0BF7j3qSGCcEmnF7\n\t3v74rV0r7xPp6BV/sqhz2fk/yCevhVsNQBihH6ngmVbU3AAGsXLXzON6IoKsIc1AMmEw\n\tBZ5dLAbdQLZ7FdY6rqAJmOQ9rVGiX7BhHbIRRq1mYW1EHdGNofp+7zNfqXZCBUMeg86J\n\tLHRQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=KOLkD/U+bjX2Mm4oA6IELa8vhdFoYGZcGNMbAUPR4NI=;\n\tb=ANcFc6qRcbQ9QKwEgrZ6Kk2J6Vsrt7SNWJQILMXBu8aBaHb8jtJqhcnl6+JxeoYvie\n\tf8H00E0CBINZA7fSJGYq3lCCZGa6uFmGhsSi6cTgjlHom2qLvLpI8UmRJ+HerozGk/JO\n\t/u8XuRqflZ43O1+q2Bu7uXk+nNRjrh3BY0n2AH+rVXx8fzJjO/DoFXkY6xdftSSu5p0x\n\tkJZrHGX7Yx3QGYZp3Etj4YTzI/dxNjJNDMcH1wNr/h0JY9tXh8LV7oP8ICfx2S9loSi6\n\togDDS25zidYIDQ5X+03TTCuos4ApkPi526jQBn5bI7fCZpD5347UN0yKhmqwjcq2AmZ7\n\tTyow==","X-Gm-Message-State":"AHPjjUjnK8ryS+MSEtcvY67FU4LH8aqJF170uAEFutjYoQDFS7j36HO9\n\tWRWjoQs8zXzyZPSviNdD9L9/K/7KUrSCcdWkldg=","X-Google-Smtp-Source":"AOwi7QAKLdL0mkXslVdhrwHuApd8cZ0X0CsHRMpjf5P/b+5gMSZvM+yaizYDT6JPDxUNnuKC+t6WgutmxIRQvqjx1RQ=","X-Received":"by 10.202.92.130 with SMTP id q124mr8815435oib.213.1506353104025;\n\tMon, 25 Sep 2017 08:25:04 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>","From":"Or Gerlitz <gerlitz.or@gmail.com>","Date":"Mon, 25 Sep 2017 18:25:03 +0300","Message-ID":"<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","To":"Simon Horman <simon.horman@netronome.com>","Cc":"David Miller <davem@davemloft.net>,\n\tJakub Kicinski <jakub.kicinski@netronome.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>, oss-drivers@netronome.com","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1774861,"web_url":"http://patchwork.ozlabs.org/comment/1774861/","msgid":"<20170925170451.GD18763@vergenet.net>","list_archive_url":null,"date":"2017-09-25T17:04:53","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":64714,"url":"http://patchwork.ozlabs.org/api/people/64714/","name":"Simon Horman","email":"simon.horman@netronome.com"},"content":"On Mon, Sep 25, 2017 at 06:25:03PM +0300, Or Gerlitz wrote:\n> On Mon, Sep 25, 2017 at 1:23 PM, Simon Horman\n> <simon.horman@netronome.com> wrote:\n> > From: Simon Horman <simon.horman@netronome.com>\n> >\n> > John says:\n> >\n> > This patch set allows offloading of TC flower match and set tunnel fields\n> > to the NFP. The initial focus is on VXLAN traffic. Due to the current\n> > state of the NFP firmware, only VXLAN traffic on well known port 4789 is\n> > handled. The match and action fields must explicity set this value to be\n> > supported. Tunnel end point information is also offloaded to the NFP for\n> > both encapsulation and decapsulation. The NFP expects 3 separate data sets\n> > to be supplied.\n> \n> > For decapsulation, 2 separate lists exist; a list of MAC addresses\n> > referenced by an index comprised of the port number, and a list of IP\n> > addresses. These IP addresses are not connected to a MAC or port.\n> \n> Do these IP addresses exist on the host kernel SW stack? can the same\n> set of TC rules be fully functional and generate the same traffic\n> pattern when set to run in SW (skip_hw)?\n\nHi Or,\n\nI asked John (now CCed) about this and his response was:\n\nThe MAC addresses are extracted from the netdevs already loaded in the\nkernel and are monitored for any changes. The IP addresses are slightly\ndifferent in that they are extracted from the rules themselves. We make the\nassumption that, if a packet is decapsulated at the end point and a match\nis attempted on the IP address, that this IP address should be recognised\nin the kernel. That being the case, the same traffic pattern should be\nwitnessed if the skip_hw flag is applied.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=netronome-com.20150623.gappssmtp.com\n\theader.i=@netronome-com.20150623.gappssmtp.com\n\theader.b=\"lcNG7Osq\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y19SF3msnz9t67\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 26 Sep 2017 03:05:01 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S935424AbdIYRE7 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 13:04:59 -0400","from mail-wm0-f45.google.com ([74.125.82.45]:45432 \"EHLO\n\tmail-wm0-f45.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S935407AbdIYRE4 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 13:04:56 -0400","by mail-wm0-f45.google.com with SMTP id q124so21779115wmb.0\n\tfor <netdev@vger.kernel.org>; Mon, 25 Sep 2017 10:04:56 -0700 (PDT)","from vergenet.net ([2001:470:7eb3:403:9eeb:e8ff:fe0d:5b6a])\n\tby smtp.gmail.com with ESMTPSA id\n\ta2sm4359693edd.36.2017.09.25.10.04.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 25 Sep 2017 10:04:55 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=netronome-com.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=nDT5G35syYKmeg0kK5y+68o0rT8HKougobAP7Id78fo=;\n\tb=lcNG7Osqova/XmGK0HYaB3sO8YDYg6AE9t+ZgH8wWfi3uH+xgdn2qQIoZZvGAcS3+h\n\t142mFV/vek+8qxXEfXwRHHJjxM7e0jRRp/8cIAYbelGaR59e61n0fRM5Mv9LQdlZ72kG\n\tARA+7RsKOLeUm7JSWqzZ+3bS0XZPazGMWE9ONanh4o6Dm3GK9a4QP/SyXcCA5a2eV7aj\n\tPZbns+VgJH5CXP7o20WDFTT1UJUJwyipFTpO6rJ7Wz3Tv0wDLgPuNu4srmtGb9Hqnqjt\n\tAjJax3Cwh52thdBY7trE9Z668zt/aTW7bcJZq5Ek6MO06sYIiog4+iLd3u9pf2qQzVg0\n\tj9uA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=nDT5G35syYKmeg0kK5y+68o0rT8HKougobAP7Id78fo=;\n\tb=afvnqoath+TG4aRww4pQYm9BttM5KH67CvUVuX5Bist4Y8XWSL6p7pR/JhWbh75qLJ\n\tBRjkk7leDiKGEQI4w9yOowp6xaFYlMies56NRyk5joHdLjrlRGcyKNsSJ7DKb734i5xr\n\th/sVXLH5t9rY1mwBzsoM6igyd4H7DAGKYc7VMMsfp/dRPj8dpM/RnK+eNIcW++9xUcxm\n\t2b9o/CYHGHn444nNHGXCNJAe8KouTqTTBwMDKynQuh139RPKecLkT9z+dJEFVGrSYuxL\n\tSjDwblexHeLvWvmWNFG8ckCqHidB+LM2YY885KZ4I+0gTGEECVEGXRHkMGjLQqEzlO9s\n\tjmTA==","X-Gm-Message-State":"AHPjjUiHI6ack2wOWrwTt+2An408lTCWaxSlrF0yr3Sjf7vdA6tusJ5d\n\tL8MnNZA5IPl6rhfU1UMxCrdLtQ==","X-Google-Smtp-Source":"AOwi7QBB3vwSTTdl5+O23q/XazdGH5ciwOsLdr8bb12lXl7UVvqx0iJ/mXiCbituo0V399VUbc+60Q==","X-Received":"by 10.80.153.98 with SMTP id l31mr15056491edb.69.1506359095706; \n\tMon, 25 Sep 2017 10:04:55 -0700 (PDT)","Date":"Mon, 25 Sep 2017 19:04:53 +0200","From":"Simon Horman <simon.horman@netronome.com>","To":"Or Gerlitz <gerlitz.or@gmail.com>","Cc":"David Miller <davem@davemloft.net>,\n\tJakub Kicinski <jakub.kicinski@netronome.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>,\n\toss-drivers@netronome.com, John Hurley <john.hurley@netronome.com>","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","Message-ID":"<20170925170451.GD18763@vergenet.net>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1775338,"web_url":"http://patchwork.ozlabs.org/comment/1775338/","msgid":"<20170926121509.50a32571@griffin>","list_archive_url":null,"date":"2017-09-26T10:15:09","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":9287,"url":"http://patchwork.ozlabs.org/api/people/9287/","name":"Jiri Benc","email":"jbenc@redhat.com"},"content":"On Mon, 25 Sep 2017 19:04:53 +0200, Simon Horman wrote:\n> The MAC addresses are extracted from the netdevs already loaded in the\n> kernel and are monitored for any changes. The IP addresses are slightly\n> different in that they are extracted from the rules themselves. We make the\n> assumption that, if a packet is decapsulated at the end point and a match\n> is attempted on the IP address,\n\nYou lost me here, I'm afraid. What do you mean by \"match\"?\n\n> that this IP address should be recognised\n> in the kernel. That being the case, the same traffic pattern should be\n> witnessed if the skip_hw flag is applied.\n\nJust to be really sure that this works correctly, can you confirm that\nthis will match the packet:\n\nip link add vxlan0 type vxlan dstport 4789 dev eth0 external\nip link set dev vxlan0 up\ntc qdisc add dev vxlan0 ingress\nethtool -K eth0 hw-tc-offload on\ntc filter add dev vxlan0 protocol ip parent ffff: flower enc_key_id 102 \\\n   enc_dst_port 4789 src_ip 3.4.5.6 skip_sw action [...]\n\nwhile this one will NOT match:\n\nip link add vxlan0 type vxlan dstport 4789 dev eth0 external\nip link set dev vxlan0 up\ntc qdisc add dev eth0 ingress\nethtool -K eth0 hw-tc-offload on\ntc filter add dev eth0 protocol ip parent ffff: flower enc_key_id 102 \\\n   enc_dst_port 4789 src_ip 3.4.5.6 skip_sw action [...]\n\nWe found that with mlx5, the second one actually matches, too. Which is\na very serious bug. (Adding Paolo who found this. And adding a few more\nMellanox guys to be aware of the bug.)\n\n Jiri","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jbenc@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1cK13Pvtz9sPr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 26 Sep 2017 20:15:17 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S966640AbdIZKPP (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 06:15:15 -0400","from mx1.redhat.com ([209.132.183.28]:52670 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S935308AbdIZKPN (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tTue, 26 Sep 2017 06:15:13 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7FA771F590;\n\tTue, 26 Sep 2017 10:15:13 +0000 (UTC)","from griffin (ovpn-117-95.ams2.redhat.com [10.36.117.95])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 0597C614DC;\n\tTue, 26 Sep 2017 10:15:10 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 7FA771F590","Date":"Tue, 26 Sep 2017 12:15:09 +0200","From":"Jiri Benc <jbenc@redhat.com>","To":"Simon Horman <simon.horman@netronome.com>","Cc":"Or Gerlitz <gerlitz.or@gmail.com>, David Miller <davem@davemloft.net>,\n\tJakub Kicinski <jakub.kicinski@netronome.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>,\n\toss-drivers@netronome.com, John Hurley <john.hurley@netronome.com>,\n\tPaolo Abeni <pabeni@redhat.com>, Eli Cohen <eli@mellanox.com>,\n\tPaul Blakey <paulb@mellanox.com>","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","Message-ID":"<20170926121509.50a32571@griffin>","In-Reply-To":"<20170925170451.GD18763@vergenet.net>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>\n\t<20170925170451.GD18763@vergenet.net>","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tTue, 26 Sep 2017 10:15:13 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1775435,"web_url":"http://patchwork.ozlabs.org/comment/1775435/","msgid":"<CAJ3xEMjEAhzC5=S7-dx8RiS=E7gYBBrtWY=9Cvqj-K3kyT9o3A@mail.gmail.com>","list_archive_url":null,"date":"2017-09-26T12:41:37","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":64793,"url":"http://patchwork.ozlabs.org/api/people/64793/","name":"Or Gerlitz","email":"gerlitz.or@gmail.com"},"content":"On Tue, Sep 26, 2017 at 1:15 PM, Jiri Benc <jbenc@redhat.com> wrote:\n> On Mon, 25 Sep 2017 19:04:53 +0200, Simon Horman wrote:\n>> The MAC addresses are extracted from the netdevs already loaded in the\n>> kernel and are monitored for any changes. The IP addresses are slightly\n>> different in that they are extracted from the rules themselves. We make the\n>> assumption that, if a packet is decapsulated at the end point and a match\n>> is attempted on the IP address,\n>\n> You lost me here, I'm afraid. What do you mean by \"match\"?\n>\n>> that this IP address should be recognised\n>> in the kernel. That being the case, the same traffic pattern should be\n>> witnessed if the skip_hw flag is applied.\n>\n> Just to be really sure that this works correctly, can you confirm that\n> this will match the packet:\n>\n> ip link add vxlan0 type vxlan dstport 4789 dev eth0 external\n> ip link set dev vxlan0 up\n> tc qdisc add dev vxlan0 ingress\n> ethtool -K eth0 hw-tc-offload on\n> tc filter add dev vxlan0 protocol ip parent ffff: flower enc_key_id 102 \\\n>    enc_dst_port 4789 src_ip 3.4.5.6 skip_sw action [...]\n>\n> while this one will NOT match:\n\nwhat do you exactly mean by \"will not match\"\n\n> ip link add vxlan0 type vxlan dstport 4789 dev eth0 external\n> ip link set dev vxlan0 up\n> tc qdisc add dev eth0 ingress\n> ethtool -K eth0 hw-tc-offload on\n> tc filter add dev eth0 protocol ip parent ffff: flower enc_key_id 102 \\\n>    enc_dst_port 4789 src_ip 3.4.5.6 skip_sw action [...]\n\nPlease note that the way the rule is being set to the HW driver is by delegation\ndone in flower, see these commits (specifically \"Add offload support\nusing egress Hardware device\")\n\na6e1693 net/sched: cls_flower: Set the filter Hardware device for all use-cases\n7091d8c net/sched: cls_flower: Add offload support using egress Hardware device\n255cb30 net/sched: act_mirred: Add new tc_action_ops get_dev()\n\nSince the egress port is not HW port netdev but rather SW virtual tunnel netdev\nwe have some logic in the kernel to delegate the rule programming to\nHW via the HW netdev\n\nOKay? if not, please elaborate\n\n> We found that with mlx5, the second one actually matches, too. Which is\n> a very serious bug. (Adding Paolo who found this. And adding a few more\n> Mellanox guys to be aware of the bug.)\n\nWhat is the bug in your view?\n\nOr.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"pHRcWnQa\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1gYy1sBQz9tXP\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 26 Sep 2017 22:41:42 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S936939AbdIZMlk (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 08:41:40 -0400","from mail-oi0-f68.google.com ([209.85.218.68]:34891 \"EHLO\n\tmail-oi0-f68.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S936631AbdIZMlj (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 26 Sep 2017 08:41:39 -0400","by mail-oi0-f68.google.com with SMTP id r20so6040817oie.2\n\tfor <netdev@vger.kernel.org>; Tue, 26 Sep 2017 05:41:38 -0700 (PDT)","by 10.202.168.151 with HTTP; Tue, 26 Sep 2017 05:41:37 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=5LHMxRm11WBzNYK1nvDVruVzLdYuVEQZvrotiugaILo=;\n\tb=pHRcWnQa78hs+qfvSEZcRxIpTYnFL0E+Z7hYHMid+BLK3A3fYAPVPl4f/G16zZPFkb\n\t4fQUlOAzMUlfaD9ExhLn2aMwlzQttbYvrxQERI9hmYRLxn1rVOiSfUfKiBRdOzWrI915\n\tkz44GvpzcZgZCkJGHLuiIW5QMN0uQYttljfl9eSN6tuRnG3u/8tlHswwWK4ubfEstK5W\n\taFlhufxIq7AYbrT3yGOUmqD1s9rmjq64LZZTajt9FmHAF938ElLZCHXwQYN2FCl2FlEQ\n\tDARDqqhiwWx23xhej9xNHb5ZmlPe415o5ZkUajPECWy5NfuCWUtQyWKbb+K3Co6CKHjQ\n\t1mBg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=5LHMxRm11WBzNYK1nvDVruVzLdYuVEQZvrotiugaILo=;\n\tb=qkG5XzzwueOuul/rEjkSgIdF2eCiiLWsTZDHDYqzo7mcRsWf4OGjhE01nVZd4FxOR7\n\tmY7eZ6iU46WEODUDprUwP0oclyO+wBX9CXFT+StK4GOgMdbSek1fNU0nK5nN6q/3lAV5\n\tPXgKmWvctNMuP4i8Zsxi/Pg6dkhZo1HHtjZNQunKG0BhcsMizB1DOE3H1+ISDdIV/96B\n\tBoB9OYmyrJDKmmlpvIP50IGcTumBzrmwPrM2ARUmTANRUacUuDq1Db1uPjqVfyq/Suth\n\tCk0rRgdsszKpqxwJiLnglQaX9KzMfgJJW7HVduoIaTmaj8chZMmoOtP9vE40DFit1ONL\n\t9ZrQ==","X-Gm-Message-State":"AHPjjUiKw4fzsn8NEqi6lBLAwxfk5w+LyiCSWtLEtX0ztyv78/J8XXgN\n\tDzBDlHKlGo2LR9zaHUKr6MwNRBufjROCD/ZLTZpbjA==","X-Google-Smtp-Source":"AOwi7QCEU19MDtMwFmy8DPPNpqM5GdBpmxlKbdf0EtlVHCJOyzWmfXWMjZg2BvdELvHdHK1bJ1V1LDVeklnjhfyVPpo=","X-Received":"by 10.157.10.3 with SMTP id 3mr2135186otg.164.1506429698358; Tue,\n\t26 Sep 2017 05:41:38 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170926121509.50a32571@griffin>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>\n\t<20170925170451.GD18763@vergenet.net>\n\t<20170926121509.50a32571@griffin>","From":"Or Gerlitz <gerlitz.or@gmail.com>","Date":"Tue, 26 Sep 2017 15:41:37 +0300","Message-ID":"<CAJ3xEMjEAhzC5=S7-dx8RiS=E7gYBBrtWY=9Cvqj-K3kyT9o3A@mail.gmail.com>","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","To":"Jiri Benc <jbenc@redhat.com>","Cc":"Simon Horman <simon.horman@netronome.com>,\n\tDavid Miller <davem@davemloft.net>,\n\tJakub Kicinski <jakub.kicinski@netronome.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>,\n\toss-drivers@netronome.com, John Hurley <john.hurley@netronome.com>,\n\tPaolo Abeni <pabeni@redhat.com>, Paul Blakey <paulb@mellanox.com>,\n\tJiri Pirko <jiri@mellanox.com>, Roi Dayan <roid@mellanox.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1775443,"web_url":"http://patchwork.ozlabs.org/comment/1775443/","msgid":"<20170926145143.28bf52bd@griffin>","list_archive_url":null,"date":"2017-09-26T12:51:43","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":9287,"url":"http://patchwork.ozlabs.org/api/people/9287/","name":"Jiri Benc","email":"jbenc@redhat.com"},"content":"On Tue, 26 Sep 2017 15:41:37 +0300, Or Gerlitz wrote:\n> Please note that the way the rule is being set to the HW driver is by delegation\n> done in flower, see these commits (specifically \"Add offload support\n> using egress Hardware device\")\n\nIt's very well possible the bug is somewhere in net/sched.\n\n> What is the bug in your view?\n\nIf you replace skip_sw with skip_hw, the rules have to work\nidentically. In software, decapsulated packets appear on the vxlan0\ninterface, not on the eth0 interface. As the consequence, the second\nexample must not match on such packets. Those packets do not appear on\neth0 with software only path. eth0 sees encapsulated packets only. It's\nvxlan0 that sees decapsulated packets with attached dst_metadata and\nthat's the only interface where the flower filter in the example can\nmatch.\n\nHardware offloaded path must behave identically to the software path.\n\n Jiri","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jbenc@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1gng0x8Mz9tXn\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 26 Sep 2017 22:51:51 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S968827AbdIZMvt (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 08:51:49 -0400","from mx1.redhat.com ([209.132.183.28]:43114 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S966144AbdIZMvs (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tTue, 26 Sep 2017 08:51:48 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 2109BC058EA2;\n\tTue, 26 Sep 2017 12:51:48 +0000 (UTC)","from griffin (ovpn-117-95.ams2.redhat.com [10.36.117.95])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 9A88677D46;\n\tTue, 26 Sep 2017 12:51:45 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 2109BC058EA2","Date":"Tue, 26 Sep 2017 14:51:43 +0200","From":"Jiri Benc <jbenc@redhat.com>","To":"Or Gerlitz <gerlitz.or@gmail.com>","Cc":"Simon Horman <simon.horman@netronome.com>,\n\tDavid Miller <davem@davemloft.net>,\n\tJakub Kicinski <jakub.kicinski@netronome.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>,\n\toss-drivers@netronome.com, John Hurley <john.hurley@netronome.com>,\n\tPaolo Abeni <pabeni@redhat.com>, Paul Blakey <paulb@mellanox.com>,\n\tJiri Pirko <jiri@mellanox.com>, Roi Dayan <roid@mellanox.com>","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","Message-ID":"<20170926145143.28bf52bd@griffin>","In-Reply-To":"<CAJ3xEMjEAhzC5=S7-dx8RiS=E7gYBBrtWY=9Cvqj-K3kyT9o3A@mail.gmail.com>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>\n\t<20170925170451.GD18763@vergenet.net>\n\t<20170926121509.50a32571@griffin>\n\t<CAJ3xEMjEAhzC5=S7-dx8RiS=E7gYBBrtWY=9Cvqj-K3kyT9o3A@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]);\n\tTue, 26 Sep 2017 12:51:48 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1775569,"web_url":"http://patchwork.ozlabs.org/comment/1775569/","msgid":"<CAJ3xEMjOkF7vKHY=+q1dHXGdsyEXFPUa6dsGD_-M3+TX=DNouA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-26T14:17:02","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":64793,"url":"http://patchwork.ozlabs.org/api/people/64793/","name":"Or Gerlitz","email":"gerlitz.or@gmail.com"},"content":"On Tue, Sep 26, 2017 at 3:51 PM, Jiri Benc <jbenc@redhat.com> wrote:\n> On Tue, 26 Sep 2017 15:41:37 +0300, Or Gerlitz wrote:\n>> Please note that the way the rule is being set to the HW driver is by delegation\n>> done in flower, see these commits (specifically \"Add offload support\n>> using egress Hardware device\")\n>\n> It's very well possible the bug is somewhere in net/sched.\n\nmaybe before/instead you call it a bug, take a look on the design\nthere and maybe\ntell us how to possibly do that otherwise?","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"keoBbxsn\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1jh26CLTz9t3B\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 00:17:06 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S968272AbdIZORF (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 10:17:05 -0400","from mail-oi0-f65.google.com ([209.85.218.65]:34067 \"EHLO\n\tmail-oi0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S965237AbdIZORD (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 26 Sep 2017 10:17:03 -0400","by mail-oi0-f65.google.com with SMTP id v188so6268117oia.1\n\tfor <netdev@vger.kernel.org>; Tue, 26 Sep 2017 07:17:03 -0700 (PDT)","by 10.202.168.151 with HTTP; Tue, 26 Sep 2017 07:17:02 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=qv1+ryXhhz3CLarMWV0F0G4EwY5zqQPL878sHy3vt4o=;\n\tb=keoBbxsnnbNcJRgM+XieFt7VY2RfK9DqjEfpLHPCj9rvWh5SjkfNPM1T78g0VCuuKN\n\tAOILgaOkNwwM3sN6XD/SqjVFgR5mlgzslYnpIRv6c1Rki4MS605Z4ILq3AG8YLb4TU82\n\tNiIzQxSX+8rMd2eTIFoGMCyZ9it53InalJr1U/sfoIKrx0lOZb96xM8UvuIjOEZGphiA\n\tRWzjmHB/HCKByev1HM7kqlQEM2Fl+gw9YVVbUwYlFxlJrz2O2GDfpu3t0zBcwgpTAl9z\n\tTAjWCcVyEFYKONww3Idk8af1hqpkPCibc2lNtFpNX4LiYyvfFcse3uVnoqLEQVW9xiZr\n\tzGjw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=qv1+ryXhhz3CLarMWV0F0G4EwY5zqQPL878sHy3vt4o=;\n\tb=qcaR6JGEB1XWFqt0hKSNv43T7b+V1Xg4rTqwwbQj1x/S68+UAdXGLm2boKOfGsbW1F\n\tfRwKnHD9rtNH4c5J4Nh74W8+EuPCpzBp28dKaHDnKu9n0fjlf8lRS1FUJdGdDrr7zMDG\n\t7TUAQ77TvFczleTIp3mw4OOUXYdCj4PVCOhHOkNPgAWwHeCPmrFNzB9X0k5fv9GQuO2E\n\tbEfX+wGYpxprmqIFTjnB7DDbuPt91GlpFIvDZlLE7jShdb+AiTPLBM8vcQJQPs7yRGaV\n\thvVlivJiYQZ8d4xjYIoDIZp1+/8BT3GcTvktsBqDBdIbTlXxjbZHa2PLkt5NJ/subYql\n\t8zBA==","X-Gm-Message-State":"AHPjjUjSAK7DU3x+uEblUhuzvxuxEQ77NTZjUit1bekVzU6YatLTfNAD\n\td+61/cE04lTlIQsxRKCscCpNkOHUALl9fkYWVtY=","X-Google-Smtp-Source":"AOwi7QDuHfxSCY3nRBcnKDFJodgb7ODn3Tz6qNUG+nNsIvvyFOgf8J1e6BzRVvJAaufpiw2XRAo2sFJhne7SMXI54DQ=","X-Received":"by 10.157.44.146 with SMTP id p18mr2311572otb.64.1506435422959; \n\tTue, 26 Sep 2017 07:17:02 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170926145143.28bf52bd@griffin>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>\n\t<20170925170451.GD18763@vergenet.net>\n\t<20170926121509.50a32571@griffin>\n\t<CAJ3xEMjEAhzC5=S7-dx8RiS=E7gYBBrtWY=9Cvqj-K3kyT9o3A@mail.gmail.com>\n\t<20170926145143.28bf52bd@griffin>","From":"Or Gerlitz <gerlitz.or@gmail.com>","Date":"Tue, 26 Sep 2017 17:17:02 +0300","Message-ID":"<CAJ3xEMjOkF7vKHY=+q1dHXGdsyEXFPUa6dsGD_-M3+TX=DNouA@mail.gmail.com>","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","To":"Jiri Benc <jbenc@redhat.com>","Cc":"Simon Horman <simon.horman@netronome.com>,\n\tDavid Miller <davem@davemloft.net>,\n\tJakub Kicinski <jakub.kicinski@netronome.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>,\n\toss-drivers@netronome.com, John Hurley <john.hurley@netronome.com>,\n\tPaolo Abeni <pabeni@redhat.com>, Paul Blakey <paulb@mellanox.com>,\n\tJiri Pirko <jiri@mellanox.com>, Roi Dayan <roid@mellanox.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1775576,"web_url":"http://patchwork.ozlabs.org/comment/1775576/","msgid":"<20170926163135.36d14a72@griffin>","list_archive_url":null,"date":"2017-09-26T14:31:35","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":9287,"url":"http://patchwork.ozlabs.org/api/people/9287/","name":"Jiri Benc","email":"jbenc@redhat.com"},"content":"On Tue, 26 Sep 2017 17:17:02 +0300, Or Gerlitz wrote:\n> maybe before/instead you call it a bug,\n\nBut it is a bug. When offloaded, the rules must not behave differently.\nThat's the fundamental thing about offloading. Here, the rules behave\ndifferently when offloaded and when not. That's a bug.\n\n> take a look on the design there and maybe\n> tell us how to possibly do that otherwise?\n\nI don't know the design. It's the responsibility of those who implement\nthe offloading to do it in the way that it's consistent with the\nsoftware path. That has always been the case.\n\nThis needs to be fixed. If it can't be fixed, the feature needs to be\nreverted. It's not that Linux has to make use of every single offload\nsupported by hardware. If the offloading cannot be fit into how Linux\nworks, then the offload can't be supported. There are in fact many\nprecedents.\n\n Jiri","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jbenc@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1k0w2pSmz9sNV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 00:31:44 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S936547AbdIZObl (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 10:31:41 -0400","from mx1.redhat.com ([209.132.183.28]:35406 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S935644AbdIZObk (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tTue, 26 Sep 2017 10:31:40 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 9D386C057FA7;\n\tTue, 26 Sep 2017 14:31:39 +0000 (UTC)","from griffin (ovpn-117-95.ams2.redhat.com [10.36.117.95])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 1C44E77D42;\n\tTue, 26 Sep 2017 14:31:36 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 9D386C057FA7","Date":"Tue, 26 Sep 2017 16:31:35 +0200","From":"Jiri Benc <jbenc@redhat.com>","To":"Or Gerlitz <gerlitz.or@gmail.com>","Cc":"Simon Horman <simon.horman@netronome.com>,\n\tDavid Miller <davem@davemloft.net>,\n\tJakub Kicinski <jakub.kicinski@netronome.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>,\n\toss-drivers@netronome.com, John Hurley <john.hurley@netronome.com>,\n\tPaolo Abeni <pabeni@redhat.com>, Paul Blakey <paulb@mellanox.com>,\n\tJiri Pirko <jiri@mellanox.com>, Roi Dayan <roid@mellanox.com>","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","Message-ID":"<20170926163135.36d14a72@griffin>","In-Reply-To":"<CAJ3xEMjOkF7vKHY=+q1dHXGdsyEXFPUa6dsGD_-M3+TX=DNouA@mail.gmail.com>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>\n\t<20170925170451.GD18763@vergenet.net>\n\t<20170926121509.50a32571@griffin>\n\t<CAJ3xEMjEAhzC5=S7-dx8RiS=E7gYBBrtWY=9Cvqj-K3kyT9o3A@mail.gmail.com>\n\t<20170926145143.28bf52bd@griffin>\n\t<CAJ3xEMjOkF7vKHY=+q1dHXGdsyEXFPUa6dsGD_-M3+TX=DNouA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]);\n\tTue, 26 Sep 2017 14:31:39 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1775600,"web_url":"http://patchwork.ozlabs.org/comment/1775600/","msgid":"<1506437410.2643.17.camel@redhat.com>","list_archive_url":null,"date":"2017-09-26T14:50:10","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":67312,"url":"http://patchwork.ozlabs.org/api/people/67312/","name":"Paolo Abeni","email":"pabeni@redhat.com"},"content":"On Tue, 2017-09-26 at 17:17 +0300, Or Gerlitz wrote:\n> On Tue, Sep 26, 2017 at 3:51 PM, Jiri Benc <jbenc@redhat.com> wrote:\n> > On Tue, 26 Sep 2017 15:41:37 +0300, Or Gerlitz wrote:\n> > > Please note that the way the rule is being set to the HW driver is by delegation\n> > > done in flower, see these commits (specifically \"Add offload support\n> > > using egress Hardware device\")\n> > \n> > It's very well possible the bug is somewhere in net/sched.\n> \n> maybe before/instead you call it a bug, take a look on the design\n> there and maybe\n> tell us how to possibly do that otherwise?\n\nThe problem, AFAICT, is in the API between flower and NIC implementing\nthe offload, because in the above example the kernel will call the\noffload hook with exactly the same arguments with the 'bad' rule and\nthe 'good' one - but the 'bad' rule should never match any packets.\n\nI think that can be fixed changing the flower code to invoke the\noffload hook for filters with tunnel-based match only if the device\nspecified in such match has the appropriate type, e.g. given that\ncurrently only vxlan is supported with something like the code below\n(very rough and untested, just to give the idea):\n\nCheers,\n\nPaolo\n\n---\ndiff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c\nindex d230cb4c8094..ff8476e56d4e 100644\n--- a/net/sched/cls_flower.c\n+++ b/net/sched/cls_flower.c\n@@ -243,10 +243,11 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,\n                                struct fl_flow_key *mask,\n                                struct cls_fl_filter *f)\n {\n-       struct net_device *dev = tp->q->dev_queue->dev;\n+       struct net_device *ingress_dev, *dev = tp->q->dev_queue->dev;\n        struct tc_cls_flower_offload cls_flower = {};\n        int err;\n \n+       ingress_dev = dev;\n        if (!tc_can_offload(dev)) {\n                if (tcf_exts_get_dev(dev, &f->exts, &f->hw_dev) ||\n                    (f->hw_dev && !tc_can_offload(f->hw_dev))) {\n@@ -259,6 +260,12 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,\n                f->hw_dev = dev;\n        }\n \n+       if ((dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_ENC_KEYID) ||\n+            dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_ENC_PORTS) ||\n+             // ... list all the others tunnel based keys ...\n+             ) && strcmp(ingress_dev->rtnl_link_ops->kind, \"vxlan\"))\n+               return tc_skip_sw(f->flags) ? -EINVAL : 0;\n+","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=pabeni@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1kQM3Cr9z9t1G\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 00:50:19 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S969658AbdIZOuR (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 10:50:17 -0400","from mx1.redhat.com ([209.132.183.28]:50796 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S967571AbdIZOuQ (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tTue, 26 Sep 2017 10:50:16 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id D54D680484;\n\tTue, 26 Sep 2017 14:50:15 +0000 (UTC)","from localhost.localdomain (unknown [10.32.181.195])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 549E278396;\n\tTue, 26 Sep 2017 14:50:11 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com D54D680484","Message-ID":"<1506437410.2643.17.camel@redhat.com>","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","From":"Paolo Abeni <pabeni@redhat.com>","To":"Or Gerlitz <gerlitz.or@gmail.com>, Jiri Benc <jbenc@redhat.com>","Cc":"Simon Horman <simon.horman@netronome.com>,\n\tDavid Miller <davem@davemloft.net>,\n\tJakub Kicinski <jakub.kicinski@netronome.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>,\n\toss-drivers@netronome.com, John Hurley <john.hurley@netronome.com>,\n\tPaul Blakey <paulb@mellanox.com>,\n\tJiri Pirko <jiri@mellanox.com>, Roi Dayan <roid@mellanox.com>","Date":"Tue, 26 Sep 2017 16:50:10 +0200","In-Reply-To":"<CAJ3xEMjOkF7vKHY=+q1dHXGdsyEXFPUa6dsGD_-M3+TX=DNouA@mail.gmail.com>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>\n\t<20170925170451.GD18763@vergenet.net>\n\t<20170926121509.50a32571@griffin>\n\t<CAJ3xEMjEAhzC5=S7-dx8RiS=E7gYBBrtWY=9Cvqj-K3kyT9o3A@mail.gmail.com>\n\t<20170926145143.28bf52bd@griffin>\n\t<CAJ3xEMjOkF7vKHY=+q1dHXGdsyEXFPUa6dsGD_-M3+TX=DNouA@mail.gmail.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Mime-Version":"1.0","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]);\n\tTue, 26 Sep 2017 14:50:16 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1776025,"web_url":"http://patchwork.ozlabs.org/comment/1776025/","msgid":"<20170926.212903.454497939014837374.davem@davemloft.net>","list_archive_url":null,"date":"2017-09-27T04:29:03","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":15,"url":"http://patchwork.ozlabs.org/api/people/15/","name":"David Miller","email":"davem@davemloft.net"},"content":"From: Simon Horman <simon.horman@netronome.com>\nDate: Mon, 25 Sep 2017 12:23:34 +0200\n\n> From: Simon Horman <simon.horman@netronome.com>\n> \n> John says:\n> \n> This patch set allows offloading of TC flower match and set tunnel fields\n> to the NFP. The initial focus is on VXLAN traffic. Due to the current\n> state of the NFP firmware, only VXLAN traffic on well known port 4789 is\n> handled. The match and action fields must explicity set this value to be\n> supported. Tunnel end point information is also offloaded to the NFP for\n> both encapsulation and decapsulation. The NFP expects 3 separate data sets\n> to be supplied.\n ...\n\nSeries applied, thanks.\n\nI see there is some discussion about ipv6 flow dissector key handling\nand ND keepalives, but those should be addressable in follow-on changes.\n\nThanks.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y24b83sGjz9t2M\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 14:29:08 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S968408AbdI0E3F (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 27 Sep 2017 00:29:05 -0400","from shards.monkeyblade.net ([184.105.139.130]:48324 \"EHLO\n\tshards.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S965486AbdI0E3E (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 27 Sep 2017 00:29:04 -0400","from localhost (74-93-104-102-Washington.hfc.comcastbusiness.net\n\t[74.93.104.102])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\t(Authenticated sender: davem-davemloft)\n\tby shards.monkeyblade.net (Postfix) with ESMTPSA id 9D79F13401125;\n\tTue, 26 Sep 2017 21:29:03 -0700 (PDT)"],"Date":"Tue, 26 Sep 2017 21:29:03 -0700 (PDT)","Message-Id":"<20170926.212903.454497939014837374.davem@davemloft.net>","To":"simon.horman@netronome.com","Cc":"jakub.kicinski@netronome.com, netdev@vger.kernel.org,\n\toss-drivers@netronome.com","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","From":"David Miller <davem@davemloft.net>","In-Reply-To":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>","X-Mailer":"Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO)","Mime-Version":"1.0","Content-Type":"Text/Plain; charset=us-ascii","Content-Transfer-Encoding":"7bit","X-Greylist":"Sender succeeded SMTP AUTH, not delayed by\n\tmilter-greylist-4.5.12 (shards.monkeyblade.net\n\t[149.20.54.216]); Tue, 26 Sep 2017 21:29:03 -0700 (PDT)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1776086,"web_url":"http://patchwork.ozlabs.org/comment/1776086/","msgid":"<20170927072758.GB19034@vergenet.net>","list_archive_url":null,"date":"2017-09-27T07:27:59","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":64714,"url":"http://patchwork.ozlabs.org/api/people/64714/","name":"Simon Horman","email":"simon.horman@netronome.com"},"content":"On Tue, Sep 26, 2017 at 09:29:03PM -0700, David Miller wrote:\n> From: Simon Horman <simon.horman@netronome.com>\n> Date: Mon, 25 Sep 2017 12:23:34 +0200\n> \n> > From: Simon Horman <simon.horman@netronome.com>\n> > \n> > John says:\n> > \n> > This patch set allows offloading of TC flower match and set tunnel fields\n> > to the NFP. The initial focus is on VXLAN traffic. Due to the current\n> > state of the NFP firmware, only VXLAN traffic on well known port 4789 is\n> > handled. The match and action fields must explicity set this value to be\n> > supported. Tunnel end point information is also offloaded to the NFP for\n> > both encapsulation and decapsulation. The NFP expects 3 separate data sets\n> > to be supplied.\n>  ...\n> \n> Series applied, thanks.\n> \n> I see there is some discussion about ipv6 flow dissector key handling\n> and ND keepalives, but those should be addressable in follow-on changes.\n\nThanks Dave,\n\nI'll make sure that discussion is brought to a satisfactory conclusion.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=netronome-com.20150623.gappssmtp.com\n\theader.i=@netronome-com.20150623.gappssmtp.com\n\theader.b=\"LcblWDr/\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y28Yg1XJrz9t33\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 17:28:07 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752107AbdI0H2E (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 27 Sep 2017 03:28:04 -0400","from mail-wr0-f180.google.com ([209.85.128.180]:49478 \"EHLO\n\tmail-wr0-f180.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751471AbdI0H2C (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 27 Sep 2017 03:28:02 -0400","by mail-wr0-f180.google.com with SMTP id h16so700740wrf.6\n\tfor <netdev@vger.kernel.org>; Wed, 27 Sep 2017 00:28:02 -0700 (PDT)","from vergenet.net ([217.111.208.18])\n\tby smtp.gmail.com with ESMTPSA id\n\tj2sm5936490wrj.82.2017.09.27.00.28.00\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 27 Sep 2017 00:28:00 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=netronome-com.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=NG/KT4BVyuGAqAwQydxrWMZ/YmydtglGhg9AHDGiZaM=;\n\tb=LcblWDr/k061lbk/DMrAkCjAHleU7H63/qbUjLo0yC0PZAOxOzUtcWGdSTuIWI80HO\n\tJqz5uJin+cdDmb4LT6cSdod0jqwD/J6Pe0y7BXpni10Fx4YYZxZAIP3n8DGTaIV9WhCK\n\tNWmgkf6hiLvaiNVBJLFjLoYBnFlL/WPRATtVV64w6h/+vWcjkGbBWbOkwT2sJetgKBzI\n\tft5dHSfyyTus6k8SiBuSfQTci8L6ZVx/gdA/8OJ13zFf0gpt+S5F3+X8igE4yXw+uZLJ\n\tdWN8l89Z5AOYGWKsibX8vZEFRYpZkFo7qNWKKJ/l6wWWU+xnCpc3KTqQsVlZrjRDRknJ\n\t0pwQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=NG/KT4BVyuGAqAwQydxrWMZ/YmydtglGhg9AHDGiZaM=;\n\tb=NQgXIzkBJQGadBfy3zvspKI3+wVqI7dtAdgOkt7HkZWfxVPrLCF4uYh548M4aaINFU\n\tVy+OthfxXhVBC/soiJh1v5mfyjOnRGwarviGrPfyTuEQII035/MD+3IWOQRONIlHEtmo\n\t9w7FeBF2CepP3WA3Ed9La1axTJZiFcYe5AvdqI4JtH9wl7E+e9Ap73xhXfZCJKTGkPbY\n\toxYnb5jH6AXcYBsSnifhRZ+cfPSjH42Bc1+zy+3WkJuX5dYScStzvSTv+tzP2Blnn9h1\n\txF8v00e/jWqqvyJPJutQQy6MtzkGPsklBe//PO8dtsSmqaz5MYWfbeuwBJZlU2o/QZsH\n\tii1Q==","X-Gm-Message-State":"AHPjjUjAQErHthi47ZngkhjXlC3wolkqWGiVgljGgZW5s0Fn09dXtkTj\n\tIlXgBiZnaN8TCGxuUQsFeWHPqQ==","X-Google-Smtp-Source":"AOwi7QDdVdjEUxvuHJ+WtgLhNBhEBny49uNWXBL9e3y8RAa+Ox3oshydTD3IG88H+fBTlthO17RZHA==","X-Received":"by 10.223.135.212 with SMTP id c20mr459539wrc.204.1506497281422; \n\tWed, 27 Sep 2017 00:28:01 -0700 (PDT)","Date":"Wed, 27 Sep 2017 09:27:59 +0200","From":"Simon Horman <simon.horman@netronome.com>","To":"David Miller <davem@davemloft.net>","Cc":"jakub.kicinski@netronome.com, netdev@vger.kernel.org,\n\toss-drivers@netronome.com","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","Message-ID":"<20170927072758.GB19034@vergenet.net>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>\n\t<20170926.212903.454497939014837374.davem@davemloft.net>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170926.212903.454497939014837374.davem@davemloft.net>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1776095,"web_url":"http://patchwork.ozlabs.org/comment/1776095/","msgid":"<20170927074012.GA1944@nanopsycho.orion>","list_archive_url":null,"date":"2017-09-27T07:40:12","subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","submitter":{"id":15321,"url":"http://patchwork.ozlabs.org/api/people/15321/","name":"Jiri Pirko","email":"jiri@resnulli.us"},"content":"Tue, Sep 26, 2017 at 04:50:10PM CEST, pabeni@redhat.com wrote:\n>On Tue, 2017-09-26 at 17:17 +0300, Or Gerlitz wrote:\n>> On Tue, Sep 26, 2017 at 3:51 PM, Jiri Benc <jbenc@redhat.com> wrote:\n>> > On Tue, 26 Sep 2017 15:41:37 +0300, Or Gerlitz wrote:\n>> > > Please note that the way the rule is being set to the HW driver is by delegation\n>> > > done in flower, see these commits (specifically \"Add offload support\n>> > > using egress Hardware device\")\n>> > \n>> > It's very well possible the bug is somewhere in net/sched.\n>> \n>> maybe before/instead you call it a bug, take a look on the design\n>> there and maybe\n>> tell us how to possibly do that otherwise?\n>\n>The problem, AFAICT, is in the API between flower and NIC implementing\n>the offload, because in the above example the kernel will call the\n>offload hook with exactly the same arguments with the 'bad' rule and\n>the 'good' one - but the 'bad' rule should never match any packets.\n>\n>I think that can be fixed changing the flower code to invoke the\n>offload hook for filters with tunnel-based match only if the device\n>specified in such match has the appropriate type, e.g. given that\n>currently only vxlan is supported with something like the code below\n>(very rough and untested, just to give the idea):\n>\n>Cheers,\n>\n>Paolo\n>\n>---\n>diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c\n>index d230cb4c8094..ff8476e56d4e 100644\n>--- a/net/sched/cls_flower.c\n>+++ b/net/sched/cls_flower.c\n>@@ -243,10 +243,11 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,\n>                                struct fl_flow_key *mask,\n>                                struct cls_fl_filter *f)\n> {\n>-       struct net_device *dev = tp->q->dev_queue->dev;\n>+       struct net_device *ingress_dev, *dev = tp->q->dev_queue->dev;\n>        struct tc_cls_flower_offload cls_flower = {};\n>        int err;\n> \n>+       ingress_dev = dev;\n>        if (!tc_can_offload(dev)) {\n>                if (tcf_exts_get_dev(dev, &f->exts, &f->hw_dev) ||\n>                    (f->hw_dev && !tc_can_offload(f->hw_dev))) {\n>@@ -259,6 +260,12 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,\n>                f->hw_dev = dev;\n>        }\n> \n>+       if ((dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_ENC_KEYID) ||\n>+            dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_ENC_PORTS) ||\n>+             // ... list all the others tunnel based keys ...\n>+             ) && strcmp(ingress_dev->rtnl_link_ops->kind, \"vxlan\"))\n>+               return tc_skip_sw(f->flags) ? -EINVAL : 0;\n\nThis kind of hooks are giving me nightmares. The code is screwed up as\nit is already. I'm currently working on conversion to callbacks. This\npart is handled in:\nhttps://github.com/jpirko/linux_mlxsw/commits/jiri_devel_egdevcb","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=resnulli-us.20150623.gappssmtp.com\n\theader.i=@resnulli-us.20150623.gappssmtp.com\n\theader.b=\"fJUV7TPM\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y28ql0t5Gz9sRg\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 17:40:19 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752297AbdI0HkR (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 27 Sep 2017 03:40:17 -0400","from mail-wm0-f65.google.com ([74.125.82.65]:35173 \"EHLO\n\tmail-wm0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751730AbdI0HkO (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 27 Sep 2017 03:40:14 -0400","by mail-wm0-f65.google.com with SMTP id e64so10699952wmi.2\n\tfor <netdev@vger.kernel.org>; Wed, 27 Sep 2017 00:40:14 -0700 (PDT)","from localhost (jirka.pirko.cz. [84.16.102.26])\n\tby smtp.gmail.com with ESMTPSA id\n\tn9sm5677071wmd.12.2017.09.27.00.40.12\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 27 Sep 2017 00:40:12 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=resnulli-us.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=2gxzHpkIoebq3jqEQ43iEb8GxvWi+OBZLsbv+IDF/sQ=;\n\tb=fJUV7TPM/VhAATxUATjje1fjqFYzxLwNPURRUOWLL2c+Q/ODniVw9gCzvVmtUbS7Ra\n\tcXanY003Vg6PcJtNkn6+db0pI/ukUcn/17lFpUw69xkHy1zShE3Hd//o+Plo2AJmNJqx\n\tU1QVFgk1B6kjItJto3BZpmeQ0XAkJHfGMfE4ebjslXxNJoXORON/usjziID4NBJq2zPe\n\t39UqfwGE5ZldCMniap+kiej5tEaPc2TVSHJ5FjBGY2PYlRyuPsS9fXFmbCj6etmJ3rhg\n\tkkYFMmWyEVUy5vvKcIWYuJO7pe01Cio+U+9pSdw0oahrtwo9Gx4Qd/J9BoQr62ecXpMq\n\tru4w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=2gxzHpkIoebq3jqEQ43iEb8GxvWi+OBZLsbv+IDF/sQ=;\n\tb=OMA+JAAWWcCPDtnH5aGVU5E92mZaew26WnftJFbW1lTQfH2pqCrNWELhbWQSD2U5La\n\taNkUG1rxfopQBFJqBVO5oGX+q6zDp2NPb8dAZ0xfU6sad6gjdkKXuMZgmV1el/lmOQmU\n\tYcb7WnEw3iqMNsz7ukGjMt3I/yb9fwN9sPpVq7I4lwnTdmASqq8KcpmUhrJObbsgDpKD\n\t756URG2nyASdUr07VgVr4fdFl3TtZwX8ZYkPCUCtyBJjRFjsIeYb8nAVDhrIlcY9UqAy\n\tGKuv4J+i2F3Z9SJt0bldohinRZGUcgNlMdtB+Xqk2PK7oW3MKa/rU3KuHuX5kJZeDq9m\n\tG73Q==","X-Gm-Message-State":"AHPjjUh0/YVyVmgM4NeyY2QlON3MPp5d4hTlrZVRudEOaqc31/Lk6G4/\n\t0rkcPZZQe++PFkklq2Qvczj1Ug==","X-Google-Smtp-Source":"AOwi7QAK3gciL48bdF7Ki9MVGWgTzAelk7CH7RSHoonLqYxWcDjFyfU2I9d7YCKHbPiNAtOBM6/YrQ==","X-Received":"by 10.28.10.145 with SMTP id 139mr734725wmk.5.1506498013435;\n\tWed, 27 Sep 2017 00:40:13 -0700 (PDT)","Date":"Wed, 27 Sep 2017 09:40:12 +0200","From":"Jiri Pirko <jiri@resnulli.us>","To":"Paolo Abeni <pabeni@redhat.com>","Cc":"Or Gerlitz <gerlitz.or@gmail.com>, Jiri Benc <jbenc@redhat.com>,\n\tSimon Horman <simon.horman@netronome.com>,\n\tDavid Miller <davem@davemloft.net>,\n\tJakub Kicinski <jakub.kicinski@netronome.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>,\n\toss-drivers@netronome.com, John Hurley <john.hurley@netronome.com>,\n\tPaul Blakey <paulb@mellanox.com>,\n\tJiri Pirko <jiri@mellanox.com>, Roi Dayan <roid@mellanox.com>","Subject":"Re: [PATCH net-next 0/7] nfp: flower vxlan tunnel offload","Message-ID":"<20170927074012.GA1944@nanopsycho.orion>","References":"<1506335021-32024-1-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfRuD2Y-P2eTKmXpciiopA8js4zbO_nNOA6J62sn--mw@mail.gmail.com>\n\t<20170925170451.GD18763@vergenet.net>\n\t<20170926121509.50a32571@griffin>\n\t<CAJ3xEMjEAhzC5=S7-dx8RiS=E7gYBBrtWY=9Cvqj-K3kyT9o3A@mail.gmail.com>\n\t<20170926145143.28bf52bd@griffin>\n\t<CAJ3xEMjOkF7vKHY=+q1dHXGdsyEXFPUa6dsGD_-M3+TX=DNouA@mail.gmail.com>\n\t<1506437410.2643.17.camel@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1506437410.2643.17.camel@redhat.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]