[{"id":1761612,"web_url":"http://patchwork.ozlabs.org/comment/1761612/","msgid":"<0384baf6-0786-2d07-8919-fdd1ca5d88eb@cumulusnetworks.com>","list_archive_url":null,"date":"2017-09-01T11:45:15","subject":"Re: [PATCH net] bridge: switchdev: Clear forward mark when\n\ttransmitting packet","submitter":{"id":66448,"url":"http://patchwork.ozlabs.org/api/people/66448/","name":"Nikolay Aleksandrov","email":"nikolay@cumulusnetworks.com"},"content":"On 01/09/17 12:22, Ido Schimmel wrote:\n> Commit 6bc506b4fb06 (\"bridge: switchdev: Add forward mark support for\n> stacked devices\") added the 'offload_fwd_mark' bit to the skb in order\n> to allow drivers to indicate to the bridge driver that they already\n> forwarded the packet in L2.\n> \n> In case the bit is set, before transmitting the packet from each port,\n> the port's mark is compared with the mark stored in the skb's control\n> block. If both marks are equal, we know the packet arrived from a switch\n> device that already forwarded the packet and it's not re-transmitted.\n> \n> However, if the packet is transmitted from the bridge device itself\n> (e.g., br0), we should clear the 'offload_fwd_mark' bit as the mark\n> stored in the skb's control block isn't valid.\n> \n> This scenario can happen in rare cases where a packet was trapped during\n> L3 forwarding and forwarded by the kernel to a bridge device.\n> \n> Fixes: 6bc506b4fb06 (\"bridge: switchdev: Add forward mark support for stacked devices\")\n> Signed-off-by: Ido Schimmel <idosch@mellanox.com>\n> Reported-by: Yotam Gigi <yotamg@mellanox.com>\n> Tested-by: Yotam Gigi <yotamg@mellanox.com>\n> Reviewed-by: Jiri Pirko <jiri@mellanox.com>\n> ---\n>  net/bridge/br_device.c | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c\n> index 861ae2a165f4..5a7be3bddfa9 100644\n> --- a/net/bridge/br_device.c\n> +++ b/net/bridge/br_device.c\n> @@ -53,6 +53,9 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)\n>  \tbrstats->tx_bytes += skb->len;\n>  \tu64_stats_update_end(&brstats->syncp);\n>  \n> +#ifdef CONFIG_NET_SWITCHDEV\n> +\tskb->offload_fwd_mark = 0;\n> +#endif\n>  \tBR_INPUT_SKB_CB(skb)->brdev = dev;\n>  \n>  \tskb_reset_mac_header(skb);\n> \n\nGood catch, just one minor nit since there is already an ifdef\nswitchdev/else in br_private.h, why not make this a helper and avoid the\nifdef/endif in here ? Currently there is no ifdef switchdev anywhere else.\n\nThanks,\n Nik","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=\"Oi9vs3/6\"; \n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xkHVW6T1gz9sRV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 21:45:23 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751566AbdIALpU (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 1 Sep 2017 07:45:20 -0400","from mail-wm0-f52.google.com ([74.125.82.52]:35134 \"EHLO\n\tmail-wm0-f52.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751499AbdIALpT (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 1 Sep 2017 07:45:19 -0400","by mail-wm0-f52.google.com with SMTP id v2so2284072wmf.0\n\tfor <netdev@vger.kernel.org>; Fri, 01 Sep 2017 04:45:19 -0700 (PDT)","from [192.168.0.108] ([93.152.214.109])\n\tby smtp.gmail.com with ESMTPSA id\n\tt135sm1831415wmt.30.2017.09.01.04.45.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 01 Sep 2017 04:45:16 -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=TF3su3lKhmcb6zeQK+a81SxdTj1FbSP+KFiaggK7cw4=;\n\tb=Oi9vs3/6gRjWX3leC/jvAlrVF+qfzVhLiFu4oPpEl6ETLAuiDTZamJ7RTyFBKie9ew\n\tP+kR1WTz+CEGnOcipncXV0Qe9r05ocfjJWpb+V6+gyH+MceUn36s/AMYe+giAb4xND9H\n\t0FmDUYJpnf3JjsqyoT/OMQc5rKLleJwIJKgXY=","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=TF3su3lKhmcb6zeQK+a81SxdTj1FbSP+KFiaggK7cw4=;\n\tb=Nrhu0/W3AL9ljotzyvvwYw5m/Hmq4h9C53HRNHUJURCZLJysHHhkF0+vh+pELhRaPm\n\tM5qickQuGoEdRE8Ka7qW9AAgPsCQ0ojU5YXo/O62s7F9lIKJcvWpJTS3Fxps5s+ow7RK\n\taYdeyT5YbZEef39hIsib7BDCf+JAmKXh6rXthCMVUFTN9FVAFLG3g/nmwb5qDiC2GJLc\n\tXRUdGJC4IGdxYv0R1gFfodpnrlMYFQhaL6n5V92lqmcWBcQcsFEd8Eu6B/0wyJtPnH6D\n\t+bOWDgUrpYzW9kwkHcLveUsoS5cTwdUeg0bV7I1MdO3AU7oqVetghQTPjqjYWMDXjPEd\n\tbYdg==","X-Gm-Message-State":"AHPjjUiQlwHZwJx97mpK06vFwUtwjSOEuF7UzmWStxs2MEcxV/sQrEOQ\n\t1NrbsYk4m69yKVfd","X-Google-Smtp-Source":"ADKCNb70Kg4nBrSS9jXrS/K4OttLq5LAiTnkNaezZTnnzqffknOapFYi+u1WxlZsha7zpOy98nxu4A==","X-Received":"by 10.28.150.22 with SMTP id y22mr270184wmd.47.1504266318216;\n\tFri, 01 Sep 2017 04:45:18 -0700 (PDT)","Subject":"Re: [PATCH net] bridge: switchdev: Clear forward mark when\n\ttransmitting packet","To":"Ido Schimmel <idosch@mellanox.com>, netdev@vger.kernel.org","References":"<20170901092225.31597-1-idosch@mellanox.com>","Cc":"davem@davemloft.net, stephen@networkplumber.org, jiri@mellanox.com,\n\tyotamg@mellanox.com, mlxsw@mellanox.com,\n\tbridge@lists.linux-foundation.org","From":"Nikolay Aleksandrov <nikolay@cumulusnetworks.com>","Message-ID":"<0384baf6-0786-2d07-8919-fdd1ca5d88eb@cumulusnetworks.com>","Date":"Fri, 1 Sep 2017 14:45:15 +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":"<20170901092225.31597-1-idosch@mellanox.com>","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"}},{"id":1761623,"web_url":"http://patchwork.ozlabs.org/comment/1761623/","msgid":"<20170901120120.GA1962@nanopsycho>","list_archive_url":null,"date":"2017-09-01T12:01:20","subject":"Re: [PATCH net] bridge: switchdev: Clear forward mark when\n\ttransmitting packet","submitter":{"id":15321,"url":"http://patchwork.ozlabs.org/api/people/15321/","name":"Jiri Pirko","email":"jiri@resnulli.us"},"content":"Fri, Sep 01, 2017 at 01:45:15PM CEST, nikolay@cumulusnetworks.com wrote:\n>On 01/09/17 12:22, Ido Schimmel wrote:\n>> Commit 6bc506b4fb06 (\"bridge: switchdev: Add forward mark support for\n>> stacked devices\") added the 'offload_fwd_mark' bit to the skb in order\n>> to allow drivers to indicate to the bridge driver that they already\n>> forwarded the packet in L2.\n>> \n>> In case the bit is set, before transmitting the packet from each port,\n>> the port's mark is compared with the mark stored in the skb's control\n>> block. If both marks are equal, we know the packet arrived from a switch\n>> device that already forwarded the packet and it's not re-transmitted.\n>> \n>> However, if the packet is transmitted from the bridge device itself\n>> (e.g., br0), we should clear the 'offload_fwd_mark' bit as the mark\n>> stored in the skb's control block isn't valid.\n>> \n>> This scenario can happen in rare cases where a packet was trapped during\n>> L3 forwarding and forwarded by the kernel to a bridge device.\n>> \n>> Fixes: 6bc506b4fb06 (\"bridge: switchdev: Add forward mark support for stacked devices\")\n>> Signed-off-by: Ido Schimmel <idosch@mellanox.com>\n>> Reported-by: Yotam Gigi <yotamg@mellanox.com>\n>> Tested-by: Yotam Gigi <yotamg@mellanox.com>\n>> Reviewed-by: Jiri Pirko <jiri@mellanox.com>\n>> ---\n>>  net/bridge/br_device.c | 3 +++\n>>  1 file changed, 3 insertions(+)\n>> \n>> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c\n>> index 861ae2a165f4..5a7be3bddfa9 100644\n>> --- a/net/bridge/br_device.c\n>> +++ b/net/bridge/br_device.c\n>> @@ -53,6 +53,9 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)\n>>  \tbrstats->tx_bytes += skb->len;\n>>  \tu64_stats_update_end(&brstats->syncp);\n>>  \n>> +#ifdef CONFIG_NET_SWITCHDEV\n>> +\tskb->offload_fwd_mark = 0;\n>> +#endif\n>>  \tBR_INPUT_SKB_CB(skb)->brdev = dev;\n>>  \n>>  \tskb_reset_mac_header(skb);\n>> \n>\n>Good catch, just one minor nit since there is already an ifdef\n>switchdev/else in br_private.h, why not make this a helper and avoid the\n>ifdef/endif in here ? Currently there is no ifdef switchdev anywhere else.\n\nI think it would be better to convert this to a helper in -net-next and\ntake the patch as it is for -net","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=\"sOnf5/3f\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xkHs30mHnz9sRV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 22:01:27 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751880AbdIAMBZ (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 1 Sep 2017 08:01:25 -0400","from mail-wm0-f65.google.com ([74.125.82.65]:35219 \"EHLO\n\tmail-wm0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751499AbdIAMBX (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 1 Sep 2017 08:01:23 -0400","by mail-wm0-f65.google.com with SMTP id e204so13059wma.2\n\tfor <netdev@vger.kernel.org>; Fri, 01 Sep 2017 05:01:23 -0700 (PDT)","from localhost\n\t(dynamic-2a00-1028-8d19-6a7e-6b14-13f6-11a5-0c4b.ipv6.broadband.iol.cz.\n\t[2a00:1028:8d19:6a7e:6b14:13f6:11a5:c4b])\n\tby smtp.gmail.com with ESMTPSA id\n\t202sm2349296wmx.33.2017.09.01.05.01.21\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 01 Sep 2017 05:01:21 -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=rRRHExA1XS6cSw/tYVqGl5UVFPWsLhUpgA18YyWw1Iw=;\n\tb=sOnf5/3fEi9jZ767G4qnxs+MrsfyJWVIef3bUr8qTCS/xYiNLcpp5QkRqABhi1CdkD\n\tSXYCQTmLxbK2m1Bh8fAcDtAsFD7y1m6cCMHCjp2PgFViqs0GucFafcASHMiWvNy53ucU\n\taM1aMiE8nIv4+kCoIn/A4KeqgUMrHMVS89TYSIxFsSr7DhMErP/DkOTZ2Gu8vQUnKhv/\n\tl8Gik5AQKjPTd0L3KEnVP8PUzoQ0iRRg1XHqwNoUUGzJklx2bniMtrCVZB0nOmz/wctF\n\tf/OqwNXna0mmJzyL5SkqOcq2UEcW+fbfHEV5jAnJFrJeJXTx6inwsT8ip0JrkwSvKDfU\n\tGGOA==","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=rRRHExA1XS6cSw/tYVqGl5UVFPWsLhUpgA18YyWw1Iw=;\n\tb=C/6kO782VH743v2gSZT3NOkYyJXCp1UC6n5BykQ4EjVMnCOFiWi/KAlTG4+Ug+turm\n\tdNY04XFJ9JOjyuBTtbpbY5+o/UEkamXx5tJ4x9pbSQiNyUGqN+xKFtEH+NJVqsfvgt+w\n\tCSGcSKKk+8aExZhTc7cNHeU8Gel1UTiFypNezOMb0Kp1npiP/qz5eZ3b+F1stxAzjTyn\n\t3Ac46ySUwYULT1nywqP21yR0oF7B65jepYD7zjJvJRomVz3c+TmlZyeV+AW/g4GTGXAk\n\t+DDvTejdeSq4k3mxwYgmHna3F7QY5zVbSBFQEZ+sjjquQFmJUhyy/Ds/SDz8U5g/gsR9\n\tkz2A==","X-Gm-Message-State":"AHPjjUiez7ON912ocuqiUn/EJpD7iXf/Z5Cv2oOj/H37c4YDuGbvamzi\n\t2eVmvlOgiiGEETgU","X-Google-Smtp-Source":"ADKCNb7vJxhy9GnLCufxL4F2UKXYGe+2hTzWPCtTQXN7FnmoxUgOOnGFF1hEvgl21a1ZIKIZc9effA==","X-Received":"by 10.28.73.212 with SMTP id w203mr288575wma.53.1504267282323;\n\tFri, 01 Sep 2017 05:01:22 -0700 (PDT)","Date":"Fri, 1 Sep 2017 14:01:20 +0200","From":"Jiri Pirko <jiri@resnulli.us>","To":"Nikolay Aleksandrov <nikolay@cumulusnetworks.com>","Cc":"Ido Schimmel <idosch@mellanox.com>, netdev@vger.kernel.org,\n\tdavem@davemloft.net, stephen@networkplumber.org, jiri@mellanox.com,\n\tyotamg@mellanox.com, mlxsw@mellanox.com,\n\tbridge@lists.linux-foundation.org","Subject":"Re: [PATCH net] bridge: switchdev: Clear forward mark when\n\ttransmitting packet","Message-ID":"<20170901120120.GA1962@nanopsycho>","References":"<20170901092225.31597-1-idosch@mellanox.com>\n\t<0384baf6-0786-2d07-8919-fdd1ca5d88eb@cumulusnetworks.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<0384baf6-0786-2d07-8919-fdd1ca5d88eb@cumulusnetworks.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"}},{"id":1761628,"web_url":"http://patchwork.ozlabs.org/comment/1761628/","msgid":"<a2a82e24-43f1-02d6-fdfb-db3cdcbaf63a@cumulusnetworks.com>","list_archive_url":null,"date":"2017-09-01T12:03:33","subject":"Re: [PATCH net] bridge: switchdev: Clear forward mark when\n\ttransmitting packet","submitter":{"id":66448,"url":"http://patchwork.ozlabs.org/api/people/66448/","name":"Nikolay Aleksandrov","email":"nikolay@cumulusnetworks.com"},"content":"On 01/09/17 15:01, Jiri Pirko wrote:\n> Fri, Sep 01, 2017 at 01:45:15PM CEST, nikolay@cumulusnetworks.com wrote:\n>> On 01/09/17 12:22, Ido Schimmel wrote:\n>>> Commit 6bc506b4fb06 (\"bridge: switchdev: Add forward mark support for\n>>> stacked devices\") added the 'offload_fwd_mark' bit to the skb in order\n>>> to allow drivers to indicate to the bridge driver that they already\n>>> forwarded the packet in L2.\n>>>\n>>> In case the bit is set, before transmitting the packet from each port,\n>>> the port's mark is compared with the mark stored in the skb's control\n>>> block. If both marks are equal, we know the packet arrived from a switch\n>>> device that already forwarded the packet and it's not re-transmitted.\n>>>\n>>> However, if the packet is transmitted from the bridge device itself\n>>> (e.g., br0), we should clear the 'offload_fwd_mark' bit as the mark\n>>> stored in the skb's control block isn't valid.\n>>>\n>>> This scenario can happen in rare cases where a packet was trapped during\n>>> L3 forwarding and forwarded by the kernel to a bridge device.\n>>>\n>>> Fixes: 6bc506b4fb06 (\"bridge: switchdev: Add forward mark support for stacked devices\")\n>>> Signed-off-by: Ido Schimmel <idosch@mellanox.com>\n>>> Reported-by: Yotam Gigi <yotamg@mellanox.com>\n>>> Tested-by: Yotam Gigi <yotamg@mellanox.com>\n>>> Reviewed-by: Jiri Pirko <jiri@mellanox.com>\n>>> ---\n>>>  net/bridge/br_device.c | 3 +++\n>>>  1 file changed, 3 insertions(+)\n>>>\n>>> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c\n>>> index 861ae2a165f4..5a7be3bddfa9 100644\n>>> --- a/net/bridge/br_device.c\n>>> +++ b/net/bridge/br_device.c\n>>> @@ -53,6 +53,9 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)\n>>>  \tbrstats->tx_bytes += skb->len;\n>>>  \tu64_stats_update_end(&brstats->syncp);\n>>>  \n>>> +#ifdef CONFIG_NET_SWITCHDEV\n>>> +\tskb->offload_fwd_mark = 0;\n>>> +#endif\n>>>  \tBR_INPUT_SKB_CB(skb)->brdev = dev;\n>>>  \n>>>  \tskb_reset_mac_header(skb);\n>>>\n>>\n>> Good catch, just one minor nit since there is already an ifdef\n>> switchdev/else in br_private.h, why not make this a helper and avoid the\n>> ifdef/endif in here ? Currently there is no ifdef switchdev anywhere else.\n> \n> I think it would be better to convert this to a helper in -net-next and\n> take the patch as it is for -net\n> \n\nEither way is fine I guess, it's just more work for something as simple. :-)\n\nWhichever way you choose,\n\nAcked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.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 (1024-bit key;\n\tunprotected) header.d=cumulusnetworks.com\n\theader.i=@cumulusnetworks.com header.b=\"Fn2hGIA6\"; \n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xkHvc6b70z9s7M\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 22:03:40 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751781AbdIAMDi (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 1 Sep 2017 08:03:38 -0400","from mail-wr0-f173.google.com ([209.85.128.173]:35445 \"EHLO\n\tmail-wr0-f173.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751499AbdIAMDh (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 1 Sep 2017 08:03:37 -0400","by mail-wr0-f173.google.com with SMTP id y15so45745wrc.2\n\tfor <netdev@vger.kernel.org>; Fri, 01 Sep 2017 05:03:36 -0700 (PDT)","from [192.168.0.108] ([93.152.214.109])\n\tby smtp.gmail.com with ESMTPSA id\n\tu127sm1888977wmd.27.2017.09.01.05.03.34\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 01 Sep 2017 05:03:34 -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=jsgv3iaPqZxegTw3QXwysA8q4QbNFUwH22PI0+0iSD8=;\n\tb=Fn2hGIA6jiFq8dcRgUk7IhXo/gTbJt8bee04nrKuenO+hm3WwYk7O+VbgowoYqPAAj\n\td8xqZzP2ENH1ZQmCA5WJ87SgpvNnYuGwE35hIYDc/Hl29bCh1z911gHXDgJ/xMEuMd39\n\tMZu118VIec5Y+rkuvAGph62nPicwuoiQIZWyU=","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=jsgv3iaPqZxegTw3QXwysA8q4QbNFUwH22PI0+0iSD8=;\n\tb=ej4rmVKWYsNCbOBweW9gLV/1fc73hwSUJZTuom+b6T6ma8KzG5GyiWhHy9dmA2CJKZ\n\tIGhbw+NoKcqYlX01hwnBpU+OrwWh+ERb5wPCAbc4HyLRtlC+esNwGbRBH2YFHXKSOuT4\n\tplXjGa5x4YPPnfeSjPGzfeDi8nSZJnQaJF84AdPWLTjCqBXQ9XvvZ1KtAP8t5zDuU6Qq\n\tyZUusUyjD3UzbZ+oYURTu6JVaVICHkSE2u562K4lXB1cuTTf3F5uXKDr2qqBVQUkAYax\n\tYkBnpx/c+nbrubjDyeztBpIFRUnKmDLl1R+K4JOvG4+2GOlPXTv88u/MY3pz9ZWFn0O9\n\td23A==","X-Gm-Message-State":"AHPjjUidyGV50OPO5ENNkD5MkX/gslvw7j48gVOg8OsJKhIML50mtgbr\n\tZVPV6IF4kCsvvT2O7LQ=","X-Google-Smtp-Source":"ADKCNb5iERqWDP3czNx+eTdUKjnx/YTULtFko6Kz6FLV6H1zEIa3zTpKUxSfhsH6oBv/aUa/GQpO5w==","X-Received":"by 10.223.144.43 with SMTP id h40mr1084248wrh.175.1504267415704; \n\tFri, 01 Sep 2017 05:03:35 -0700 (PDT)","Subject":"Re: [PATCH net] bridge: switchdev: Clear forward mark when\n\ttransmitting packet","To":"Jiri Pirko <jiri@resnulli.us>","References":"<20170901092225.31597-1-idosch@mellanox.com>\n\t<0384baf6-0786-2d07-8919-fdd1ca5d88eb@cumulusnetworks.com>\n\t<20170901120120.GA1962@nanopsycho>","Cc":"Ido Schimmel <idosch@mellanox.com>, netdev@vger.kernel.org,\n\tdavem@davemloft.net, stephen@networkplumber.org, jiri@mellanox.com,\n\tyotamg@mellanox.com, mlxsw@mellanox.com,\n\tbridge@lists.linux-foundation.org","From":"Nikolay Aleksandrov <nikolay@cumulusnetworks.com>","Message-ID":"<a2a82e24-43f1-02d6-fdfb-db3cdcbaf63a@cumulusnetworks.com>","Date":"Fri, 1 Sep 2017 15:03:33 +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":"<20170901120120.GA1962@nanopsycho>","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"}},{"id":1761840,"web_url":"http://patchwork.ozlabs.org/comment/1761840/","msgid":"<20170901.101200.1178632155073906923.davem@davemloft.net>","list_archive_url":null,"date":"2017-09-01T17:12:00","subject":"Re: [PATCH net] bridge: switchdev: Clear forward mark when\n\ttransmitting packet","submitter":{"id":15,"url":"http://patchwork.ozlabs.org/api/people/15/","name":"David Miller","email":"davem@davemloft.net"},"content":"From: Ido Schimmel <idosch@mellanox.com>\nDate: Fri,  1 Sep 2017 12:22:25 +0300\n\n> Commit 6bc506b4fb06 (\"bridge: switchdev: Add forward mark support for\n> stacked devices\") added the 'offload_fwd_mark' bit to the skb in order\n> to allow drivers to indicate to the bridge driver that they already\n> forwarded the packet in L2.\n> \n> In case the bit is set, before transmitting the packet from each port,\n> the port's mark is compared with the mark stored in the skb's control\n> block. If both marks are equal, we know the packet arrived from a switch\n> device that already forwarded the packet and it's not re-transmitted.\n> \n> However, if the packet is transmitted from the bridge device itself\n> (e.g., br0), we should clear the 'offload_fwd_mark' bit as the mark\n> stored in the skb's control block isn't valid.\n> \n> This scenario can happen in rare cases where a packet was trapped during\n> L3 forwarding and forwarded by the kernel to a bridge device.\n> \n> Fixes: 6bc506b4fb06 (\"bridge: switchdev: Add forward mark support for stacked devices\")\n> Signed-off-by: Ido Schimmel <idosch@mellanox.com>\n> Reported-by: Yotam Gigi <yotamg@mellanox.com>\n> Tested-by: Yotam Gigi <yotamg@mellanox.com>\n> Reviewed-by: Jiri Pirko <jiri@mellanox.com>\n\nApplied and queued up for -stable, thanks.","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 3xkQlT2yVJz9t3F\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  2 Sep 2017 03:12:05 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752338AbdIARMC (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 1 Sep 2017 13:12:02 -0400","from shards.monkeyblade.net ([184.105.139.130]:49632 \"EHLO\n\tshards.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752151AbdIARMC (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 1 Sep 2017 13:12:02 -0400","from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net\n\t[74.93.104.98]) (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 8277A1342562C;\n\tFri,  1 Sep 2017 10:12:01 -0700 (PDT)"],"Date":"Fri, 01 Sep 2017 10:12:00 -0700 (PDT)","Message-Id":"<20170901.101200.1178632155073906923.davem@davemloft.net>","To":"idosch@mellanox.com","Cc":"netdev@vger.kernel.org, stephen@networkplumber.org,\n\tnikolay@cumulusnetworks.com, jiri@mellanox.com,\n\tyotamg@mellanox.com, mlxsw@mellanox.com,\n\tbridge@lists.linux-foundation.org","Subject":"Re: [PATCH net] bridge: switchdev: Clear forward mark when\n\ttransmitting packet","From":"David Miller <davem@davemloft.net>","In-Reply-To":"<20170901092225.31597-1-idosch@mellanox.com>","References":"<20170901092225.31597-1-idosch@mellanox.com>","X-Mailer":"Mew version 6.7 on Emacs 25.2 / 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]); Fri, 01 Sep 2017 10:12:01 -0700 (PDT)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]