2 * vrf.c: device driver to encapsulate a VRF space
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>
8 * Based on dummy, team and ipvlan drivers
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
16 #include <linux/module.h>
17 #include <linux/kernel.h>
18 #include <linux/netdevice.h>
19 #include <linux/etherdevice.h>
21 #include <linux/init.h>
22 #include <linux/moduleparam.h>
23 #include <linux/netfilter.h>
24 #include <linux/rtnetlink.h>
25 #include <net/rtnetlink.h>
26 #include <linux/u64_stats_sync.h>
27 #include <linux/hashtable.h>
29 #include <linux/inetdevice.h>
32 #include <net/ip_fib.h>
33 #include <net/ip6_fib.h>
34 #include <net/ip6_route.h>
35 #include <net/rtnetlink.h>
36 #include <net/route.h>
37 #include <net/addrconf.h>
38 #include <net/l3mdev.h>
40 #define RT_FL_TOS(oldflp4) \
41 ((oldflp4)->flowi4_tos & (IPTOS_RT_MASK | RTO_ONLINK))
43 #define DRV_NAME "vrf"
44 #define DRV_VERSION "1.0"
46 #define vrf_master_get_rcu(dev) \
47 ((struct net_device *)rcu_dereference(dev->rx_handler_data))
50 struct list_head list;
51 struct net_device *dev;
55 struct list_head all_slaves;
59 struct slave_queue queue;
71 struct u64_stats_sync syncp;
74 /* neighbor handling is done with actual device; do not want
75 * to flip skb->dev for those ndisc packets. This really fails
76 * for multiple next protocols (e.g., NEXTHDR_HOP). But it is
79 #if IS_ENABLED(CONFIG_IPV6)
80 static bool check_ipv6_frame(const struct sk_buff *skb)
82 const struct ipv6hdr *ipv6h;
83 struct ipv6hdr _ipv6h;
86 ipv6h = skb_header_pointer(skb, 0, sizeof(_ipv6h), &_ipv6h);
90 if (ipv6h->nexthdr == NEXTHDR_ICMP) {
91 const struct icmp6hdr *icmph;
92 struct icmp6hdr _icmph;
94 icmph = skb_header_pointer(skb, sizeof(_ipv6h),
95 sizeof(_icmph), &_icmph);
99 switch (icmph->icmp6_type) {
100 case NDISC_ROUTER_SOLICITATION:
101 case NDISC_ROUTER_ADVERTISEMENT:
102 case NDISC_NEIGHBOUR_SOLICITATION:
103 case NDISC_NEIGHBOUR_ADVERTISEMENT:
114 static bool check_ipv6_frame(const struct sk_buff *skb)
120 static bool is_ip_rx_frame(struct sk_buff *skb)
122 switch (skb->protocol) {
123 case htons(ETH_P_IP):
125 case htons(ETH_P_IPV6):
126 return check_ipv6_frame(skb);
131 static void vrf_tx_error(struct net_device *vrf_dev, struct sk_buff *skb)
133 vrf_dev->stats.tx_errors++;
137 /* note: already called with rcu_read_lock */
138 static rx_handler_result_t vrf_handle_frame(struct sk_buff **pskb)
140 struct sk_buff *skb = *pskb;
142 if (is_ip_rx_frame(skb)) {
143 struct net_device *dev = vrf_master_get_rcu(skb->dev);
144 struct pcpu_dstats *dstats = this_cpu_ptr(dev->dstats);
146 u64_stats_update_begin(&dstats->syncp);
148 dstats->rx_bytes += skb->len;
149 u64_stats_update_end(&dstats->syncp);
153 return RX_HANDLER_ANOTHER;
155 return RX_HANDLER_PASS;
158 static struct rtnl_link_stats64 *vrf_get_stats64(struct net_device *dev,
159 struct rtnl_link_stats64 *stats)
163 for_each_possible_cpu(i) {
164 const struct pcpu_dstats *dstats;
165 u64 tbytes, tpkts, tdrops, rbytes, rpkts;
168 dstats = per_cpu_ptr(dev->dstats, i);
170 start = u64_stats_fetch_begin_irq(&dstats->syncp);
171 tbytes = dstats->tx_bytes;
172 tpkts = dstats->tx_pkts;
173 tdrops = dstats->tx_drps;
174 rbytes = dstats->rx_bytes;
175 rpkts = dstats->rx_pkts;
176 } while (u64_stats_fetch_retry_irq(&dstats->syncp, start));
177 stats->tx_bytes += tbytes;
178 stats->tx_packets += tpkts;
179 stats->tx_dropped += tdrops;
180 stats->rx_bytes += rbytes;
181 stats->rx_packets += rpkts;
186 #if IS_ENABLED(CONFIG_IPV6)
187 static netdev_tx_t vrf_process_v6_outbound(struct sk_buff *skb,
188 struct net_device *dev)
190 const struct ipv6hdr *iph = ipv6_hdr(skb);
191 struct net *net = dev_net(skb->dev);
192 struct flowi6 fl6 = {
193 /* needed to match OIF rule */
194 .flowi6_oif = dev->ifindex,
195 .flowi6_iif = LOOPBACK_IFINDEX,
198 .flowlabel = ip6_flowinfo(iph),
199 .flowi6_mark = skb->mark,
200 .flowi6_proto = iph->nexthdr,
201 .flowi6_flags = FLOWI_FLAG_L3MDEV_SRC | FLOWI_FLAG_SKIP_NH_OIF,
203 int ret = NET_XMIT_DROP;
204 struct dst_entry *dst;
205 struct dst_entry *dst_null = &net->ipv6.ip6_null_entry->dst;
207 dst = ip6_route_output(net, NULL, &fl6);
212 skb_dst_set(skb, dst);
214 ret = ip6_local_out(net, skb->sk, skb);
215 if (unlikely(net_xmit_eval(ret)))
216 dev->stats.tx_errors++;
218 ret = NET_XMIT_SUCCESS;
222 vrf_tx_error(dev, skb);
223 return NET_XMIT_DROP;
226 static netdev_tx_t vrf_process_v6_outbound(struct sk_buff *skb,
227 struct net_device *dev)
229 vrf_tx_error(dev, skb);
230 return NET_XMIT_DROP;
234 static int vrf_send_v4_prep(struct sk_buff *skb, struct flowi4 *fl4,
235 struct net_device *vrf_dev)
240 rt = ip_route_output_flow(dev_net(vrf_dev), fl4, NULL);
244 /* TO-DO: what about broadcast ? */
245 if (rt->rt_type != RTN_UNICAST && rt->rt_type != RTN_LOCAL) {
251 skb_dst_set(skb, &rt->dst);
257 static netdev_tx_t vrf_process_v4_outbound(struct sk_buff *skb,
258 struct net_device *vrf_dev)
260 struct iphdr *ip4h = ip_hdr(skb);
261 int ret = NET_XMIT_DROP;
262 struct flowi4 fl4 = {
263 /* needed to match OIF rule */
264 .flowi4_oif = vrf_dev->ifindex,
265 .flowi4_iif = LOOPBACK_IFINDEX,
266 .flowi4_tos = RT_TOS(ip4h->tos),
267 .flowi4_flags = FLOWI_FLAG_ANYSRC | FLOWI_FLAG_L3MDEV_SRC |
268 FLOWI_FLAG_SKIP_NH_OIF,
269 .flowi4_proto = ip4h->protocol,
270 .daddr = ip4h->daddr,
271 .saddr = ip4h->saddr,
274 if (vrf_send_v4_prep(skb, &fl4, vrf_dev))
278 ip4h->saddr = inet_select_addr(skb_dst(skb)->dev, 0,
282 ret = ip_local_out(dev_net(skb_dst(skb)->dev), skb->sk, skb);
283 if (unlikely(net_xmit_eval(ret)))
284 vrf_dev->stats.tx_errors++;
286 ret = NET_XMIT_SUCCESS;
291 vrf_tx_error(vrf_dev, skb);
295 static netdev_tx_t is_ip_tx_frame(struct sk_buff *skb, struct net_device *dev)
297 /* strip the ethernet header added for pass through VRF device */
298 __skb_pull(skb, skb_network_offset(skb));
300 switch (skb->protocol) {
301 case htons(ETH_P_IP):
302 return vrf_process_v4_outbound(skb, dev);
303 case htons(ETH_P_IPV6):
304 return vrf_process_v6_outbound(skb, dev);
306 vrf_tx_error(dev, skb);
307 return NET_XMIT_DROP;
311 static netdev_tx_t vrf_xmit(struct sk_buff *skb, struct net_device *dev)
314 netdev_tx_t ret = is_ip_tx_frame(skb, dev);
316 if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) {
317 struct pcpu_dstats *dstats = this_cpu_ptr(dev->dstats);
319 u64_stats_update_begin(&dstats->syncp);
321 dstats->tx_bytes += len;
322 u64_stats_update_end(&dstats->syncp);
324 this_cpu_inc(dev->dstats->tx_drps);
330 #if IS_ENABLED(CONFIG_IPV6)
331 /* modelled after ip6_finish_output2 */
332 static int vrf_finish_output6(struct net *net, struct sock *sk,
335 struct dst_entry *dst = skb_dst(skb);
336 struct net_device *dev = dst->dev;
337 struct neighbour *neigh;
338 struct in6_addr *nexthop;
343 skb->protocol = htons(ETH_P_IPV6);
347 nexthop = rt6_nexthop((struct rt6_info *)dst, &ipv6_hdr(skb)->daddr);
348 neigh = __ipv6_neigh_lookup_noref(dst->dev, nexthop);
349 if (unlikely(!neigh))
350 neigh = __neigh_create(&nd_tbl, nexthop, dst->dev, false);
351 if (!IS_ERR(neigh)) {
352 ret = dst_neigh_output(dst, neigh, skb);
353 rcu_read_unlock_bh();
356 rcu_read_unlock_bh();
358 IP6_INC_STATS(dev_net(dst->dev),
359 ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES);
364 /* modelled after ip6_output */
365 static int vrf_output6(struct net *net, struct sock *sk, struct sk_buff *skb)
367 return NF_HOOK_COND(NFPROTO_IPV6, NF_INET_POST_ROUTING,
368 net, sk, skb, NULL, skb_dst(skb)->dev,
370 !(IP6CB(skb)->flags & IP6SKB_REROUTED));
373 static void vrf_rt6_release(struct net_vrf *vrf)
375 dst_release(&vrf->rt6->dst);
379 static int vrf_rt6_create(struct net_device *dev)
381 struct net_vrf *vrf = netdev_priv(dev);
382 struct net *net = dev_net(dev);
383 struct rt6_info *rt6;
386 rt6 = ip6_dst_alloc(net, dev,
387 DST_HOST | DST_NOPOLICY | DST_NOXFRM | DST_NOCACHE);
391 rt6->dst.output = vrf_output6;
392 rt6->rt6i_table = fib6_get_table(net, vrf->tb_id);
400 static void vrf_rt6_release(struct net_vrf *vrf)
404 static int vrf_rt6_create(struct net_device *dev)
410 /* modelled after ip_finish_output2 */
411 static int vrf_finish_output(struct net *net, struct sock *sk, struct sk_buff *skb)
413 struct dst_entry *dst = skb_dst(skb);
414 struct rtable *rt = (struct rtable *)dst;
415 struct net_device *dev = dst->dev;
416 unsigned int hh_len = LL_RESERVED_SPACE(dev);
417 struct neighbour *neigh;
423 /* Be paranoid, rather than too clever. */
424 if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
425 struct sk_buff *skb2;
427 skb2 = skb_realloc_headroom(skb, LL_RESERVED_SPACE(dev));
433 skb_set_owner_w(skb2, skb->sk);
441 nexthop = (__force u32)rt_nexthop(rt, ip_hdr(skb)->daddr);
442 neigh = __ipv4_neigh_lookup_noref(dev, nexthop);
443 if (unlikely(!neigh))
444 neigh = __neigh_create(&arp_tbl, &nexthop, dev, false);
445 if (!IS_ERR(neigh)) {
446 ret = dst_neigh_output(dst, neigh, skb);
447 rcu_read_unlock_bh();
451 rcu_read_unlock_bh();
453 vrf_tx_error(skb->dev, skb);
457 static int vrf_output(struct net *net, struct sock *sk, struct sk_buff *skb)
459 struct net_device *dev = skb_dst(skb)->dev;
461 IP_UPD_PO_STATS(net, IPSTATS_MIB_OUT, skb->len);
464 skb->protocol = htons(ETH_P_IP);
466 return NF_HOOK_COND(NFPROTO_IPV4, NF_INET_POST_ROUTING,
467 net, sk, skb, NULL, dev,
469 !(IPCB(skb)->flags & IPSKB_REROUTED));
472 static void vrf_rtable_release(struct net_vrf *vrf)
474 struct dst_entry *dst = (struct dst_entry *)vrf->rth;
480 static struct rtable *vrf_rtable_create(struct net_device *dev)
482 struct net_vrf *vrf = netdev_priv(dev);
485 rth = rt_dst_alloc(dev, 0, RTN_UNICAST, 1, 1, 0);
487 rth->dst.output = vrf_output;
488 rth->rt_table_id = vrf->tb_id;
494 /**************************** device handling ********************/
496 /* cycle interface to flush neighbor cache and move routes across tables */
497 static void cycle_netdev(struct net_device *dev)
499 unsigned int flags = dev->flags;
502 if (!netif_running(dev))
505 ret = dev_change_flags(dev, flags & ~IFF_UP);
507 ret = dev_change_flags(dev, flags);
511 "Failed to cycle device %s; route tables might be wrong!\n",
516 static struct slave *__vrf_find_slave_dev(struct slave_queue *queue,
517 struct net_device *dev)
519 struct list_head *head = &queue->all_slaves;
522 list_for_each_entry(slave, head, list) {
523 if (slave->dev == dev)
530 /* inverse of __vrf_insert_slave */
531 static void __vrf_remove_slave(struct slave_queue *queue, struct slave *slave)
533 list_del(&slave->list);
536 static void __vrf_insert_slave(struct slave_queue *queue, struct slave *slave)
538 list_add(&slave->list, &queue->all_slaves);
541 static int do_vrf_add_slave(struct net_device *dev, struct net_device *port_dev)
543 struct slave *slave = kzalloc(sizeof(*slave), GFP_KERNEL);
544 struct net_vrf *vrf = netdev_priv(dev);
545 struct slave_queue *queue = &vrf->queue;
551 slave->dev = port_dev;
553 /* register the packet handler for slave ports */
554 ret = netdev_rx_handler_register(port_dev, vrf_handle_frame, dev);
557 "Device %s failed to register rx_handler\n",
562 ret = netdev_master_upper_dev_link(port_dev, dev);
566 port_dev->priv_flags |= IFF_L3MDEV_SLAVE;
567 __vrf_insert_slave(queue, slave);
568 cycle_netdev(port_dev);
573 netdev_rx_handler_unregister(port_dev);
579 static int vrf_add_slave(struct net_device *dev, struct net_device *port_dev)
581 if (netif_is_l3_master(port_dev) || netif_is_l3_slave(port_dev))
584 return do_vrf_add_slave(dev, port_dev);
587 /* inverse of do_vrf_add_slave */
588 static int do_vrf_del_slave(struct net_device *dev, struct net_device *port_dev)
590 struct net_vrf *vrf = netdev_priv(dev);
591 struct slave_queue *queue = &vrf->queue;
594 netdev_upper_dev_unlink(port_dev, dev);
595 port_dev->priv_flags &= ~IFF_L3MDEV_SLAVE;
597 netdev_rx_handler_unregister(port_dev);
599 cycle_netdev(port_dev);
601 slave = __vrf_find_slave_dev(queue, port_dev);
603 __vrf_remove_slave(queue, slave);
610 static int vrf_del_slave(struct net_device *dev, struct net_device *port_dev)
612 return do_vrf_del_slave(dev, port_dev);
615 static void vrf_dev_uninit(struct net_device *dev)
617 struct net_vrf *vrf = netdev_priv(dev);
618 // struct slave_queue *queue = &vrf->queue;
619 // struct list_head *head = &queue->all_slaves;
620 // struct slave *slave, *next;
622 vrf_rtable_release(vrf);
623 vrf_rt6_release(vrf);
625 // list_for_each_entry_safe(slave, next, head, list)
626 // vrf_del_slave(dev, slave->dev);
628 free_percpu(dev->dstats);
632 static int vrf_dev_init(struct net_device *dev)
634 struct net_vrf *vrf = netdev_priv(dev);
636 INIT_LIST_HEAD(&vrf->queue.all_slaves);
638 dev->dstats = netdev_alloc_pcpu_stats(struct pcpu_dstats);
642 /* create the default dst which points back to us */
643 vrf->rth = vrf_rtable_create(dev);
647 if (vrf_rt6_create(dev) != 0)
650 dev->flags = IFF_MASTER | IFF_NOARP;
655 vrf_rtable_release(vrf);
657 free_percpu(dev->dstats);
663 static const struct net_device_ops vrf_netdev_ops = {
664 .ndo_init = vrf_dev_init,
665 .ndo_uninit = vrf_dev_uninit,
666 .ndo_start_xmit = vrf_xmit,
667 .ndo_get_stats64 = vrf_get_stats64,
668 .ndo_add_slave = vrf_add_slave,
669 .ndo_del_slave = vrf_del_slave,
672 static u32 vrf_fib_table(const struct net_device *dev)
674 struct net_vrf *vrf = netdev_priv(dev);
679 static struct rtable *vrf_get_rtable(const struct net_device *dev,
680 const struct flowi4 *fl4)
682 struct rtable *rth = NULL;
684 if (!(fl4->flowi4_flags & FLOWI_FLAG_L3MDEV_SRC)) {
685 struct net_vrf *vrf = netdev_priv(dev);
694 /* called under rcu_read_lock */
695 static int vrf_get_saddr(struct net_device *dev, struct flowi4 *fl4)
697 struct fib_result res = { .tclassid = 0 };
698 struct net *net = dev_net(dev);
699 u32 orig_tos = fl4->flowi4_tos;
700 u8 flags = fl4->flowi4_flags;
701 u8 scope = fl4->flowi4_scope;
702 u8 tos = RT_FL_TOS(fl4);
705 if (unlikely(!fl4->daddr))
708 fl4->flowi4_flags |= FLOWI_FLAG_SKIP_NH_OIF;
709 fl4->flowi4_iif = LOOPBACK_IFINDEX;
710 fl4->flowi4_tos = tos & IPTOS_RT_MASK;
711 fl4->flowi4_scope = ((tos & RTO_ONLINK) ?
712 RT_SCOPE_LINK : RT_SCOPE_UNIVERSE);
714 rc = fib_lookup(net, fl4, &res, 0);
716 if (res.type == RTN_LOCAL)
717 fl4->saddr = res.fi->fib_prefsrc ? : fl4->daddr;
719 fib_select_path(net, &res, fl4, -1);
722 fl4->flowi4_flags = flags;
723 fl4->flowi4_tos = orig_tos;
724 fl4->flowi4_scope = scope;
729 #if IS_ENABLED(CONFIG_IPV6)
730 static struct dst_entry *vrf_get_rt6_dst(const struct net_device *dev,
731 const struct flowi6 *fl6)
733 struct rt6_info *rt = NULL;
735 if (!(fl6->flowi6_flags & FLOWI_FLAG_L3MDEV_SRC)) {
736 struct net_vrf *vrf = netdev_priv(dev);
742 return (struct dst_entry *)rt;
746 static const struct l3mdev_ops vrf_l3mdev_ops = {
747 .l3mdev_fib_table = vrf_fib_table,
748 .l3mdev_get_rtable = vrf_get_rtable,
749 .l3mdev_get_saddr = vrf_get_saddr,
750 #if IS_ENABLED(CONFIG_IPV6)
751 .l3mdev_get_rt6_dst = vrf_get_rt6_dst,
755 static void vrf_get_drvinfo(struct net_device *dev,
756 struct ethtool_drvinfo *info)
758 strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
759 strlcpy(info->version, DRV_VERSION, sizeof(info->version));
762 static const struct ethtool_ops vrf_ethtool_ops = {
763 .get_drvinfo = vrf_get_drvinfo,
766 static void vrf_setup(struct net_device *dev)
770 /* Initialize the device structure. */
771 dev->netdev_ops = &vrf_netdev_ops;
772 dev->l3mdev_ops = &vrf_l3mdev_ops;
773 dev->ethtool_ops = &vrf_ethtool_ops;
774 dev->destructor = free_netdev;
776 /* Fill in device structure with ethernet-generic values. */
777 eth_hw_addr_random(dev);
779 /* don't acquire vrf device's netif_tx_lock when transmitting */
780 dev->features |= NETIF_F_LLTX;
782 /* don't allow vrf devices to change network namespaces. */
783 dev->features |= NETIF_F_NETNS_LOCAL;
786 static int vrf_validate(struct nlattr *tb[], struct nlattr *data[])
788 if (tb[IFLA_ADDRESS]) {
789 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
791 if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS])))
792 return -EADDRNOTAVAIL;
797 static void vrf_dellink(struct net_device *dev, struct list_head *head)
799 struct net_vrf *vrf = netdev_priv(dev);
800 struct slave_queue *queue = &vrf->queue;
801 struct list_head *all_slaves = &queue->all_slaves;
802 struct slave *slave, *next;
804 list_for_each_entry_safe(slave, next, all_slaves, list)
805 vrf_del_slave(dev, slave->dev);
807 unregister_netdevice_queue(dev, head);
810 static int vrf_newlink(struct net *src_net, struct net_device *dev,
811 struct nlattr *tb[], struct nlattr *data[])
813 struct net_vrf *vrf = netdev_priv(dev);
815 if (!data || !data[IFLA_VRF_TABLE])
818 vrf->tb_id = nla_get_u32(data[IFLA_VRF_TABLE]);
819 if (vrf->tb_id == RT_TABLE_UNSPEC)
822 dev->priv_flags |= IFF_L3MDEV_MASTER;
824 return register_netdevice(dev);
827 static size_t vrf_nl_getsize(const struct net_device *dev)
829 return nla_total_size(sizeof(u32)); /* IFLA_VRF_TABLE */
832 static int vrf_fillinfo(struct sk_buff *skb,
833 const struct net_device *dev)
835 struct net_vrf *vrf = netdev_priv(dev);
837 return nla_put_u32(skb, IFLA_VRF_TABLE, vrf->tb_id);
840 static const struct nla_policy vrf_nl_policy[IFLA_VRF_MAX + 1] = {
841 [IFLA_VRF_TABLE] = { .type = NLA_U32 },
844 static struct rtnl_link_ops vrf_link_ops __read_mostly = {
846 .priv_size = sizeof(struct net_vrf),
848 .get_size = vrf_nl_getsize,
849 .policy = vrf_nl_policy,
850 .validate = vrf_validate,
851 .fill_info = vrf_fillinfo,
853 .newlink = vrf_newlink,
854 .dellink = vrf_dellink,
856 .maxtype = IFLA_VRF_MAX,
859 static int vrf_device_event(struct notifier_block *unused,
860 unsigned long event, void *ptr)
862 struct net_device *dev = netdev_notifier_info_to_dev(ptr);
864 /* only care about unregister events to drop slave references */
865 if (event == NETDEV_UNREGISTER) {
866 struct net_device *vrf_dev;
868 if (!netif_is_l3_slave(dev))
871 vrf_dev = netdev_master_upper_dev_get(dev);
872 vrf_del_slave(vrf_dev, dev);
878 static struct notifier_block vrf_notifier_block __read_mostly = {
879 .notifier_call = vrf_device_event,
882 static int __init vrf_init_module(void)
886 register_netdevice_notifier(&vrf_notifier_block);
888 rc = rtnl_link_register(&vrf_link_ops);
895 unregister_netdevice_notifier(&vrf_notifier_block);
899 module_init(vrf_init_module);
900 MODULE_AUTHOR("Shrijeet Mukherjee, David Ahern");
901 MODULE_DESCRIPTION("Device driver to instantiate VRF domains");
902 MODULE_LICENSE("GPL");
903 MODULE_ALIAS_RTNL_LINK(DRV_NAME);
904 MODULE_VERSION(DRV_VERSION);