From patchwork Mon Oct 24 09:28:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Sitnicki X-Patchwork-Id: 685745 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 3t2WGG2FCKz9t17 for ; Mon, 24 Oct 2016 20:29:58 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936480AbcJXJ3C (ORCPT ); Mon, 24 Oct 2016 05:29:02 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36402 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757197AbcJXJ26 (ORCPT ); Mon, 24 Oct 2016 05:28:58 -0400 Received: by mail-wm0-f47.google.com with SMTP id b80so92914367wme.1 for ; Mon, 24 Oct 2016 02:28:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Zcip7RJ9QAZcc1qRknJwSvfHM8O3Z+R9NeP+0KGNXGg=; b=KY8r2V/t8hJR1KARjKw4puDIx0Hgj94gW/VNqgL672nEE150PKOIGBvz5tagjoxAMI MJd3oMGocQ+5OsTeRyyHLZusxhFTadZQZmgEzeZPeUHy3+TI3gVsP5qCkPTZPw5z4MNA p+B0mkmlryhQsBxZ6DLllfkhayqv9plXkQToYX4VIE1TtY6VvGEgy37mh/p77oecLFL+ o4z4Z5V4g2Ua+DH0FzESbIjMGUSbt/jXJdRXnAIqdCqou5ih37CQucvVV2WPkRhw/rfJ 6j8crw655a7KPHSAa3uO5B/JjvGrjm00HTU4Ja0iIYa0mRPnoKcPjlcffPDs3sYukbqq IwyA== X-Gm-Message-State: ABUngvdoCaybEh8NbXPjnEeta5T69rJg4rKAe7nwdUYTRnrEtse3vA5bCVdAyamJQDuRpR2c X-Received: by 10.194.148.162 with SMTP id tt2mr11012377wjb.147.1477301336604; Mon, 24 Oct 2016 02:28:56 -0700 (PDT) Received: from redhat.com ([149.6.38.86]) by smtp.gmail.com with ESMTPSA id l130sm13707063wmb.18.2016.10.24.02.28.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Oct 2016 02:28:56 -0700 (PDT) From: Jakub Sitnicki To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "David S. Miller" Subject: [PATCH net-next 2/5] net: Extend struct flowi6 with multipath hash Date: Mon, 24 Oct 2016 11:28:49 +0200 Message-Id: <1477301332-23954-3-git-send-email-jkbs@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477301332-23954-1-git-send-email-jkbs@redhat.com> References: <1477301332-23954-1-git-send-email-jkbs@redhat.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Allow for functions that fill out the IPv6 flow info to also pass a hash computed over the skb contents. The hash value will drive the multipath routing decisions. This is intended for special treatment of ICMPv6 errors, where we would like to make a routing decision based on the flow identifying the offending IPv6 datagram that triggered the error, rather than the flow of the ICMP error itself. Signed-off-by: Jakub Sitnicki Acked-by: Hannes Frederic Sowa --- include/net/flow.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/flow.h b/include/net/flow.h index 035aa77..73ee3aa 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -143,6 +143,7 @@ struct flowi6 { #define fl6_ipsec_spi uli.spi #define fl6_mh_type uli.mht.type #define fl6_gre_key uli.gre_key + __u32 mp_hash; } __attribute__((__aligned__(BITS_PER_LONG/8))); struct flowidn {