From: David S. Miller Date: Sat, 28 Jan 2017 15:33:06 +0000 (-0500) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4e8f2fc1a55d543717efb70e170b09e773d0542b;p=openwrt%2Fstaging%2Fblogic.git Merge git://git./linux/kernel/git/davem/net Two trivial overlapping changes conflicts in MPLS and mlx5. Signed-off-by: David S. Miller --- 4e8f2fc1a55d543717efb70e170b09e773d0542b diff --cc kernel/bpf/syscall.c index 05ad086ab71d,19b6129eab23..08a4d287226b --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@@ -10,9 -10,10 +10,11 @@@ * General Public License for more details. */ #include +#include #include #include + #include + #include #include #include #include diff --cc net/mpls/af_mpls.c index 4dc81963af8f,5b77377e5a15..64d3bf269a26 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@@ -94,35 -98,10 +94,35 @@@ bool mpls_pkt_too_big(const struct sk_b } EXPORT_SYMBOL_GPL(mpls_pkt_too_big); +void mpls_stats_inc_outucastpkts(struct net_device *dev, + const struct sk_buff *skb) +{ + struct mpls_dev *mdev; + + if (skb->protocol == htons(ETH_P_MPLS_UC)) { + mdev = mpls_dev_get(dev); + if (mdev) + MPLS_INC_STATS_LEN(mdev, skb->len, + tx_packets, + tx_bytes); + } else if (skb->protocol == htons(ETH_P_IP)) { + IP_UPD_PO_STATS(dev_net(dev), IPSTATS_MIB_OUT, skb->len); +#if IS_ENABLED(CONFIG_IPV6) + } else if (skb->protocol == htons(ETH_P_IPV6)) { + struct inet6_dev *in6dev = __in6_dev_get(dev); + + if (in6dev) + IP6_UPD_PO_STATS(dev_net(dev), in6dev, + IPSTATS_MIB_OUT, skb->len); +#endif + } +} +EXPORT_SYMBOL_GPL(mpls_stats_inc_outucastpkts); + - static u32 mpls_multipath_hash(struct mpls_route *rt, - struct sk_buff *skb, bool bos) + static u32 mpls_multipath_hash(struct mpls_route *rt, struct sk_buff *skb) { struct mpls_entry_decoded dec; + unsigned int mpls_hdr_len = 0; struct mpls_shim_hdr *hdr; bool eli_seen = false; int label_index; @@@ -308,24 -280,27 +310,24 @@@ static int mpls_forward(struct sk_buff hdr = mpls_hdr(skb); dec = mpls_entry_decode(hdr); - /* Pop the label */ - skb_pull(skb, sizeof(*hdr)); - skb_reset_network_header(skb); - - skb_orphan(skb); - rt = mpls_route_input_rcu(net, dec.label); - if (!rt) + if (!rt) { + MPLS_INC_STATS(mdev, rx_noroute); goto drop; + } - nh = mpls_select_multipath(rt, skb, dec.bos); + nh = mpls_select_multipath(rt, skb); if (!nh) - goto drop; - - /* Find the output device */ - out_dev = rcu_dereference(nh->nh_dev); - if (!mpls_output_possible(out_dev)) - goto drop; + goto err; + /* Pop the label */ + skb_pull(skb, sizeof(*hdr)); + skb_reset_network_header(skb); + + skb_orphan(skb); + if (skb_warn_if_lro(skb)) - goto drop; + goto err; skb_forward_csum(skb);