Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three sets of overlapping changes. Nothing serious. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -53,7 +53,7 @@ int ife_tlv_meta_encode(void *skbdata, u16 attrtype, u16 dlen, const void *dval)
|
||||
u32 *tlv = (u32 *)(skbdata);
|
||||
u16 totlen = nla_total_size(dlen); /*alignment + hdr */
|
||||
char *dptr = (char *)tlv + NLA_HDRLEN;
|
||||
u32 htlv = attrtype << 16 | dlen;
|
||||
u32 htlv = attrtype << 16 | (dlen + NLA_HDRLEN);
|
||||
|
||||
*tlv = htonl(htlv);
|
||||
memset(dptr, 0, totlen - NLA_HDRLEN);
|
||||
@@ -653,7 +653,7 @@ static int tcf_ife_decode(struct sk_buff *skb, const struct tc_action *a,
|
||||
struct tcf_ife_info *ife = to_ife(a);
|
||||
int action = ife->tcf_action;
|
||||
struct ifeheadr *ifehdr = (struct ifeheadr *)skb->data;
|
||||
u16 ifehdrln = ifehdr->metalen;
|
||||
int ifehdrln = (int)ifehdr->metalen;
|
||||
struct meta_tlvhdr *tlv = (struct meta_tlvhdr *)(ifehdr->tlv_data);
|
||||
|
||||
spin_lock(&ife->tcf_lock);
|
||||
@@ -766,8 +766,6 @@ static int tcf_ife_encode(struct sk_buff *skb, const struct tc_action *a,
|
||||
return TC_ACT_SHOT;
|
||||
}
|
||||
|
||||
iethh = eth_hdr(skb);
|
||||
|
||||
err = skb_cow_head(skb, hdrm);
|
||||
if (unlikely(err)) {
|
||||
ife->tcf_qstats.drops++;
|
||||
@@ -778,6 +776,7 @@ static int tcf_ife_encode(struct sk_buff *skb, const struct tc_action *a,
|
||||
if (!(at & AT_EGRESS))
|
||||
skb_push(skb, skb->dev->hard_header_len);
|
||||
|
||||
iethh = (struct ethhdr *)skb->data;
|
||||
__skb_push(skb, hdrm);
|
||||
memcpy(skb->data, iethh, skb->mac_len);
|
||||
skb_reset_mac_header(skb);
|
||||
|
Reference in New Issue
Block a user