vrf.c (29a26a56803855a79dbd028cd61abee56237d6e5) vrf.c (0c4b51f0054ce85c0ec578ab818f0631834573eb)
1/*
2 * vrf.c: device driver to encapsulate a VRF space
3 *
4 * Copyright (c) 2015 Cumulus Networks. All rights reserved.
5 * Copyright (c) 2015 Shrijeet Mukherjee <shm@cumulusnetworks.com>
6 * Copyright (c) 2015 David Ahern <dsa@cumulusnetworks.com>
7 *
8 * Based on dummy, team and ipvlan drivers

--- 239 unchanged lines hidden (view full) ---

248 } else {
249 this_cpu_inc(dev->dstats->tx_drps);
250 }
251
252 return ret;
253}
254
255/* modelled after ip_finish_output2 */
1/*
2 * vrf.c: device driver to encapsulate a VRF space
3 *
4 * Copyright (c) 2015 Cumulus Networks. All rights reserved.
5 * Copyright (c) 2015 Shrijeet Mukherjee <shm@cumulusnetworks.com>
6 * Copyright (c) 2015 David Ahern <dsa@cumulusnetworks.com>
7 *
8 * Based on dummy, team and ipvlan drivers

--- 239 unchanged lines hidden (view full) ---

248 } else {
249 this_cpu_inc(dev->dstats->tx_drps);
250 }
251
252 return ret;
253}
254
255/* modelled after ip_finish_output2 */
256static int vrf_finish_output(struct sock *sk, struct sk_buff *skb)
256static int vrf_finish_output(struct net *net, struct sock *sk, struct sk_buff *skb)
257{
258 struct dst_entry *dst = skb_dst(skb);
259 struct rtable *rt = (struct rtable *)dst;
260 struct net_device *dev = dst->dev;
261 unsigned int hh_len = LL_RESERVED_SPACE(dev);
262 struct neighbour *neigh;
263 u32 nexthop;
264 int ret = -EINVAL;

--- 449 unchanged lines hidden ---
257{
258 struct dst_entry *dst = skb_dst(skb);
259 struct rtable *rt = (struct rtable *)dst;
260 struct net_device *dev = dst->dev;
261 unsigned int hh_len = LL_RESERVED_SPACE(dev);
262 struct neighbour *neigh;
263 u32 nexthop;
264 int ret = -EINVAL;

--- 449 unchanged lines hidden ---