lwt: Remove unused len field
The field is initialized by ILA and MPLS but never used. Remove it. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7281a66590
commit
f76a9db351
|
@ -24,11 +24,10 @@ enum {
|
||||||
struct lwtunnel_state {
|
struct lwtunnel_state {
|
||||||
__u16 type;
|
__u16 type;
|
||||||
__u16 flags;
|
__u16 flags;
|
||||||
|
__u16 headroom;
|
||||||
atomic_t refcnt;
|
atomic_t refcnt;
|
||||||
int (*orig_output)(struct net *net, struct sock *sk, struct sk_buff *skb);
|
int (*orig_output)(struct net *net, struct sock *sk, struct sk_buff *skb);
|
||||||
int (*orig_input)(struct sk_buff *);
|
int (*orig_input)(struct sk_buff *);
|
||||||
int len;
|
|
||||||
__u16 headroom;
|
|
||||||
struct rcu_head rcu;
|
struct rcu_head rcu;
|
||||||
__u8 data[0];
|
__u8 data[0];
|
||||||
};
|
};
|
||||||
|
|
|
@ -122,7 +122,6 @@ static int ila_build_state(struct net_device *dev, struct nlattr *nla,
|
||||||
struct ila_lwt *ilwt;
|
struct ila_lwt *ilwt;
|
||||||
struct ila_params *p;
|
struct ila_params *p;
|
||||||
struct nlattr *tb[ILA_ATTR_MAX + 1];
|
struct nlattr *tb[ILA_ATTR_MAX + 1];
|
||||||
size_t encap_len = sizeof(*ilwt);
|
|
||||||
struct lwtunnel_state *newts;
|
struct lwtunnel_state *newts;
|
||||||
const struct fib6_config *cfg6 = cfg;
|
const struct fib6_config *cfg6 = cfg;
|
||||||
struct ila_addr *iaddr;
|
struct ila_addr *iaddr;
|
||||||
|
@ -155,7 +154,7 @@ static int ila_build_state(struct net_device *dev, struct nlattr *nla,
|
||||||
if (!tb[ILA_ATTR_LOCATOR])
|
if (!tb[ILA_ATTR_LOCATOR])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
newts = lwtunnel_state_alloc(encap_len);
|
newts = lwtunnel_state_alloc(sizeof(*ilwt));
|
||||||
if (!newts)
|
if (!newts)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -166,7 +165,6 @@ static int ila_build_state(struct net_device *dev, struct nlattr *nla,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
newts->len = encap_len;
|
|
||||||
p = ila_params_lwtunnel(newts);
|
p = ila_params_lwtunnel(newts);
|
||||||
|
|
||||||
p->locator.v64 = (__force __be64)nla_get_u64(tb[ILA_ATTR_LOCATOR]);
|
p->locator.v64 = (__force __be64)nla_get_u64(tb[ILA_ATTR_LOCATOR]);
|
||||||
|
|
|
@ -133,7 +133,6 @@ static int mpls_build_state(struct net_device *dev, struct nlattr *nla,
|
||||||
struct mpls_iptunnel_encap *tun_encap_info;
|
struct mpls_iptunnel_encap *tun_encap_info;
|
||||||
struct nlattr *tb[MPLS_IPTUNNEL_MAX + 1];
|
struct nlattr *tb[MPLS_IPTUNNEL_MAX + 1];
|
||||||
struct lwtunnel_state *newts;
|
struct lwtunnel_state *newts;
|
||||||
int tun_encap_info_len;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = nla_parse_nested(tb, MPLS_IPTUNNEL_MAX, nla,
|
ret = nla_parse_nested(tb, MPLS_IPTUNNEL_MAX, nla,
|
||||||
|
@ -144,13 +143,11 @@ static int mpls_build_state(struct net_device *dev, struct nlattr *nla,
|
||||||
if (!tb[MPLS_IPTUNNEL_DST])
|
if (!tb[MPLS_IPTUNNEL_DST])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
tun_encap_info_len = sizeof(*tun_encap_info);
|
|
||||||
|
|
||||||
newts = lwtunnel_state_alloc(tun_encap_info_len);
|
newts = lwtunnel_state_alloc(sizeof(*tun_encap_info));
|
||||||
if (!newts)
|
if (!newts)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
newts->len = tun_encap_info_len;
|
|
||||||
tun_encap_info = mpls_lwtunnel_encap(newts);
|
tun_encap_info = mpls_lwtunnel_encap(newts);
|
||||||
ret = nla_get_labels(tb[MPLS_IPTUNNEL_DST], MAX_NEW_LABELS,
|
ret = nla_get_labels(tb[MPLS_IPTUNNEL_DST], MAX_NEW_LABELS,
|
||||||
&tun_encap_info->labels, tun_encap_info->label);
|
&tun_encap_info->labels, tun_encap_info->label);
|
||||||
|
|
Loading…
Reference in New Issue