All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: davem@davemloft.net
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, kuba@kernel.org,
	netdev@vger.kernel.org, andrea.mayer@uniroma2.it,
	dav.lebrun@gmail.com, mcr@sandelman.ca,
	stefan@datenfreihafen.org, Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH net 2/2] net: ipv6: seg6_local: don't set headroom
Date: Tue,  4 Feb 2020 12:30:19 -0500	[thread overview]
Message-ID: <20200204173019.4437-3-alex.aring@gmail.com> (raw)
In-Reply-To: <20200204173019.4437-1-alex.aring@gmail.com>

The headroom value only need to be set on tunnels before Layer 3 like
mpls. Remove it from seg6_local because it's in Layer 3.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 net/ipv6/seg6_local.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
index 7cbc19731997..3b77184edf2b 100644
--- a/net/ipv6/seg6_local.c
+++ b/net/ipv6/seg6_local.c
@@ -37,7 +37,6 @@ struct seg6_action_desc {
 	int action;
 	unsigned long attrs;
 	int (*input)(struct sk_buff *skb, struct seg6_local_lwt *slwt);
-	int static_headroom;
 };
 
 struct bpf_lwt_prog {
@@ -55,7 +54,6 @@ struct seg6_local_lwt {
 	int oif;
 	struct bpf_lwt_prog bpf;
 
-	int headroom;
 	struct seg6_action_desc *desc;
 };
 
@@ -603,7 +601,6 @@ static struct seg6_action_desc seg6_action_table[] = {
 		.action		= SEG6_LOCAL_ACTION_END_B6_ENCAP,
 		.attrs		= (1 << SEG6_LOCAL_SRH),
 		.input		= input_action_end_b6_encap,
-		.static_headroom	= sizeof(struct ipv6hdr),
 	},
 	{
 		.action		= SEG6_LOCAL_ACTION_END_BPF,
@@ -677,8 +674,6 @@ static int parse_nla_srh(struct nlattr **attrs, struct seg6_local_lwt *slwt)
 	if (!slwt->srh)
 		return -ENOMEM;
 
-	slwt->headroom += len;
-
 	return 0;
 }
 
@@ -952,7 +947,6 @@ static int parse_nla_action(struct nlattr **attrs, struct seg6_local_lwt *slwt)
 		return -EOPNOTSUPP;
 
 	slwt->desc = desc;
-	slwt->headroom += desc->static_headroom;
 
 	for (i = 0; i < SEG6_LOCAL_MAX + 1; i++) {
 		if (desc->attrs & (1 << i)) {
@@ -1004,7 +998,6 @@ static int seg6_local_build_state(struct nlattr *nla, unsigned int family,
 
 	newts->type = LWTUNNEL_ENCAP_SEG6_LOCAL;
 	newts->flags = LWTUNNEL_STATE_INPUT_REDIRECT;
-	newts->headroom = slwt->headroom;
 
 	*ts = newts;
 
-- 
2.20.1


  parent reply	other threads:[~2020-02-04 17:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 17:30 [PATCH net 0/2] net: ipv6: seg6: headroom fixes Alexander Aring
2020-02-04 17:30 ` [PATCH net 1/2] net: ipv6: seg6_iptunnel: set tunnel headroom to zero Alexander Aring
2020-02-06 12:54   ` David Miller
2020-02-08 17:34     ` Alexander Aring
2020-02-04 17:30 ` Alexander Aring [this message]
2020-02-05 12:21 ` [PATCH net 0/2] net: ipv6: seg6: headroom fixes Michael Richardson
2020-02-06 18:22   ` Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200204173019.4437-3-alex.aring@gmail.com \
    --to=alex.aring@gmail.com \
    --cc=andrea.mayer@uniroma2.it \
    --cc=dav.lebrun@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=mcr@sandelman.ca \
    --cc=netdev@vger.kernel.org \
    --cc=stefan@datenfreihafen.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.