Re: [PATCH net-next] net: Move ipv4 set_lwt_redirect helper to lwtunnel

2018-02-13 Thread David Ahern
On 2/13/18 12:49 PM, David Miller wrote:
> From: David Ahern 
> Date: Tue, 13 Feb 2018 08:45:50 -0800
> 
>> @@ -127,6 +127,19 @@ int lwtunnel_output(struct net *net, struct sock *sk, 
>> struct sk_buff *skb);
>>  int lwtunnel_input(struct sk_buff *skb);
>>  int lwtunnel_xmit(struct sk_buff *skb);
>>  
>> +static inline void lwtunnel_set_redirect(struct dst_entry *dst)
>> +{
>> +if (dst->lwtstate) {
> 
> This test is new, and doesn't exist in the ipv4 nor the ipv6 code you are
> deriving this from.
> 
> If it is needed, explain why.

leftover from a previous attempt to further consolidate lwt checks. Will
remove and send a v2.


Re: [PATCH net-next] net: Move ipv4 set_lwt_redirect helper to lwtunnel

2018-02-13 Thread David Miller
From: David Ahern 
Date: Tue, 13 Feb 2018 08:45:50 -0800

> @@ -127,6 +127,19 @@ int lwtunnel_output(struct net *net, struct sock *sk, 
> struct sk_buff *skb);
>  int lwtunnel_input(struct sk_buff *skb);
>  int lwtunnel_xmit(struct sk_buff *skb);
>  
> +static inline void lwtunnel_set_redirect(struct dst_entry *dst)
> +{
> + if (dst->lwtstate) {

This test is new, and doesn't exist in the ipv4 nor the ipv6 code you are
deriving this from.

If it is needed, explain why.

Thank you.