l3mdev.h (d66f6c0a8f3c0bcc4ee7a9b1da4b0ebe7ee555a3) | l3mdev.h (8a966fc016b67d2a8ab4a83d22ded8cde032a0eb) |
---|---|
1/* 2 * include/net/l3mdev.h - L3 master device API 3 * Copyright (c) 2015 Cumulus Networks 4 * Copyright (c) 2015 David Ahern <dsa@cumulusnetworks.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 29 unchanged lines hidden (view full) --- 38 39 /* IPv4 ops */ 40 struct rtable * (*l3mdev_get_rtable)(const struct net_device *dev, 41 const struct flowi4 *fl4); 42 43 /* IPv6 ops */ 44 struct dst_entry * (*l3mdev_link_scope_lookup)(const struct net_device *dev, 45 struct flowi6 *fl6); | 1/* 2 * include/net/l3mdev.h - L3 master device API 3 * Copyright (c) 2015 Cumulus Networks 4 * Copyright (c) 2015 David Ahern <dsa@cumulusnetworks.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 29 unchanged lines hidden (view full) --- 38 39 /* IPv4 ops */ 40 struct rtable * (*l3mdev_get_rtable)(const struct net_device *dev, 41 const struct flowi4 *fl4); 42 43 /* IPv6 ops */ 44 struct dst_entry * (*l3mdev_link_scope_lookup)(const struct net_device *dev, 45 struct flowi6 *fl6); |
46 int (*l3mdev_get_saddr6)(struct net_device *dev, 47 const struct sock *sk, 48 struct flowi6 *fl6); | |
49}; 50 51#ifdef CONFIG_NET_L3_MASTER_DEV 52 53int l3mdev_fib_rule_match(struct net *net, struct flowi *fl, 54 struct fib_lookup_arg *arg); 55 56void l3mdev_update_flow(struct net *net, struct flowi *fl); --- 110 unchanged lines hidden (view full) --- 167 rc = netif_is_l3_master(dev); 168 169 rcu_read_unlock(); 170 171 return rc; 172} 173 174struct dst_entry *l3mdev_link_scope_lookup(struct net *net, struct flowi6 *fl6); | 46}; 47 48#ifdef CONFIG_NET_L3_MASTER_DEV 49 50int l3mdev_fib_rule_match(struct net *net, struct flowi *fl, 51 struct fib_lookup_arg *arg); 52 53void l3mdev_update_flow(struct net *net, struct flowi *fl); --- 110 unchanged lines hidden (view full) --- 164 rc = netif_is_l3_master(dev); 165 166 rcu_read_unlock(); 167 168 return rc; 169} 170 171struct dst_entry *l3mdev_link_scope_lookup(struct net *net, struct flowi6 *fl6); |
175int l3mdev_get_saddr6(struct net *net, const struct sock *sk, 176 struct flowi6 *fl6); | |
177 178static inline 179struct sk_buff *l3mdev_l3_rcv(struct sk_buff *skb, u16 proto) 180{ 181 struct net_device *master = NULL; 182 183 if (netif_is_l3_slave(skb->dev)) 184 master = netdev_master_upper_dev_get_rcu(skb->dev); --- 102 unchanged lines hidden (view full) --- 287} 288 289static inline 290struct dst_entry *l3mdev_link_scope_lookup(struct net *net, struct flowi6 *fl6) 291{ 292 return NULL; 293} 294 | 172 173static inline 174struct sk_buff *l3mdev_l3_rcv(struct sk_buff *skb, u16 proto) 175{ 176 struct net_device *master = NULL; 177 178 if (netif_is_l3_slave(skb->dev)) 179 master = netdev_master_upper_dev_get_rcu(skb->dev); --- 102 unchanged lines hidden (view full) --- 282} 283 284static inline 285struct dst_entry *l3mdev_link_scope_lookup(struct net *net, struct flowi6 *fl6) 286{ 287 return NULL; 288} 289 |
295static inline int l3mdev_get_saddr6(struct net *net, const struct sock *sk, 296 struct flowi6 *fl6) 297{ 298 return 0; 299} 300 | |
301static inline 302struct sk_buff *l3mdev_ip_rcv(struct sk_buff *skb) 303{ 304 return skb; 305} 306 307static inline 308struct sk_buff *l3mdev_ip6_rcv(struct sk_buff *skb) --- 29 unchanged lines hidden --- | 290static inline 291struct sk_buff *l3mdev_ip_rcv(struct sk_buff *skb) 292{ 293 return skb; 294} 295 296static inline 297struct sk_buff *l3mdev_ip6_rcv(struct sk_buff *skb) --- 29 unchanged lines hidden --- |