[{"id":1772717,"web_url":"http://patchwork.ozlabs.org/comment/1772717/","msgid":"<47b88645-bef5-fb53-aa02-f885aa54d368@cumulusnetworks.com>","list_archive_url":null,"date":"2017-09-21T11:27:59","subject":"Re: [patch net-next 05/12] net: ipmr: Add MFC offload indication","submitter":{"id":66448,"url":"http://patchwork.ozlabs.org/api/people/66448/","name":"Nikolay Aleksandrov","email":"nikolay@cumulusnetworks.com"},"content":"On 21/09/17 09:43, Jiri Pirko wrote:\n> From: Yotam Gigi <yotamg@mellanox.com>\n> \n> Allow drivers, registered to the fib notification chain indicate whether a\n> multicast MFC route is offloaded or not, similarly to unicast routes. The\n> indication of whether a route is offloaded is done using the mfc_flags\n> field on an mfc_cache struct, and the information is sent to the userspace\n> via the RTNetlink interface only.\n> \n> Currently, MFC routes are either offloaded or not, thus there is no need to\n> add per-VIF offload indication.\n> \n> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>\n> Reviewed-by: Ido Schimmel <idosch@mellanox.com>\n> Signed-off-by: Jiri Pirko <jiri@mellanox.com>\n> ---\n>  include/linux/mroute.h | 1 +\n>  net/ipv4/ipmr.c        | 3 +++\n>  2 files changed, 4 insertions(+)\n> \n> diff --git a/include/linux/mroute.h b/include/linux/mroute.h\n> index ba5a976..9b64587 100644\n> --- a/include/linux/mroute.h\n> +++ b/include/linux/mroute.h\n> @@ -93,6 +93,7 @@ struct mr_table {\n>   */\n>  enum {\n>  \tMFC_STATIC = BIT(0),\n> +\tMFC_OFFLOAD = BIT(1),\n>  };\n\nIt maybe redundant but above this enum is a comment with flag descriptions,\nsince you're adding a new flag could you also please add a short\ndescription above ?\n\n>  \n>  struct mfc_cache_cmp_arg {\n> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c\n> index 7891d95..6804885 100644\n> --- a/net/ipv4/ipmr.c\n> +++ b/net/ipv4/ipmr.c\n> @@ -2268,6 +2268,9 @@ static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,\n>  \t    nla_put_u32(skb, RTA_IIF, mrt->vif_table[c->mfc_parent].dev->ifindex) < 0)\n>  \t\treturn -EMSGSIZE;\n>  \n> +\tif (c->mfc_flags & MFC_OFFLOAD)\n> +\t\trtm->rtm_flags |= RTNH_F_OFFLOAD;\n> +\n>  \tif (!(mp_attr = nla_nest_start(skb, RTA_MULTIPATH)))\n>  \t\treturn -EMSGSIZE;\n>  \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 (1024-bit key;\n\tunprotected) header.d=cumulusnetworks.com\n\theader.i=@cumulusnetworks.com header.b=\"ToCheBxV\"; \n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyZ9N2hGcz9t42\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 21:28:08 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751837AbdIUL2F (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 21 Sep 2017 07:28:05 -0400","from mail-wr0-f179.google.com ([209.85.128.179]:57300 \"EHLO\n\tmail-wr0-f179.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751387AbdIUL2D (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 21 Sep 2017 07:28:03 -0400","by mail-wr0-f179.google.com with SMTP id r74so4304384wrb.13\n\tfor <netdev@vger.kernel.org>; Thu, 21 Sep 2017 04:28:02 -0700 (PDT)","from [192.168.0.103] (46-10-142-144.ip.btc-net.bg. [46.10.142.144])\n\tby smtp.googlemail.com with ESMTPSA id\n\te17sm2847436wmf.46.2017.09.21.04.28.00\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 21 Sep 2017 04:28:00 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=cumulusnetworks.com; s=google;\n\th=subject:to:references:cc:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=RDjVLhWri34jZt6moAmIWVyaXylHgKCLenRKPIYAjaU=;\n\tb=ToCheBxV7t4UvSGH84/PceZ7HvEdPo++GdIrqJi7FDei6GVHanSsJfSq/Xc86Oxbo1\n\t7o/GH+54xhl0WkC37FdELcpPW0b8VKTbFAaozCTvRy+G/9qU6KlIpZvGoBvBsU2EOyqI\n\t11b6wtn0s/yFZCJff/CtvAjztV2uBuhODEIAs=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:cc:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=RDjVLhWri34jZt6moAmIWVyaXylHgKCLenRKPIYAjaU=;\n\tb=cnLp1f+XPSf4tMop8v9N4jVZSu5gDUV39GHf+hGpzmh+NoC0/IYePtFF8xY8Zu1ZT8\n\tKmEIU5z+CfKRCWtZ1swAFOJ/PKMmg61E9+gr6VPOaAIBaTbuonc29V8XKn3zbq4KhYqN\n\tPijNtgsI+Chtn0ioDr78cqkg7NLrplbadFixBSintDuqsSeeb4B6mFWnRaGP5/j7W2xH\n\tRG7q6pOLv7kaasnvYnNBbS5UjM2o2A+htDpfzYWTuNxplDJP6LRsEhp+lDdkq1OMF5eA\n\tCke9qURrdoEq9S7mwn4dUKy0mY5NHgOJ9BmeWTRU5+hlr1Rmn6oVK/1Npra4kNiS4+xq\n\t3LYA==","X-Gm-Message-State":"AHPjjUicPUR+vzwOKGi6oBWTtfNCCc33a7QhEqvHYUZoe6vS8fDc1BCY\n\t0ob/m/DEh6ckuwG/lWF+Hem3IQ==","X-Google-Smtp-Source":"AOwi7QDLIM246xgzX/I6FwGyDDQPGFCtdIRH1+I0nT35yHWhAZfjhT4dV79dbx/omnxNFTptsFGnHg==","X-Received":"by 10.223.195.37 with SMTP id n34mr1562298wrf.219.1505993282099; \n\tThu, 21 Sep 2017 04:28:02 -0700 (PDT)","Subject":"Re: [patch net-next 05/12] net: ipmr: Add MFC offload indication","To":"Jiri Pirko <jiri@resnulli.us>, netdev@vger.kernel.org","References":"<20170921064338.1282-1-jiri@resnulli.us>\n\t<20170921064338.1282-6-jiri@resnulli.us>","Cc":"davem@davemloft.net, yotamg@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com","From":"Nikolay Aleksandrov <nikolay@cumulusnetworks.com>","Message-ID":"<47b88645-bef5-fb53-aa02-f885aa54d368@cumulusnetworks.com>","Date":"Thu, 21 Sep 2017 14:27:59 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tIcedove/45.6.0","MIME-Version":"1.0","In-Reply-To":"<20170921064338.1282-6-jiri@resnulli.us>","Content-Type":"text/plain; charset=windows-1252","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"}}]