vdpa_sim_net.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * VDPA simulator for networking device.
  4. *
  5. * Copyright (c) 2020, Red Hat Inc. All rights reserved.
  6. * Author: Jason Wang <jasowang@redhat.com>
  7. *
  8. */
  9. #include <linux/init.h>
  10. #include <linux/module.h>
  11. #include <linux/device.h>
  12. #include <linux/kernel.h>
  13. #include <linux/etherdevice.h>
  14. #include <linux/vringh.h>
  15. #include <linux/vdpa.h>
  16. #include <net/netlink.h>
  17. #include <uapi/linux/virtio_net.h>
  18. #include <uapi/linux/vdpa.h>
  19. #include "vdpa_sim.h"
  20. #define DRV_VERSION "0.1"
  21. #define DRV_AUTHOR "Jason Wang <jasowang@redhat.com>"
  22. #define DRV_DESC "vDPA Device Simulator for networking device"
  23. #define DRV_LICENSE "GPL v2"
  24. #define VDPASIM_NET_FEATURES (VDPASIM_FEATURES | \
  25. (1ULL << VIRTIO_NET_F_MAC) | \
  26. (1ULL << VIRTIO_NET_F_STATUS) | \
  27. (1ULL << VIRTIO_NET_F_MTU) | \
  28. (1ULL << VIRTIO_NET_F_CTRL_VQ) | \
  29. (1ULL << VIRTIO_NET_F_CTRL_MAC_ADDR))
  30. /* 3 virtqueues, 2 address spaces, 2 virtqueue groups */
  31. #define VDPASIM_NET_VQ_NUM 3
  32. #define VDPASIM_NET_AS_NUM 2
  33. #define VDPASIM_NET_GROUP_NUM 2
  34. struct vdpasim_dataq_stats {
  35. struct u64_stats_sync syncp;
  36. u64 pkts;
  37. u64 bytes;
  38. u64 drops;
  39. u64 errors;
  40. u64 overruns;
  41. };
  42. struct vdpasim_cq_stats {
  43. struct u64_stats_sync syncp;
  44. u64 requests;
  45. u64 successes;
  46. u64 errors;
  47. };
  48. struct vdpasim_net{
  49. struct vdpasim vdpasim;
  50. struct vdpasim_dataq_stats tx_stats;
  51. struct vdpasim_dataq_stats rx_stats;
  52. struct vdpasim_cq_stats cq_stats;
  53. void *buffer;
  54. };
  55. static struct vdpasim_net *sim_to_net(struct vdpasim *vdpasim)
  56. {
  57. return container_of(vdpasim, struct vdpasim_net, vdpasim);
  58. }
  59. static void vdpasim_net_complete(struct vdpasim_virtqueue *vq, size_t len)
  60. {
  61. /* Make sure data is wrote before advancing index */
  62. smp_wmb();
  63. vringh_complete_iotlb(&vq->vring, vq->head, len);
  64. /* Make sure used is visible before rasing the interrupt. */
  65. smp_wmb();
  66. local_bh_disable();
  67. if (vringh_need_notify_iotlb(&vq->vring) > 0)
  68. vringh_notify(&vq->vring);
  69. local_bh_enable();
  70. }
  71. static bool receive_filter(struct vdpasim *vdpasim, size_t len)
  72. {
  73. bool modern = vdpasim->features & (1ULL << VIRTIO_F_VERSION_1);
  74. size_t hdr_len = modern ? sizeof(struct virtio_net_hdr_v1) :
  75. sizeof(struct virtio_net_hdr);
  76. struct virtio_net_config *vio_config = vdpasim->config;
  77. struct vdpasim_net *net = sim_to_net(vdpasim);
  78. if (len < ETH_ALEN + hdr_len)
  79. return false;
  80. if (is_broadcast_ether_addr(net->buffer + hdr_len) ||
  81. is_multicast_ether_addr(net->buffer + hdr_len))
  82. return true;
  83. if (!strncmp(net->buffer + hdr_len, vio_config->mac, ETH_ALEN))
  84. return true;
  85. return false;
  86. }
  87. static virtio_net_ctrl_ack vdpasim_handle_ctrl_mac(struct vdpasim *vdpasim,
  88. u8 cmd)
  89. {
  90. struct virtio_net_config *vio_config = vdpasim->config;
  91. struct vdpasim_virtqueue *cvq = &vdpasim->vqs[2];
  92. virtio_net_ctrl_ack status = VIRTIO_NET_ERR;
  93. size_t read;
  94. switch (cmd) {
  95. case VIRTIO_NET_CTRL_MAC_ADDR_SET:
  96. read = vringh_iov_pull_iotlb(&cvq->vring, &cvq->in_iov,
  97. vio_config->mac, ETH_ALEN);
  98. if (read == ETH_ALEN)
  99. status = VIRTIO_NET_OK;
  100. break;
  101. default:
  102. break;
  103. }
  104. return status;
  105. }
  106. static void vdpasim_handle_cvq(struct vdpasim *vdpasim)
  107. {
  108. struct vdpasim_virtqueue *cvq = &vdpasim->vqs[2];
  109. struct vdpasim_net *net = sim_to_net(vdpasim);
  110. virtio_net_ctrl_ack status = VIRTIO_NET_ERR;
  111. struct virtio_net_ctrl_hdr ctrl;
  112. size_t read, write;
  113. u64 requests = 0, errors = 0, successes = 0;
  114. int err;
  115. if (!(vdpasim->features & (1ULL << VIRTIO_NET_F_CTRL_VQ)))
  116. return;
  117. if (!cvq->ready)
  118. return;
  119. while (true) {
  120. err = vringh_getdesc_iotlb(&cvq->vring, &cvq->in_iov,
  121. &cvq->out_iov,
  122. &cvq->head, GFP_ATOMIC);
  123. if (err <= 0)
  124. break;
  125. ++requests;
  126. read = vringh_iov_pull_iotlb(&cvq->vring, &cvq->in_iov, &ctrl,
  127. sizeof(ctrl));
  128. if (read != sizeof(ctrl)) {
  129. ++errors;
  130. break;
  131. }
  132. switch (ctrl.class) {
  133. case VIRTIO_NET_CTRL_MAC:
  134. status = vdpasim_handle_ctrl_mac(vdpasim, ctrl.cmd);
  135. break;
  136. default:
  137. break;
  138. }
  139. if (status == VIRTIO_NET_OK)
  140. ++successes;
  141. else
  142. ++errors;
  143. /* Make sure data is wrote before advancing index */
  144. smp_wmb();
  145. write = vringh_iov_push_iotlb(&cvq->vring, &cvq->out_iov,
  146. &status, sizeof(status));
  147. vringh_complete_iotlb(&cvq->vring, cvq->head, write);
  148. vringh_kiov_cleanup(&cvq->in_iov);
  149. vringh_kiov_cleanup(&cvq->out_iov);
  150. /* Make sure used is visible before rasing the interrupt. */
  151. smp_wmb();
  152. local_bh_disable();
  153. if (cvq->cb)
  154. cvq->cb(cvq->private);
  155. local_bh_enable();
  156. }
  157. u64_stats_update_begin(&net->cq_stats.syncp);
  158. net->cq_stats.requests += requests;
  159. net->cq_stats.errors += errors;
  160. net->cq_stats.successes += successes;
  161. u64_stats_update_end(&net->cq_stats.syncp);
  162. }
  163. static void vdpasim_net_work(struct vdpasim *vdpasim)
  164. {
  165. struct vdpasim_virtqueue *txq = &vdpasim->vqs[1];
  166. struct vdpasim_virtqueue *rxq = &vdpasim->vqs[0];
  167. struct vdpasim_net *net = sim_to_net(vdpasim);
  168. ssize_t read, write;
  169. u64 tx_pkts = 0, rx_pkts = 0, tx_bytes = 0, rx_bytes = 0;
  170. u64 rx_drops = 0, rx_overruns = 0, rx_errors = 0, tx_errors = 0;
  171. int err;
  172. mutex_lock(&vdpasim->mutex);
  173. if (!vdpasim->running)
  174. goto out;
  175. if (!(vdpasim->status & VIRTIO_CONFIG_S_DRIVER_OK))
  176. goto out;
  177. vdpasim_handle_cvq(vdpasim);
  178. if (!txq->ready || !rxq->ready)
  179. goto out;
  180. while (true) {
  181. err = vringh_getdesc_iotlb(&txq->vring, &txq->out_iov, NULL,
  182. &txq->head, GFP_ATOMIC);
  183. if (err <= 0) {
  184. if (err)
  185. ++tx_errors;
  186. break;
  187. }
  188. ++tx_pkts;
  189. read = vringh_iov_pull_iotlb(&txq->vring, &txq->out_iov,
  190. net->buffer, PAGE_SIZE);
  191. tx_bytes += read;
  192. if (!receive_filter(vdpasim, read)) {
  193. ++rx_drops;
  194. vdpasim_net_complete(txq, 0);
  195. continue;
  196. }
  197. err = vringh_getdesc_iotlb(&rxq->vring, NULL, &rxq->in_iov,
  198. &rxq->head, GFP_ATOMIC);
  199. if (err <= 0) {
  200. ++rx_overruns;
  201. vdpasim_net_complete(txq, 0);
  202. break;
  203. }
  204. write = vringh_iov_push_iotlb(&rxq->vring, &rxq->in_iov,
  205. net->buffer, read);
  206. if (write <= 0) {
  207. ++rx_errors;
  208. break;
  209. }
  210. ++rx_pkts;
  211. rx_bytes += write;
  212. vdpasim_net_complete(txq, 0);
  213. vdpasim_net_complete(rxq, write);
  214. if (tx_pkts > 4) {
  215. vdpasim_schedule_work(vdpasim);
  216. goto out;
  217. }
  218. }
  219. out:
  220. mutex_unlock(&vdpasim->mutex);
  221. u64_stats_update_begin(&net->tx_stats.syncp);
  222. net->tx_stats.pkts += tx_pkts;
  223. net->tx_stats.bytes += tx_bytes;
  224. net->tx_stats.errors += tx_errors;
  225. u64_stats_update_end(&net->tx_stats.syncp);
  226. u64_stats_update_begin(&net->rx_stats.syncp);
  227. net->rx_stats.pkts += rx_pkts;
  228. net->rx_stats.bytes += rx_bytes;
  229. net->rx_stats.drops += rx_drops;
  230. net->rx_stats.errors += rx_errors;
  231. net->rx_stats.overruns += rx_overruns;
  232. u64_stats_update_end(&net->rx_stats.syncp);
  233. }
  234. static int vdpasim_net_get_stats(struct vdpasim *vdpasim, u16 idx,
  235. struct sk_buff *msg,
  236. struct netlink_ext_ack *extack)
  237. {
  238. struct vdpasim_net *net = sim_to_net(vdpasim);
  239. u64 rx_pkts, rx_bytes, rx_errors, rx_overruns, rx_drops;
  240. u64 tx_pkts, tx_bytes, tx_errors, tx_drops;
  241. u64 cq_requests, cq_successes, cq_errors;
  242. unsigned int start;
  243. int err = -EMSGSIZE;
  244. switch(idx) {
  245. case 0:
  246. do {
  247. start = u64_stats_fetch_begin(&net->rx_stats.syncp);
  248. rx_pkts = net->rx_stats.pkts;
  249. rx_bytes = net->rx_stats.bytes;
  250. rx_errors = net->rx_stats.errors;
  251. rx_overruns = net->rx_stats.overruns;
  252. rx_drops = net->rx_stats.drops;
  253. } while (u64_stats_fetch_retry(&net->rx_stats.syncp, start));
  254. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  255. "rx packets"))
  256. break;
  257. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  258. rx_pkts, VDPA_ATTR_PAD))
  259. break;
  260. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  261. "rx bytes"))
  262. break;
  263. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  264. rx_bytes, VDPA_ATTR_PAD))
  265. break;
  266. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  267. "rx errors"))
  268. break;
  269. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  270. rx_errors, VDPA_ATTR_PAD))
  271. break;
  272. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  273. "rx overruns"))
  274. break;
  275. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  276. rx_overruns, VDPA_ATTR_PAD))
  277. break;
  278. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  279. "rx drops"))
  280. break;
  281. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  282. rx_drops, VDPA_ATTR_PAD))
  283. break;
  284. err = 0;
  285. break;
  286. case 1:
  287. do {
  288. start = u64_stats_fetch_begin(&net->tx_stats.syncp);
  289. tx_pkts = net->tx_stats.pkts;
  290. tx_bytes = net->tx_stats.bytes;
  291. tx_errors = net->tx_stats.errors;
  292. tx_drops = net->tx_stats.drops;
  293. } while (u64_stats_fetch_retry(&net->tx_stats.syncp, start));
  294. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  295. "tx packets"))
  296. break;
  297. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  298. tx_pkts, VDPA_ATTR_PAD))
  299. break;
  300. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  301. "tx bytes"))
  302. break;
  303. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  304. tx_bytes, VDPA_ATTR_PAD))
  305. break;
  306. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  307. "tx errors"))
  308. break;
  309. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  310. tx_errors, VDPA_ATTR_PAD))
  311. break;
  312. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  313. "tx drops"))
  314. break;
  315. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  316. tx_drops, VDPA_ATTR_PAD))
  317. break;
  318. err = 0;
  319. break;
  320. case 2:
  321. do {
  322. start = u64_stats_fetch_begin(&net->cq_stats.syncp);
  323. cq_requests = net->cq_stats.requests;
  324. cq_successes = net->cq_stats.successes;
  325. cq_errors = net->cq_stats.errors;
  326. } while (u64_stats_fetch_retry(&net->cq_stats.syncp, start));
  327. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  328. "cvq requests"))
  329. break;
  330. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  331. cq_requests, VDPA_ATTR_PAD))
  332. break;
  333. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  334. "cvq successes"))
  335. break;
  336. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  337. cq_successes, VDPA_ATTR_PAD))
  338. break;
  339. if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME,
  340. "cvq errors"))
  341. break;
  342. if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,
  343. cq_errors, VDPA_ATTR_PAD))
  344. break;
  345. err = 0;
  346. break;
  347. default:
  348. err = -EINVAL;
  349. break;
  350. }
  351. return err;
  352. }
  353. static void vdpasim_net_get_config(struct vdpasim *vdpasim, void *config)
  354. {
  355. struct virtio_net_config *net_config = config;
  356. net_config->status = cpu_to_vdpasim16(vdpasim, VIRTIO_NET_S_LINK_UP);
  357. }
  358. static int vdpasim_net_set_attr(struct vdpa_mgmt_dev *mdev, struct vdpa_device *dev,
  359. const struct vdpa_dev_set_config *config)
  360. {
  361. struct vdpasim *vdpasim = container_of(dev, struct vdpasim, vdpa);
  362. struct virtio_net_config *vio_config = vdpasim->config;
  363. mutex_lock(&vdpasim->mutex);
  364. if (config->mask & (1 << VDPA_ATTR_DEV_NET_CFG_MACADDR)) {
  365. ether_addr_copy(vio_config->mac, config->net.mac);
  366. mutex_unlock(&vdpasim->mutex);
  367. return 0;
  368. }
  369. mutex_unlock(&vdpasim->mutex);
  370. return -EOPNOTSUPP;
  371. }
  372. static void vdpasim_net_setup_config(struct vdpasim *vdpasim,
  373. const struct vdpa_dev_set_config *config)
  374. {
  375. struct virtio_net_config *vio_config = vdpasim->config;
  376. if (config->mask & (1 << VDPA_ATTR_DEV_NET_CFG_MACADDR))
  377. memcpy(vio_config->mac, config->net.mac, ETH_ALEN);
  378. if (config->mask & (1 << VDPA_ATTR_DEV_NET_CFG_MTU))
  379. vio_config->mtu = cpu_to_vdpasim16(vdpasim, config->net.mtu);
  380. else
  381. /* Setup default MTU to be 1500 */
  382. vio_config->mtu = cpu_to_vdpasim16(vdpasim, 1500);
  383. }
  384. static void vdpasim_net_free(struct vdpasim *vdpasim)
  385. {
  386. struct vdpasim_net *net = sim_to_net(vdpasim);
  387. kvfree(net->buffer);
  388. }
  389. static void vdpasim_net_mgmtdev_release(struct device *dev)
  390. {
  391. }
  392. static struct device vdpasim_net_mgmtdev = {
  393. .init_name = "vdpasim_net",
  394. .release = vdpasim_net_mgmtdev_release,
  395. };
  396. static int vdpasim_net_dev_add(struct vdpa_mgmt_dev *mdev, const char *name,
  397. const struct vdpa_dev_set_config *config)
  398. {
  399. struct vdpasim_dev_attr dev_attr = {};
  400. struct vdpasim_net *net;
  401. struct vdpasim *simdev;
  402. int ret;
  403. dev_attr.mgmt_dev = mdev;
  404. dev_attr.name = name;
  405. dev_attr.id = VIRTIO_ID_NET;
  406. dev_attr.supported_features = VDPASIM_NET_FEATURES;
  407. dev_attr.nvqs = VDPASIM_NET_VQ_NUM;
  408. dev_attr.ngroups = VDPASIM_NET_GROUP_NUM;
  409. dev_attr.nas = VDPASIM_NET_AS_NUM;
  410. dev_attr.alloc_size = sizeof(struct vdpasim_net);
  411. dev_attr.config_size = sizeof(struct virtio_net_config);
  412. dev_attr.get_config = vdpasim_net_get_config;
  413. dev_attr.work_fn = vdpasim_net_work;
  414. dev_attr.get_stats = vdpasim_net_get_stats;
  415. dev_attr.free = vdpasim_net_free;
  416. simdev = vdpasim_create(&dev_attr, config);
  417. if (IS_ERR(simdev))
  418. return PTR_ERR(simdev);
  419. vdpasim_net_setup_config(simdev, config);
  420. net = sim_to_net(simdev);
  421. u64_stats_init(&net->tx_stats.syncp);
  422. u64_stats_init(&net->rx_stats.syncp);
  423. u64_stats_init(&net->cq_stats.syncp);
  424. net->buffer = kvmalloc(PAGE_SIZE, GFP_KERNEL);
  425. if (!net->buffer) {
  426. ret = -ENOMEM;
  427. goto reg_err;
  428. }
  429. /*
  430. * Initialization must be completed before this call, since it can
  431. * connect the device to the vDPA bus, so requests can arrive after
  432. * this call.
  433. */
  434. ret = _vdpa_register_device(&simdev->vdpa, VDPASIM_NET_VQ_NUM);
  435. if (ret)
  436. goto reg_err;
  437. return 0;
  438. reg_err:
  439. put_device(&simdev->vdpa.dev);
  440. return ret;
  441. }
  442. static void vdpasim_net_dev_del(struct vdpa_mgmt_dev *mdev,
  443. struct vdpa_device *dev)
  444. {
  445. struct vdpasim *simdev = container_of(dev, struct vdpasim, vdpa);
  446. _vdpa_unregister_device(&simdev->vdpa);
  447. }
  448. static const struct vdpa_mgmtdev_ops vdpasim_net_mgmtdev_ops = {
  449. .dev_add = vdpasim_net_dev_add,
  450. .dev_del = vdpasim_net_dev_del,
  451. .dev_set_attr = vdpasim_net_set_attr
  452. };
  453. static struct virtio_device_id id_table[] = {
  454. { VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID },
  455. { 0 },
  456. };
  457. static struct vdpa_mgmt_dev mgmt_dev = {
  458. .device = &vdpasim_net_mgmtdev,
  459. .id_table = id_table,
  460. .ops = &vdpasim_net_mgmtdev_ops,
  461. .config_attr_mask = (1 << VDPA_ATTR_DEV_NET_CFG_MACADDR |
  462. 1 << VDPA_ATTR_DEV_NET_CFG_MTU |
  463. 1 << VDPA_ATTR_DEV_FEATURES),
  464. .max_supported_vqs = VDPASIM_NET_VQ_NUM,
  465. .supported_features = VDPASIM_NET_FEATURES,
  466. };
  467. static int __init vdpasim_net_init(void)
  468. {
  469. int ret;
  470. ret = device_register(&vdpasim_net_mgmtdev);
  471. if (ret) {
  472. put_device(&vdpasim_net_mgmtdev);
  473. return ret;
  474. }
  475. ret = vdpa_mgmtdev_register(&mgmt_dev);
  476. if (ret)
  477. goto parent_err;
  478. return 0;
  479. parent_err:
  480. device_unregister(&vdpasim_net_mgmtdev);
  481. return ret;
  482. }
  483. static void __exit vdpasim_net_exit(void)
  484. {
  485. vdpa_mgmtdev_unregister(&mgmt_dev);
  486. device_unregister(&vdpasim_net_mgmtdev);
  487. }
  488. module_init(vdpasim_net_init);
  489. module_exit(vdpasim_net_exit);
  490. MODULE_VERSION(DRV_VERSION);
  491. MODULE_LICENSE(DRV_LICENSE);
  492. MODULE_AUTHOR(DRV_AUTHOR);
  493. MODULE_DESCRIPTION(DRV_DESC);