From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753994AbdGUI7C (ORCPT ); Fri, 21 Jul 2017 04:59:02 -0400 Received: from nbd.name ([46.4.11.11]:51386 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753272AbdGUI7A (ORCPT ); Fri, 21 Jul 2017 04:59:00 -0400 From: John Crispin To: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S . Miller" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, John Crispin Subject: [PATCH V2 2/4] net-next: dsa: add 802.3 protocol offset to struct dsa_device_ops Date: Fri, 21 Jul 2017 10:58:11 +0200 Message-Id: <20170721085813.30789-2-john@phrozen.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170721085813.30789-1-john@phrozen.org> References: <20170721085813.30789-1-john@phrozen.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding these 2 new fields allows a DSA device to indicate the offsets of the 802.3 header caused by the insertion of the switches tag. Signed-off-by: John Crispin --- include/net/dsa.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index a4c0d52abc80..b98bc3621905 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -106,6 +106,11 @@ struct dsa_device_ops { struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); + /* + * Network header and 802.3 protocol offsets + */ + int hash_nh_off; + int hash_proto_off; }; struct dsa_switch_tree { -- 2.11.0