[{"id":1767318,"web_url":"http://patchwork.ozlabs.org/comment/1767318/","msgid":"<CAJ3xEMgfkpJCfZX-7jaeYtoWTSQQZ6gu8_jSFgcXpzTBpdijQw@mail.gmail.com>","list_archive_url":null,"date":"2017-09-12T20:23:55","subject":"Re: [PATCH/RFC net-next 2/2] net/sched: allow flower to match\n\ttunnel options","submitter":{"id":64793,"url":"http://patchwork.ozlabs.org/api/people/64793/","name":"Or Gerlitz","email":"gerlitz.or@gmail.com"},"content":"On Tue, Sep 12, 2017 at 5:20 PM, Simon Horman\n<simon.horman@netronome.com> wrote:\n> Allow matching on options in tunnel headers.\n> This makes use of existing tunnel metadata support.\n\nSimon,\n\nThis patch is about matching on tunnel options, right? but\n\n> Options are a bytestring of up to 256 bytes.\n> Tunnel implementations may support less or more options,\n> or no options at all.\n>\n>  # ip link add name geneve0 type geneve dstport 0 external\n>  # tc qdisc add dev eth0 ingress\n>  # tc qdisc del dev eth0 ingress; tc qdisc add dev eth0 ingress\n>  # tc filter add dev eth0 protocol ip parent ffff: \\\n>      flower indev eth0 \\\n>         ip_proto udp \\\n>         action tunnel_key \\\n>             set src_ip 10.0.99.192 \\\n>             dst_ip 10.0.99.193 \\\n>             dst_port 4789 \\\n>             id 11 \\\n>             opts 0102800100800022 \\\n>     action mirred egress redirect dev geneve0\n\nthe example here is on how to use tunnel options in the tunnel set key actions..\n\nAnd the other way around in the other patch... the patch is about the\ntunnel key set action and the example shows how to match that in\nflower... I guess you want to swap the relevant of the change log.\n\nAnyway, is there any human readable/understandable representation of\nthese options? e.g what does 0102800100800022 means for geneve?","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=\"Lx5LxLQe\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsGTs4vtbz9s7f\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 13 Sep 2017 06:24:01 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751489AbdILUX7 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 12 Sep 2017 16:23:59 -0400","from mail-io0-f169.google.com ([209.85.223.169]:35409 \"EHLO\n\tmail-io0-f169.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750993AbdILUX4 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 12 Sep 2017 16:23:56 -0400","by mail-io0-f169.google.com with SMTP id g32so37185368ioj.2\n\tfor <netdev@vger.kernel.org>; Tue, 12 Sep 2017 13:23:56 -0700 (PDT)","by 10.202.220.87 with HTTP; Tue, 12 Sep 2017 13:23:55 -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=+JsPaAtNVR2/V1PsHdXOhME1XUiPiRtdL8dmEF2ost8=;\n\tb=Lx5LxLQewmDvo+EQpxZ6bhwosLC6KN5uBSwknXcxc3RlJ1RX5GlsWAsM/FuxEx2ThK\n\t6ggI5XvlagGFG/8gD7dSfuysI6R5JjFNBtUTool9UXbtV490r3c4H/rx4bbf4cAidQFT\n\tqg6mm+myDKRshWiXjS191cvcst9Z5lvJjYANt5AnieePxsd9TDZZi/qNdb3yn6hMk/1g\n\tMLdFG+0Ex44n6yhjioR10BowOUYdql4vwbTIDRZFzWiGFNb618RKnybjqJkN06ksJpYf\n\tqWm448pg5V8UmhBwqVTRrID0WH5D6TNXrSCj40Fsi24bRMmYLig5pNwBYgmYILyZl2nE\n\tGHjg==","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=+JsPaAtNVR2/V1PsHdXOhME1XUiPiRtdL8dmEF2ost8=;\n\tb=n0HpIxR0SVYnp0WfY6MkmV1qQHa3PdMNyv0oSZs16vxwV2EuVj+T7uUrF/HCmkonBr\n\txVdd31yBUINX4AH/6WzPsKbR5d5HEnd6S60+zAtrOppbFwCNpU55sTQliaKEq+lDy59C\n\tY7Q4L1kfLZ0ZfBkx+Xw216fSKVJFuceD7iM9KO/VSt666UmO2DL5EbbRmWigfuYAUacQ\n\tYCa2LLEJA9PbD9LVJ52gKir1jkqTJWtexWdyj++NWSEOz7OlDL7E4lKqwHD/hIA79hYx\n\tABrGVyVax0v8183jqTlDAzJv3mwgZOpV+BRrphTTEE00KCayqlv/JTj5x9n+r2Wohmyf\n\tewCw==","X-Gm-Message-State":"AHPjjUiUSx0e2ArWng7VIj03i1cnvsC6WQ8gXSbmTpScr3SR8UN82P6H\n\tt4i9OvmelAEa6G4zH2l6DHn8c99Vug==","X-Google-Smtp-Source":"AOwi7QCZlgfmeGAItpMNh06JAvxqfQnnA9iM4a2IfGmGAqcF2QcE07Xdl16avivH9SZt7jEpLNH06/rp5ir1I5+fbSg=","X-Received":"by 10.202.181.198 with SMTP id\n\te189mr8041498oif.300.1505247835960; \n\tTue, 12 Sep 2017 13:23:55 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<1505226037-2758-3-git-send-email-simon.horman@netronome.com>","References":"<1505226037-2758-1-git-send-email-simon.horman@netronome.com>\n\t<1505226037-2758-3-git-send-email-simon.horman@netronome.com>","From":"Or Gerlitz <gerlitz.or@gmail.com>","Date":"Tue, 12 Sep 2017 23:23:55 +0300","Message-ID":"<CAJ3xEMgfkpJCfZX-7jaeYtoWTSQQZ6gu8_jSFgcXpzTBpdijQw@mail.gmail.com>","Subject":"Re: [PATCH/RFC net-next 2/2] net/sched: allow flower to match\n\ttunnel options","To":"Simon Horman <simon.horman@netronome.com>","Cc":"Jiri Pirko <jiri@mellanox.com>, Jamal Hadi Salim <jhs@mojatatu.com>,\n\tCong Wang <xiyou.wangcong@gmail.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":1767709,"web_url":"http://patchwork.ozlabs.org/comment/1767709/","msgid":"<20170913092511.GA27555@vergenet.net>","list_archive_url":null,"date":"2017-09-13T09:25:12","subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","submitter":{"id":64714,"url":"http://patchwork.ozlabs.org/api/people/64714/","name":"Simon Horman","email":"simon.horman@netronome.com"},"content":"On Tue, Sep 12, 2017 at 11:23:55PM +0300, Or Gerlitz wrote:\n> On Tue, Sep 12, 2017 at 5:20 PM, Simon Horman\n> <simon.horman@netronome.com> wrote:\n> > Allow matching on options in tunnel headers.\n> > This makes use of existing tunnel metadata support.\n> \n> Simon,\n> \n> This patch is about matching on tunnel options, right? but\n> \n> > Options are a bytestring of up to 256 bytes.\n> > Tunnel implementations may support less or more options,\n> > or no options at all.\n> >\n> >  # ip link add name geneve0 type geneve dstport 0 external\n> >  # tc qdisc add dev eth0 ingress\n> >  # tc qdisc del dev eth0 ingress; tc qdisc add dev eth0 ingress\n> >  # tc filter add dev eth0 protocol ip parent ffff: \\\n> >      flower indev eth0 \\\n> >         ip_proto udp \\\n> >         action tunnel_key \\\n> >             set src_ip 10.0.99.192 \\\n> >             dst_ip 10.0.99.193 \\\n> >             dst_port 4789 \\\n> >             id 11 \\\n> >             opts 0102800100800022 \\\n> >     action mirred egress redirect dev geneve0\n> \n> the example here is on how to use tunnel options in the tunnel set key actions..\n> \n> And the other way around in the other patch... the patch is about the\n> tunnel key set action and the example shows how to match that in\n> flower... I guess you want to swap the relevant of the change log.\n\nYes, it seems so. Sorry about that.\n\n> Anyway, is there any human readable/understandable representation of\n> these options? e.g what does 0102800100800022 means for geneve?\n\nThanks, I had not thought of that. My feeling is that could\nbe added to the tc tool as follow-up work.","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=\"16kAceaF\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsbqL1fXwz9s7v\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 13 Sep 2017 19:25:18 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751953AbdIMJZQ (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 13 Sep 2017 05:25:16 -0400","from mail-wm0-f43.google.com ([74.125.82.43]:45071 \"EHLO\n\tmail-wm0-f43.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751380AbdIMJZO (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 13 Sep 2017 05:25:14 -0400","by mail-wm0-f43.google.com with SMTP id g206so1783138wme.0\n\tfor <netdev@vger.kernel.org>; Wed, 13 Sep 2017 02:25:14 -0700 (PDT)","from vergenet.net (reginn.horms.nl.\n\t[2001:470:7eb3:403:d63d:7eff:fe99:ac9d])\n\tby smtp.gmail.com with ESMTPSA id\n\tw20sm2877091edl.2.2017.09.13.02.25.12\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 13 Sep 2017 02:25:13 -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=D+aR8tDCrYOQYGxpYTUIiAT+iZQGOJiwSrDZaLza1Mc=;\n\tb=16kAceaFMxQtPPvFqjn2/C7MhV3uQePnuke/sxFM/SDXrmrq3HTPWMrfokoXNgx9Ip\n\tsFgWjJEMfMTYrTE/74WMHwuIGMBAAeJgzh0AWNjwzsmpM+mdBGFwGpGMjYGNjkvmH1Gr\n\tCq7JSwpq7WhqkzBaH6qvoBXe8l9k7tYS5TrKj4kz13wzVCDcvQBLuPbGCcHQw0z/Sl5f\n\tups+fh6SS0Whw0EzwxqYJ4CdUBYx4steNVcs0ZpDqAk0u2gK/u5qtlTKjK4QyT4gmX2P\n\tg5cvS126R+5Y18B7OtU/vLEARzN5znwKOPnFelSgpKsVAiiScxP9rmKxbBEhWIRZf8g4\n\tFDng==","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=D+aR8tDCrYOQYGxpYTUIiAT+iZQGOJiwSrDZaLza1Mc=;\n\tb=c5JQzAOlJv4gcqT9j5iN0gu+su4ngTa92dg0aR0nnKck8SSJlnl9kKHH4Bul9rtwUc\n\tNeN+ABOOXGh2kjQ9q9qlDMj9unbYQRn9zk7iKkTAJENvcGfylzPgFPXJWpf2hyfhmSTc\n\tQkKTRgQrZin17VnnDNiVlG81rp/hNcZMlFmquj+htxfi9NNhgbYSwQyN3whUmDdogNo7\n\tEw3s63SA8ioPSvgbKygRanrl2sSGmiVr8XkErkVloK7WQ09ap1vcEdwsQxFC9SzwRzvG\n\tnEX55PWwhphx6cthSPTZvpOQe8lGpUWmkDWdrvdZ4jdpJhSXQCYvl0cQEePFBj6MkoTg\n\tBIxA==","X-Gm-Message-State":"AHPjjUgu1caJOESnD5XV+FCTtShXVWDF7lvOjsnrysvn/q6SZ6wuNdFR\n\tAgdMAqgffubpuwCe","X-Google-Smtp-Source":"ADKCNb6ONP5YWc2N4Ni38owj91r9KluYdPuBFkvI3+ABzv95mahfKkMLjufMzBY/Kw6+XVzWpPT9Ew==","X-Received":"by 10.80.190.69 with SMTP id b5mr14775363edi.184.1505294713785; \n\tWed, 13 Sep 2017 02:25:13 -0700 (PDT)","Date":"Wed, 13 Sep 2017 11:25:12 +0200","From":"Simon Horman <simon.horman@netronome.com>","To":"Or Gerlitz <gerlitz.or@gmail.com>","Cc":"Jiri Pirko <jiri@mellanox.com>, Jamal Hadi Salim <jhs@mojatatu.com>,\n\tCong Wang <xiyou.wangcong@gmail.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>, oss-drivers@netronome.com","Subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","Message-ID":"<20170913092511.GA27555@vergenet.net>","References":"<1505226037-2758-1-git-send-email-simon.horman@netronome.com>\n\t<1505226037-2758-3-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfkpJCfZX-7jaeYtoWTSQQZ6gu8_jSFgcXpzTBpdijQw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<CAJ3xEMgfkpJCfZX-7jaeYtoWTSQQZ6gu8_jSFgcXpzTBpdijQw@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":1767750,"web_url":"http://patchwork.ozlabs.org/comment/1767750/","msgid":"<CAJ3xEMj1prPRij-Dib96oZMik_k0DzEuXcxi7TbVeSwt9WnDsQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-13T10:03:43","subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","submitter":{"id":64793,"url":"http://patchwork.ozlabs.org/api/people/64793/","name":"Or Gerlitz","email":"gerlitz.or@gmail.com"},"content":"On Wed, Sep 13, 2017 at 12:25 PM, Simon Horman\n<simon.horman@netronome.com> wrote:\n> On Tue, Sep 12, 2017 at 11:23:55PM +0300, Or Gerlitz wrote:\n>> On Tue, Sep 12, 2017 at 5:20 PM, Simon Horman\n>> <simon.horman@netronome.com> wrote:\n>> > Allow matching on options in tunnel headers.\n>> > This makes use of existing tunnel metadata support.\n>>\n>> Simon,\n>>\n>> This patch is about matching on tunnel options, right? but\n>>\n>> > Options are a bytestring of up to 256 bytes.\n>> > Tunnel implementations may support less or more options,\n>> > or no options at all.\n>> >\n>> >  # ip link add name geneve0 type geneve dstport 0 external\n>> >  # tc qdisc add dev eth0 ingress\n>> >  # tc qdisc del dev eth0 ingress; tc qdisc add dev eth0 ingress\n>> >  # tc filter add dev eth0 protocol ip parent ffff: \\\n>> >      flower indev eth0 \\\n>> >         ip_proto udp \\\n>> >         action tunnel_key \\\n>> >             set src_ip 10.0.99.192 \\\n>> >             dst_ip 10.0.99.193 \\\n>> >             dst_port 4789 \\\n>> >             id 11 \\\n>> >             opts 0102800100800022 \\\n>> >     action mirred egress redirect dev geneve0\n>>\n>> the example here is on how to use tunnel options in the tunnel set key actions..\n>>\n>> And the other way around in the other patch... the patch is about the\n>> tunnel key set action and the example shows how to match that in\n>> flower... I guess you want to swap the relevant of the change log.\n>\n> Yes, it seems so. Sorry about that.\n\nno worries, you can do the swap, but before that\n\n>> Anyway, is there any human readable/understandable representation of\n>> these options? e.g what does 0102800100800022 means for geneve?\n\n> Thanks, I had not thought of that. My feeling is that could\n> be added to the tc tool as follow-up work.\n\ncould you spend few words on the nature of these options now when we review\nthe kernel patches? I guess this is somehow related to protocols such\nas geneve and vxlan-gpe  -- it would be good if you elaborate on that\na bit, does\nthe kernel does any usage with these options beyond matching on them or stiching\nthem to packet headers?\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=\"MDGDiaWi\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xscgn1gDCz9s9Y\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 13 Sep 2017 20:03:49 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752009AbdIMKDq (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 13 Sep 2017 06:03:46 -0400","from mail-oi0-f65.google.com ([209.85.218.65]:33078 \"EHLO\n\tmail-oi0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751455AbdIMKDp (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 13 Sep 2017 06:03:45 -0400","by mail-oi0-f65.google.com with SMTP id z73so5701198oia.0\n\tfor <netdev@vger.kernel.org>; Wed, 13 Sep 2017 03:03:44 -0700 (PDT)","by 10.202.87.7 with HTTP; Wed, 13 Sep 2017 03:03:43 -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=aKj9JLgVRvS5rOPxIOYfe5NxyiEo+jFndoK9ezz7eQs=;\n\tb=MDGDiaWi4EwmRxWh4l3464LL+0xhEqeSTHOe5isEDdlVT7eKzeg1HNdnFR5RZvjKg6\n\t9w4CW+xmtbR3oWM/QIjSeqReAF88DBdCeDFpZ1y0Ueg5MhuYD04ihuriArq/sPeT/eV+\n\tGQcevD7qh9YnyIpUR+Bisa17/BqcxIwnECBiHqJ/lp4nTDeKmuTSzaHp5IS7qy3wbPRC\n\tkIuBTeVRr/hZ+MZTsyMCncbCM54J5zUho8XHNJzCoZ2YPF6LfoeA4qpsu0BUFx7WBubs\n\tqCdYeoCbuQmT7js9kBoEKXDtw4imj01bs3yHCRRQB4SnZtDHhUV8k0hDu/k0matXC1uu\n\tyqPg==","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=aKj9JLgVRvS5rOPxIOYfe5NxyiEo+jFndoK9ezz7eQs=;\n\tb=m73JnlgN6B9cgGWrOCQe3W2T6Gr2qub6JHK2PL1QjgAWRT6AlEZnPD6iTnIN5xxZ5F\n\tc6bJ3um9zu7quLo6C0ZdjC+/y8Rxgf9wWEHgc/koM7S8kRwJgGxeNy0Eka7qg21oPo4j\n\t6eGDsY4fRHKVMdYfrird2QXkZAzRrPExNDK1RmKHZSW19zuIH1NsyfHIUKT0AcWvKun/\n\t0zq+aAIK4glPf+/fuLguidI75LqEhb8ytooLokQo9nzREzy4rSIIeDv71J8R+msvrYw9\n\t5377XDHsf3yWjXO8iRr3OBjQ3FPMrAjAk9t2WO3gdZYWxshBQEsYWuzuU7XzZJONFtbQ\n\tYxEQ==","X-Gm-Message-State":"AHPjjUhmv3sycAmOWFaN6znnpJNtl/Hc3mz1qCPMdyFbdbZFuXUHYU54\n\tkCkFQyM9jfSGMZaMokRSuv7leiV8zvuKm6q5fx4=","X-Google-Smtp-Source":"AOwi7QDz2Hk/EWzcssrkk2x/kE9Gxv+brE4T76OIyuo14Mb4KvEiGTmQ/iyBKsNVDscgOVQ29OefqC81R73i94ZL4sE=","X-Received":"by 10.202.79.68 with SMTP id d65mr20081034oib.246.1505297024475; \n\tWed, 13 Sep 2017 03:03:44 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170913092511.GA27555@vergenet.net>","References":"<1505226037-2758-1-git-send-email-simon.horman@netronome.com>\n\t<1505226037-2758-3-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfkpJCfZX-7jaeYtoWTSQQZ6gu8_jSFgcXpzTBpdijQw@mail.gmail.com>\n\t<20170913092511.GA27555@vergenet.net>","From":"Or Gerlitz <gerlitz.or@gmail.com>","Date":"Wed, 13 Sep 2017 13:03:43 +0300","Message-ID":"<CAJ3xEMj1prPRij-Dib96oZMik_k0DzEuXcxi7TbVeSwt9WnDsQ@mail.gmail.com>","Subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","To":"Simon Horman <simon.horman@netronome.com>","Cc":"Jiri Pirko <jiri@mellanox.com>, Jamal Hadi Salim <jhs@mojatatu.com>,\n\tCong Wang <xiyou.wangcong@gmail.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":1767816,"web_url":"http://patchwork.ozlabs.org/comment/1767816/","msgid":"<20170913115931.GG27555@vergenet.net>","list_archive_url":null,"date":"2017-09-13T11:59:32","subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","submitter":{"id":64714,"url":"http://patchwork.ozlabs.org/api/people/64714/","name":"Simon Horman","email":"simon.horman@netronome.com"},"content":"On Wed, Sep 13, 2017 at 01:03:43PM +0300, Or Gerlitz wrote:\n> On Wed, Sep 13, 2017 at 12:25 PM, Simon Horman\n> <simon.horman@netronome.com> wrote:\n> > On Tue, Sep 12, 2017 at 11:23:55PM +0300, Or Gerlitz wrote:\n> >> On Tue, Sep 12, 2017 at 5:20 PM, Simon Horman\n> >> <simon.horman@netronome.com> wrote:\n> >> > Allow matching on options in tunnel headers.\n> >> > This makes use of existing tunnel metadata support.\n> >>\n> >> Simon,\n> >>\n> >> This patch is about matching on tunnel options, right? but\n> >>\n> >> > Options are a bytestring of up to 256 bytes.\n> >> > Tunnel implementations may support less or more options,\n> >> > or no options at all.\n> >> >\n> >> >  # ip link add name geneve0 type geneve dstport 0 external\n> >> >  # tc qdisc add dev eth0 ingress\n> >> >  # tc qdisc del dev eth0 ingress; tc qdisc add dev eth0 ingress\n> >> >  # tc filter add dev eth0 protocol ip parent ffff: \\\n> >> >      flower indev eth0 \\\n> >> >         ip_proto udp \\\n> >> >         action tunnel_key \\\n> >> >             set src_ip 10.0.99.192 \\\n> >> >             dst_ip 10.0.99.193 \\\n> >> >             dst_port 4789 \\\n> >> >             id 11 \\\n> >> >             opts 0102800100800022 \\\n> >> >     action mirred egress redirect dev geneve0\n> >>\n> >> the example here is on how to use tunnel options in the tunnel set key actions..\n> >>\n> >> And the other way around in the other patch... the patch is about the\n> >> tunnel key set action and the example shows how to match that in\n> >> flower... I guess you want to swap the relevant of the change log.\n> >\n> > Yes, it seems so. Sorry about that.\n> \n> no worries, you can do the swap, but before that\n> \n> >> Anyway, is there any human readable/understandable representation of\n> >> these options? e.g what does 0102800100800022 means for geneve?\n> \n> > Thanks, I had not thought of that. My feeling is that could\n> > be added to the tc tool as follow-up work.\n> \n> could you spend few words on the nature of these options now when we review\n> the kernel patches? I guess this is somehow related to protocols such\n> as geneve and vxlan-gpe  -- it would be good if you elaborate on that\n> a bit, does\n> the kernel does any usage with these options beyond matching on them or stiching\n> them to packet headers?\n\nThis feature is to be used in conjunction with tunnels in collect metadata\n(external) mode. As I understand it there are three tunnel netdevs that use\noptions metadata in the kernel at this time.\n\n* Geneve\n\n  In the case of Geneve options are TLVs[1]. My reading is that in collect\n  metadata mode the kernel does not appear to do anything other than pass\n  them around as a bytestring.\n\n  [1] https://tools.ietf.org/html/draft-ietf-nvo3-geneve-05#section-3.5\n\n* VXLAN-GBP\n\n  In the case of VXLAN-GBP on RX in collect metadata mode options are used\n  to carry information parsed in vxlan_parse_gbp_hdr() from the VXLAN Group\n  Based Policy Extension[2]. On RX the options data is used to create an\n  extension (header) by vxlan_build_gbp_hdr().\n\n  [2] https://tools.ietf.org/html/draft-smith-vxlan-group-policy-03#section-2.1\n\n* ERSPAN (GRE)\n\n  In the case of ERSPAN, which is a variant of GRE, on RX in collect\n  metadata mode options are used to carry the index parsed from the ERSPAN\n  Type II feature header[3] in erspan_rcv().  The converse is true on TX\n  and is handled by erspan_fb_xmit().\n\n  [3] https://tools.ietf.org/html/draft-foschiano-erspan-03#section-4.2\n\nUsers of options:\n\n* There are eBPF hooks to allow getting on and setting tunnel metadata:\n  bpf_skb_set_tunnel_opt, bpf_skb_get_tunnel_opt.\n\n* Open vSwitch is able to match and set Geneve and VXLAN-GBP options.\n\nNeither of the above appear to assume any structure for the data.\n\nI hope the above is the kind of information you are after.","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=\"lHVps5wC\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsgFT6L1lz9s9Y\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 13 Sep 2017 21:59:41 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751366AbdIML7j (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 13 Sep 2017 07:59:39 -0400","from mail-wm0-f44.google.com ([74.125.82.44]:45087 \"EHLO\n\tmail-wm0-f44.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750949AbdIML7h (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 13 Sep 2017 07:59:37 -0400","by mail-wm0-f44.google.com with SMTP id g206so4857168wme.0\n\tfor <netdev@vger.kernel.org>; Wed, 13 Sep 2017 04:59:36 -0700 (PDT)","from vergenet.net (reginn.horms.nl.\n\t[2001:470:7eb3:403:d63d:7eff:fe99:ac9d])\n\tby smtp.gmail.com with ESMTPSA id\n\tw2sm6004855edh.9.2017.09.13.04.59.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 13 Sep 2017 04:59:33 -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=f2hatvpVZ/4YpZ8mJWCuCz8hD+JNqKG4cSqnjfFJ/wA=;\n\tb=lHVps5wC0yW3Xhfx1irEDysvEZYSE23ObNCoGJ0TD1RlQnd0SdJbnyyrgoYByLeniD\n\tFqoUVAS4cSmhvpd69A+8ZrdGJ77PRyZ9a0h14AOhled8KGRM3OAKiZBvXXhm7SJYMLad\n\tjHk5uxpPXqVTLvQVP5+mPJt9yhqIAZ1ruLNPqfz98Wde+Y1owNe3uZ1rZuBSFODumX3c\n\tDJ1UPih8Qgq3k9roWMzq4K6WO9dvMRgYRGXdkC6CYsL4cjHLsOLhZUD/ApQiZtTPTZ9j\n\tEaZJPUedlEFLuwJNbUAlystNfVEw9caOv8MqSwpn7H5ZhZqb2T8FGUirkJ7WfseoMopK\n\tW59w==","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=f2hatvpVZ/4YpZ8mJWCuCz8hD+JNqKG4cSqnjfFJ/wA=;\n\tb=tUXpXEB3wUY446CA/JnJMasW+jjBPkTJOJnMMvjZC6RMn6ocBPg7icV9cHvEQbcdIw\n\tQ6cO+evDR8W9GTxzooWa9M0v8IAw0e6waFUeL6YsLcdlbzCeWv1TLX2YxumnS/I6t+p1\n\tWp0BqpRC+2/UFKIl0vhvIPHODiZiQpCoJ6dGnx1s4dVG6zCnmMgQY07yWKsbFMqNqiar\n\tbA7Rw/OH+2ON3b5Gg4LmpfHQpyWoqq2xkUrT0A3n+ed7XGI6j2avHbV+F0w8Oo9c8swZ\n\t2sc7EPUNXprD2xaIinD5O8RaS7geoLzqikekKXx751OoosfuwqPr2PXDU+MDbCvxYQjz\n\tbDNQ==","X-Gm-Message-State":"AHPjjUg0n68uWUO5fiQU8HojJu4EICWQ87YO1XVpP1/o4atKeKSjuGKo\n\tkg40VZ4nLGcK5Ifw","X-Google-Smtp-Source":"ADKCNb5oB+wdKmjYd2zNfqTjrMkhSl8ljBex60D9+ZIw/jDquHG6FNpWj/HWjxgxn9F1yCclXgewKA==","X-Received":"by 10.80.167.131 with SMTP id i3mr15731505edc.173.1505303974528; \n\tWed, 13 Sep 2017 04:59:34 -0700 (PDT)","Date":"Wed, 13 Sep 2017 13:59:32 +0200","From":"Simon Horman <simon.horman@netronome.com>","To":"Or Gerlitz <gerlitz.or@gmail.com>","Cc":"Jiri Pirko <jiri@mellanox.com>, Jamal Hadi Salim <jhs@mojatatu.com>,\n\tCong Wang <xiyou.wangcong@gmail.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>, oss-drivers@netronome.com","Subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","Message-ID":"<20170913115931.GG27555@vergenet.net>","References":"<1505226037-2758-1-git-send-email-simon.horman@netronome.com>\n\t<1505226037-2758-3-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfkpJCfZX-7jaeYtoWTSQQZ6gu8_jSFgcXpzTBpdijQw@mail.gmail.com>\n\t<20170913092511.GA27555@vergenet.net>\n\t<CAJ3xEMj1prPRij-Dib96oZMik_k0DzEuXcxi7TbVeSwt9WnDsQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<CAJ3xEMj1prPRij-Dib96oZMik_k0DzEuXcxi7TbVeSwt9WnDsQ@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":1767853,"web_url":"http://patchwork.ozlabs.org/comment/1767853/","msgid":"<CAJ3xEMj9HYj+2-ruxLk=PVt=Gxu3FwpyrJPRUgCqdsNamZ=Txw@mail.gmail.com>","list_archive_url":null,"date":"2017-09-13T12:38:01","subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","submitter":{"id":64793,"url":"http://patchwork.ozlabs.org/api/people/64793/","name":"Or Gerlitz","email":"gerlitz.or@gmail.com"},"content":"On Wed, Sep 13, 2017 at 2:59 PM, Simon Horman\n<simon.horman@netronome.com> wrote:\n> On Wed, Sep 13, 2017 at 01:03:43PM +0300, Or Gerlitz wrote:\n>> On Wed, Sep 13, 2017 at 12:25 PM, Simon Horman\n>> <simon.horman@netronome.com> wrote:\n>> > On Tue, Sep 12, 2017 at 11:23:55PM +0300, Or Gerlitz wrote:\n>> >> On Tue, Sep 12, 2017 at 5:20 PM, Simon Horman\n>> >> <simon.horman@netronome.com> wrote:\n>> >> > Allow matching on options in tunnel headers.\n>> >> > This makes use of existing tunnel metadata support.\n>> >>\n>> >> Simon,\n>> >>\n>> >> This patch is about matching on tunnel options, right? but\n>> >>\n>> >> > Options are a bytestring of up to 256 bytes.\n>> >> > Tunnel implementations may support less or more options,\n>> >> > or no options at all.\n>> >> >\n>> >> >  # ip link add name geneve0 type geneve dstport 0 external\n>> >> >  # tc qdisc add dev eth0 ingress\n>> >> >  # tc qdisc del dev eth0 ingress; tc qdisc add dev eth0 ingress\n>> >> >  # tc filter add dev eth0 protocol ip parent ffff: \\\n>> >> >      flower indev eth0 \\\n>> >> >         ip_proto udp \\\n>> >> >         action tunnel_key \\\n>> >> >             set src_ip 10.0.99.192 \\\n>> >> >             dst_ip 10.0.99.193 \\\n>> >> >             dst_port 4789 \\\n>> >> >             id 11 \\\n>> >> >             opts 0102800100800022 \\\n>> >> >     action mirred egress redirect dev geneve0\n>> >>\n>> >> the example here is on how to use tunnel options in the tunnel set key actions..\n>> >>\n>> >> And the other way around in the other patch... the patch is about the\n>> >> tunnel key set action and the example shows how to match that in\n>> >> flower... I guess you want to swap the relevant of the change log.\n>> >\n>> > Yes, it seems so. Sorry about that.\n>>\n>> no worries, you can do the swap, but before that\n>>\n>> >> Anyway, is there any human readable/understandable representation of\n>> >> these options? e.g what does 0102800100800022 means for geneve?\n>>\n>> > Thanks, I had not thought of that. My feeling is that could\n>> > be added to the tc tool as follow-up work.\n>>\n>> could you spend few words on the nature of these options now when we review\n>> the kernel patches? I guess this is somehow related to protocols such\n>> as geneve and vxlan-gpe  -- it would be good if you elaborate on that\n>> a bit, does\n>> the kernel does any usage with these options beyond matching on them or stiching\n>> them to packet headers?\n>\n> This feature is to be used in conjunction with tunnels in collect metadata\n> (external) mode. As I understand it there are three tunnel netdevs that use\n> options metadata in the kernel at this time.\n>\n> * Geneve\n>\n>   In the case of Geneve options are TLVs[1]. My reading is that in collect\n>   metadata mode the kernel does not appear to do anything other than pass\n>   them around as a bytestring.\n>\n>   [1] https://tools.ietf.org/html/draft-ietf-nvo3-geneve-05#section-3.5\n>\n> * VXLAN-GBP\n>\n>   In the case of VXLAN-GBP on RX in collect metadata mode options are used\n>   to carry information parsed in vxlan_parse_gbp_hdr() from the VXLAN Group\n>   Based Policy Extension[2]. On RX the options data is used to create an\n>   extension (header) by vxlan_build_gbp_hdr().\n>\n>   [2] https://tools.ietf.org/html/draft-smith-vxlan-group-policy-03#section-2.1\n>\n> * ERSPAN (GRE)\n>\n>   In the case of ERSPAN, which is a variant of GRE, on RX in collect\n>   metadata mode options are used to carry the index parsed from the ERSPAN\n>   Type II feature header[3] in erspan_rcv().  The converse is true on TX\n>   and is handled by erspan_fb_xmit().\n>\n>   [3] https://tools.ietf.org/html/draft-foschiano-erspan-03#section-4.2\n>\n> Users of options:\n>\n> * There are eBPF hooks to allow getting on and setting tunnel metadata:\n>   bpf_skb_set_tunnel_opt, bpf_skb_get_tunnel_opt.\n>\n> * Open vSwitch is able to match and set Geneve and VXLAN-GBP options.\n>\n> Neither of the above appear to assume any structure for the data.\n>\n> I hope the above is the kind of information you are after.\n\nyeah, this helps, do we expect HW offloads to be able to work with\nthese options? e.g place/match on packets\nor even do something beyond that?","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=\"NvjnleA4\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsh5p5RsWz9sNr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 13 Sep 2017 22:38:06 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751455AbdIMMiE (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 13 Sep 2017 08:38:04 -0400","from mail-oi0-f52.google.com ([209.85.218.52]:45389 \"EHLO\n\tmail-oi0-f52.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751120AbdIMMiC (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 13 Sep 2017 08:38:02 -0400","by mail-oi0-f52.google.com with SMTP id z73so519051oia.2\n\tfor <netdev@vger.kernel.org>; Wed, 13 Sep 2017 05:38:02 -0700 (PDT)","by 10.202.87.7 with HTTP; Wed, 13 Sep 2017 05:38:01 -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=VrmBoyZiURrMbr2zBH8rrZOiRnfBaCESwDppBnqmbxo=;\n\tb=NvjnleA451DS8wlYqz3HVs/cTVM16mozFi6CDmZ4fdZA0bGL42SkNeV4a9/nTA2gLQ\n\toauSgHjnVEIDsv3Wbva4O4/Npqhzrn3IXJMXlAOZ6JKe8RRY/OoPxqjOueCuEnSRN9GY\n\thiDJPIggw9BJ0oWP+4sqPec0lffRJL0YL5DlHudOqXUuX9ELSoM+rJliwsPwEUmpC2/K\n\tgO/5Wtqisblg+l3x0d9A7P23nOThpZM8vmiHVB8NBME1dJUCSUxLOBHtdWIROQ9vcowe\n\tlwVsMg3yrcoSwuppobt1r2h+Dfgrd/Lul2TSOFG9rV6YuVTzpSbmfneDcwNVcCBoV167\n\trCow==","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=VrmBoyZiURrMbr2zBH8rrZOiRnfBaCESwDppBnqmbxo=;\n\tb=hHy7xn86e3VrhSxoQFlm/oiUfMNMMlyup8LAq0OxR+Uy3QDQfSXA1ABcbqCOS0R9p2\n\tmXqcVSStZnLWeJl0DBZNZ0DoP+YE6vDXzidT1/EuH6rwuTeuod3OotlEQVeBOF81oRau\n\taIoPDj8ckT8YBiWFHnSF6WSSx9WqEqED9xdl39sGNY2uKxvDAS74utgKTry0thi5mPoJ\n\tQ03nA1zwFy9tEOXWKQsAF/k7b0qsMjk6ahEYgMYWt5CF9qP9SyFdS3Xd5NUS6EsftZ0B\n\tSqkxKOQJKPj94EpYWV9ey0jhVs+uW7f8qvts+SwvrJ5B5fJfXyaXZ0T6f5nb78jZ8N69\n\tk34A==","X-Gm-Message-State":"AHPjjUhl/wNGHlqyl9xO+zJrvR0Bx4FzNO43jHgDsg9t5IEkUolKNf7A\n\taRjxanffnlYSCDV+nfEpsriQ5qSB/touSSbVZgQ=","X-Google-Smtp-Source":"AOwi7QB2Ir570jxA8oOIIp8BCs4VlwitxKK7EwdJHmJjzFwaCnHeaSy6nuntdVIg4FJPZrgzEkPgTu/Gw8r4x/f3G7Q=","X-Received":"by 10.202.170.204 with SMTP id\n\tt195mr5369422oie.277.1505306281903; \n\tWed, 13 Sep 2017 05:38:01 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170913115931.GG27555@vergenet.net>","References":"<1505226037-2758-1-git-send-email-simon.horman@netronome.com>\n\t<1505226037-2758-3-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfkpJCfZX-7jaeYtoWTSQQZ6gu8_jSFgcXpzTBpdijQw@mail.gmail.com>\n\t<20170913092511.GA27555@vergenet.net>\n\t<CAJ3xEMj1prPRij-Dib96oZMik_k0DzEuXcxi7TbVeSwt9WnDsQ@mail.gmail.com>\n\t<20170913115931.GG27555@vergenet.net>","From":"Or Gerlitz <gerlitz.or@gmail.com>","Date":"Wed, 13 Sep 2017 15:38:01 +0300","Message-ID":"<CAJ3xEMj9HYj+2-ruxLk=PVt=Gxu3FwpyrJPRUgCqdsNamZ=Txw@mail.gmail.com>","Subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","To":"Simon Horman <simon.horman@netronome.com>","Cc":"Jiri Pirko <jiri@mellanox.com>, Jamal Hadi Salim <jhs@mojatatu.com>,\n\tCong Wang <xiyou.wangcong@gmail.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":1767882,"web_url":"http://patchwork.ozlabs.org/comment/1767882/","msgid":"<20170913132927.GH27555@vergenet.net>","list_archive_url":null,"date":"2017-09-13T13:29:28","subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","submitter":{"id":64714,"url":"http://patchwork.ozlabs.org/api/people/64714/","name":"Simon Horman","email":"simon.horman@netronome.com"},"content":"On Wed, Sep 13, 2017 at 03:38:01PM +0300, Or Gerlitz wrote:\n> On Wed, Sep 13, 2017 at 2:59 PM, Simon Horman\n> <simon.horman@netronome.com> wrote:\n> > On Wed, Sep 13, 2017 at 01:03:43PM +0300, Or Gerlitz wrote:\n> >> On Wed, Sep 13, 2017 at 12:25 PM, Simon Horman\n> >> <simon.horman@netronome.com> wrote:\n> >> > On Tue, Sep 12, 2017 at 11:23:55PM +0300, Or Gerlitz wrote:\n> >> >> On Tue, Sep 12, 2017 at 5:20 PM, Simon Horman\n> >> >> <simon.horman@netronome.com> wrote:\n> >> >> > Allow matching on options in tunnel headers.\n> >> >> > This makes use of existing tunnel metadata support.\n> >> >>\n> >> >> Simon,\n> >> >>\n> >> >> This patch is about matching on tunnel options, right? but\n> >> >>\n> >> >> > Options are a bytestring of up to 256 bytes.\n> >> >> > Tunnel implementations may support less or more options,\n> >> >> > or no options at all.\n> >> >> >\n> >> >> >  # ip link add name geneve0 type geneve dstport 0 external\n> >> >> >  # tc qdisc add dev eth0 ingress\n> >> >> >  # tc qdisc del dev eth0 ingress; tc qdisc add dev eth0 ingress\n> >> >> >  # tc filter add dev eth0 protocol ip parent ffff: \\\n> >> >> >      flower indev eth0 \\\n> >> >> >         ip_proto udp \\\n> >> >> >         action tunnel_key \\\n> >> >> >             set src_ip 10.0.99.192 \\\n> >> >> >             dst_ip 10.0.99.193 \\\n> >> >> >             dst_port 4789 \\\n> >> >> >             id 11 \\\n> >> >> >             opts 0102800100800022 \\\n> >> >> >     action mirred egress redirect dev geneve0\n> >> >>\n> >> >> the example here is on how to use tunnel options in the tunnel set key actions..\n> >> >>\n> >> >> And the other way around in the other patch... the patch is about the\n> >> >> tunnel key set action and the example shows how to match that in\n> >> >> flower... I guess you want to swap the relevant of the change log.\n> >> >\n> >> > Yes, it seems so. Sorry about that.\n> >>\n> >> no worries, you can do the swap, but before that\n> >>\n> >> >> Anyway, is there any human readable/understandable representation of\n> >> >> these options? e.g what does 0102800100800022 means for geneve?\n> >>\n> >> > Thanks, I had not thought of that. My feeling is that could\n> >> > be added to the tc tool as follow-up work.\n> >>\n> >> could you spend few words on the nature of these options now when we review\n> >> the kernel patches? I guess this is somehow related to protocols such\n> >> as geneve and vxlan-gpe  -- it would be good if you elaborate on that\n> >> a bit, does\n> >> the kernel does any usage with these options beyond matching on them or stiching\n> >> them to packet headers?\n> >\n> > This feature is to be used in conjunction with tunnels in collect metadata\n> > (external) mode. As I understand it there are three tunnel netdevs that use\n> > options metadata in the kernel at this time.\n> >\n> > * Geneve\n> >\n> >   In the case of Geneve options are TLVs[1]. My reading is that in collect\n> >   metadata mode the kernel does not appear to do anything other than pass\n> >   them around as a bytestring.\n> >\n> >   [1] https://tools.ietf.org/html/draft-ietf-nvo3-geneve-05#section-3.5\n> >\n> > * VXLAN-GBP\n> >\n> >   In the case of VXLAN-GBP on RX in collect metadata mode options are used\n> >   to carry information parsed in vxlan_parse_gbp_hdr() from the VXLAN Group\n> >   Based Policy Extension[2]. On RX the options data is used to create an\n> >   extension (header) by vxlan_build_gbp_hdr().\n> >\n> >   [2] https://tools.ietf.org/html/draft-smith-vxlan-group-policy-03#section-2.1\n> >\n> > * ERSPAN (GRE)\n> >\n> >   In the case of ERSPAN, which is a variant of GRE, on RX in collect\n> >   metadata mode options are used to carry the index parsed from the ERSPAN\n> >   Type II feature header[3] in erspan_rcv().  The converse is true on TX\n> >   and is handled by erspan_fb_xmit().\n> >\n> >   [3] https://tools.ietf.org/html/draft-foschiano-erspan-03#section-4.2\n> >\n> > Users of options:\n> >\n> > * There are eBPF hooks to allow getting on and setting tunnel metadata:\n> >   bpf_skb_set_tunnel_opt, bpf_skb_get_tunnel_opt.\n> >\n> > * Open vSwitch is able to match and set Geneve and VXLAN-GBP options.\n> >\n> > Neither of the above appear to assume any structure for the data.\n> >\n> > I hope the above is the kind of information you are after.\n> \n> yeah, this helps, do we expect HW offloads to be able to work with\n> these options? e.g place/match on packets\n> or even do something beyond that?\n\nPerhaps unsurprisingly given my posting I would like to offload\n\"place/match\" of options. I do not currently have any plans beyond that\nand my crystal ball broke some time ago.","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=\"Plw3/YxT\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsjFH1lg7z9sNV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 13 Sep 2017 23:29:39 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752042AbdIMN3g (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 13 Sep 2017 09:29:36 -0400","from mail-wm0-f54.google.com ([74.125.82.54]:47041 \"EHLO\n\tmail-wm0-f54.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751019AbdIMN3c (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 13 Sep 2017 09:29:32 -0400","by mail-wm0-f54.google.com with SMTP id i189so6853578wmf.1\n\tfor <netdev@vger.kernel.org>; Wed, 13 Sep 2017 06:29:31 -0700 (PDT)","from vergenet.net (reginn.horms.nl.\n\t[2001:470:7eb3:403:d63d:7eff:fe99:ac9d])\n\tby smtp.gmail.com with ESMTPSA id\n\td6sm6559023edl.3.2017.09.13.06.29.29\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 13 Sep 2017 06:29:30 -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=GjYePfGxJsYwZRfgENcwrJ9EcCtyfjUspnzkeTXDybA=;\n\tb=Plw3/YxTUbemgEgEvIUB4vxC6euLySUf9pSdHZ6TUE0XlV10oJ6Q2+DL4jJTKi0M4U\n\tjc003IxOBl0nGIxAW0Zi/MxF9RU3VEAqVsoc6HTxU6f/c/i6yFnbNz9DMGOo6/nvbSLj\n\txYEA6jYTezyIrQRym9xhTMwyw+ptxsbWxEIYlJUo9pwn643y5NsH0iT9ZgC99QFasfQu\n\tGXb2i/O3/5ODtst6vRDeswPpVf/ovJ+h6SloDFPVlPQ2g7aeVlve4tTZcz2hRy68pLhP\n\ti1QJzWMRM6dbI6C2u+6B2czBYH5yXHL/xS2QAQAvyMiWQUW8JBuZte7jAcMjcPktEUIS\n\thOdA==","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=GjYePfGxJsYwZRfgENcwrJ9EcCtyfjUspnzkeTXDybA=;\n\tb=qCb5nX1adISuSneJ9g/fbE83xEx3V4THY2IZWizTbj5n6PakC9UqNNydM5K+sg+BZR\n\tWtCejVCUiunFx7YZ1z0o+jDxhxotzm69qBrzXIrznWWxOr8IkNdghzMrmhUFOpFCaV3F\n\tMAqLMxlCY37a6G8n642B1duJpXqpgBEtmGB7MFpW+ANKFs2LBbUoP4QhrribOR+y7mFt\n\t5Gsp/oqZEo91YCegxHusnQS9qGvNVSafSGbgFUJ8xrikyZLzGIWgfbQUOTSJP3SeDKDf\n\tGfSBEiyRVCIhG1MxAwjLf1B0lSZP8E8CKdkde6ODPW1g1J2M6OD9JDCvSjLI23B2DxGW\n\tKf3g==","X-Gm-Message-State":"AHPjjUiYu0tU8gSDL6If/ZdUJUKTuEU9HG76G0sTxhV6BjdxLgTfHvM0\n\tdEY0R0aXDqt51K1s","X-Google-Smtp-Source":"ADKCNb7s6NOE0DI7/DyzOmEp0oIVhoQLzGhT3ItKm5laZkEIDKzBcLhNmG551LpL6nVmsj+Kn08akw==","X-Received":"by 10.80.177.141 with SMTP id m13mr10900522edd.114.1505309371141;\n\tWed, 13 Sep 2017 06:29:31 -0700 (PDT)","Date":"Wed, 13 Sep 2017 15:29:28 +0200","From":"Simon Horman <simon.horman@netronome.com>","To":"Or Gerlitz <gerlitz.or@gmail.com>","Cc":"Jiri Pirko <jiri@mellanox.com>, Jamal Hadi Salim <jhs@mojatatu.com>,\n\tCong Wang <xiyou.wangcong@gmail.com>,\n\tLinux Netdev List <netdev@vger.kernel.org>, oss-drivers@netronome.com","Subject":"Re: [oss-drivers] Re: [PATCH/RFC net-next 2/2] net/sched: allow\n\tflower to match tunnel options","Message-ID":"<20170913132927.GH27555@vergenet.net>","References":"<1505226037-2758-1-git-send-email-simon.horman@netronome.com>\n\t<1505226037-2758-3-git-send-email-simon.horman@netronome.com>\n\t<CAJ3xEMgfkpJCfZX-7jaeYtoWTSQQZ6gu8_jSFgcXpzTBpdijQw@mail.gmail.com>\n\t<20170913092511.GA27555@vergenet.net>\n\t<CAJ3xEMj1prPRij-Dib96oZMik_k0DzEuXcxi7TbVeSwt9WnDsQ@mail.gmail.com>\n\t<20170913115931.GG27555@vergenet.net>\n\t<CAJ3xEMj9HYj+2-ruxLk=PVt=Gxu3FwpyrJPRUgCqdsNamZ=Txw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<CAJ3xEMj9HYj+2-ruxLk=PVt=Gxu3FwpyrJPRUgCqdsNamZ=Txw@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"}}]