From patchwork Mon Oct 10 11:15:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryota OZAKI X-Patchwork-Id: 680362 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ssyg42MsZz9s3T for ; Mon, 10 Oct 2016 22:33:20 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=rQiL7S6f; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752100AbcJJLdP (ORCPT ); Mon, 10 Oct 2016 07:33:15 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:35954 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751130AbcJJLdO (ORCPT ); Mon, 10 Oct 2016 07:33:14 -0400 Received: by mail-pa0-f66.google.com with SMTP id rw4so2228422pab.3 for ; Mon, 10 Oct 2016 04:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=rdiTmZWjrdom1WsQSkfNaJ4H3jLuZDTO0T0Pher67LA=; b=rQiL7S6fA0EHEk3LoE/UIVxtW/cBMMFFHgJwi8CYeil6q4oFfxJ49iIpXclalFv8Wp okJhjuNUfMPJ75PqoZzj+B6jeZt+6goreRL1rekZgttVMaU/R8Ce4Wal5OUkQ3pDOPn1 YmPQ0C2OXMw6YVxoDx9Wl66sqN1I12juQdGesu9F53uB9cTHLmRvTXgtahe3MAODEnjq WsWQkfqbBUdTFTsDHcix3cnrt/qnYF7EFAHq5suEVw0/Ft4TW1PYZcbsSi0bSV7hn3il QVHVLk2QNNTcpTRv+rJG/xy0GVZURnFGP1CNqB7EuPXWZOEt6XFC6JLT96N0BGW5nCNQ 0fEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=rdiTmZWjrdom1WsQSkfNaJ4H3jLuZDTO0T0Pher67LA=; b=gfY72Z9k1Sb36B4bbIDgUhVQ/KROcwLMaXRVEAmcjo4DBJ44kWCThvZs/2DX3qA9te ZyDIH742B6yiJAw7co1EmQHWddZfBmPoQvZrJrLi9zhSBtq8yDrhKJN4kVWcKGQb9NId byBr8uFlGnC+jsHhdjDJin5WJCzxPiIsWTsFlgfbeCRazZvOV9oLrbl3FCT9/tgIYJ+y sQFbI2hz7ze2Q7NkPfYLeHtkXo419ga+MyFITV4kmmBAk4fsso9Rf7VagMPWDUDCU3Vm GODU6era4Z7jM27/NN6gKVlhyehtrKHICRIMoKF92nrQMlU98LFIpj3ay93kMOlfTRPG 0ogw== X-Gm-Message-State: AA6/9Rm1hNGzkCZb60/3w1JRH+lTh7MIusBrGk0X8V8E6Qcdtl11fe3JT8pger+I2sgc+g== X-Received: by 10.66.27.230 with SMTP id w6mr53297896pag.199.1476098151826; Mon, 10 Oct 2016 04:15:51 -0700 (PDT) Received: from fedora24.localdomain ([118.103.63.157]) by smtp.gmail.com with ESMTPSA id bx5sm29847499pad.6.2016.10.10.04.15.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Oct 2016 04:15:51 -0700 (PDT) From: Ryota Ozaki To: netdev@vger.kernel.org Subject: [PATCH] doc: fix wrongly referencing dev->skb_mark Date: Mon, 10 Oct 2016 20:15:39 +0900 Message-Id: <1476098139-6333-1-git-send-email-ozaki.ryota@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Section "Flooding L2 domain" says, to avoid duplicated flooding, if skb->offload_fwd_mark is matched with dev->skb_mark, the kernel will drop the packet. However, the relevant code in __dev_queue_xmit compares skb->offload_fwd_mark with dev->offload_fwd_mark, not dev->skb_mark. I guess the text is wrong. Signed-off-by: Ryota Ozaki --- Documentation/networking/switchdev.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt index 31c3911..d4124a0 100644 --- a/Documentation/networking/switchdev.txt +++ b/Documentation/networking/switchdev.txt @@ -286,8 +286,8 @@ otherwise there will be duplicate packets on the wire. To avoid duplicate packets, the device/driver should mark a packet as already forwarded using skb->offload_fwd_mark. The same mark is set on the device ports in the domain using dev->offload_fwd_mark. If the skb->offload_fwd_mark -is non-zero and matches the forwarding egress port's dev->skb_mark, the kernel -will drop the skb right before transmit on the egress port, with the +is non-zero and matches the forwarding egress port's dev->offload_fwd_mark, +the kernel will drop the skb right before transmit on the egress port, with the understanding that the device already forwarded the packet on same egress port. The driver can use switchdev_port_fwd_mark_set() to set a globally unique mark for port's dev->offload_fwd_mark, based on the port's parent ID (switch ID) and