Re: [net-next] ipv6: sr: Extract the right key values for "seg6_make_flowlabel"

2018-04-28 Thread Ahmed Abdelsalam
On Fri, 27 Apr 2018 13:59:07 -0400 (EDT) David Miller wrote: > From: Ahmed Abdelsalam > Date: Thu, 26 Apr 2018 16:11:11 +0200 > > > @@ -119,6 +119,9 @@ int seg6_do_srh_encap(struct sk_buff *skb, struct > > ipv6_sr_hdr *osrh, int proto) > > int hdrlen, tot_len, err; > > __be32 flowlabel

Re: [net-next] ipv6: sr: Extract the right key values for "seg6_make_flowlabel"

2018-04-27 Thread David Miller
From: Ahmed Abdelsalam Date: Thu, 26 Apr 2018 16:11:11 +0200 > @@ -119,6 +119,9 @@ int seg6_do_srh_encap(struct sk_buff *skb, struct > ipv6_sr_hdr *osrh, int proto) > int hdrlen, tot_len, err; > __be32 flowlabel; > > + inner_hdr = ipv6_hdr(skb); You have to make this assignmen

[net-next] ipv6: sr: Extract the right key values for "seg6_make_flowlabel"

2018-04-26 Thread Ahmed Abdelsalam
The seg6_make_flowlabel() is used by seg6_do_srh_encap() to compute the flowlabel from a given skb. It relies on skb_get_hash() which eventually calls __skb_flow_dissect() to extract the flow_keys struct values from the skb. In case of IPv4 traffic, calling seg6_make_flowlabel() after skb_push(),