Imported Upstream version 16.04
[deb_dpdk.git] / lib / librte_eal / linuxapp / kni / kni_net.c
1 /*-
2  * GPL LICENSE SUMMARY
3  *
4  *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
5  *
6  *   This program is free software; you can redistribute it and/or modify
7  *   it under the terms of version 2 of the GNU General Public License as
8  *   published by the Free Software Foundation.
9  *
10  *   This program is distributed in the hope that it will be useful, but
11  *   WITHOUT ANY WARRANTY; without even the implied warranty of
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  *   General Public License for more details.
14  *
15  *   You should have received a copy of the GNU General Public License
16  *   along with this program; if not, write to the Free Software
17  *   Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18  *   The full GNU General Public License is included in this distribution
19  *   in the file called LICENSE.GPL.
20  *
21  *   Contact Information:
22  *   Intel Corporation
23  */
24
25 /*
26  * This code is inspired from the book "Linux Device Drivers" by
27  * Alessandro Rubini and Jonathan Corbet, published by O'Reilly & Associates
28  */
29
30 #include <linux/device.h>
31 #include <linux/module.h>
32 #include <linux/version.h>
33 #include <linux/netdevice.h>
34 #include <linux/etherdevice.h> /* eth_type_trans */
35 #include <linux/skbuff.h>
36 #include <linux/kthread.h>
37 #include <linux/delay.h>
38
39 #include <exec-env/rte_kni_common.h>
40 #include <kni_fifo.h>
41 #include "kni_dev.h"
42
43 #define WD_TIMEOUT 5 /*jiffies */
44
45 #define MBUF_BURST_SZ 32
46
47 #define KNI_WAIT_RESPONSE_TIMEOUT 300 /* 3 seconds */
48
49 /* typedef for rx function */
50 typedef void (*kni_net_rx_t)(struct kni_dev *kni);
51
52 static int kni_net_tx(struct sk_buff *skb, struct net_device *dev);
53 static void kni_net_rx_normal(struct kni_dev *kni);
54 static void kni_net_rx_lo_fifo(struct kni_dev *kni);
55 static void kni_net_rx_lo_fifo_skb(struct kni_dev *kni);
56 static int kni_net_process_request(struct kni_dev *kni,
57                         struct rte_kni_request *req);
58
59 /* kni rx function pointer, with default to normal rx */
60 static kni_net_rx_t kni_net_rx_func = kni_net_rx_normal;
61
62 /*
63  * Open and close
64  */
65 static int
66 kni_net_open(struct net_device *dev)
67 {
68         int ret;
69         struct rte_kni_request req;
70         struct kni_dev *kni = netdev_priv(dev);
71
72         if (kni->lad_dev)
73                 memcpy(dev->dev_addr, kni->lad_dev->dev_addr, ETH_ALEN);
74         else
75                 /*
76                  * Generate random mac address. eth_random_addr() is the newer
77                  * version of generating mac address in linux kernel.
78                  */
79                 random_ether_addr(dev->dev_addr);
80
81         netif_start_queue(dev);
82
83         memset(&req, 0, sizeof(req));
84         req.req_id = RTE_KNI_REQ_CFG_NETWORK_IF;
85
86         /* Setting if_up to non-zero means up */
87         req.if_up = 1;
88         ret = kni_net_process_request(kni, &req);
89
90         return (ret == 0) ? req.result : ret;
91 }
92
93 static int
94 kni_net_release(struct net_device *dev)
95 {
96         int ret;
97         struct rte_kni_request req;
98         struct kni_dev *kni = netdev_priv(dev);
99
100         netif_stop_queue(dev); /* can't transmit any more */
101
102         memset(&req, 0, sizeof(req));
103         req.req_id = RTE_KNI_REQ_CFG_NETWORK_IF;
104
105         /* Setting if_up to 0 means down */
106         req.if_up = 0;
107         ret = kni_net_process_request(kni, &req);
108
109         return (ret == 0) ? req.result : ret;
110 }
111
112 /*
113  * Configuration changes (passed on by ifconfig)
114  */
115 static int
116 kni_net_config(struct net_device *dev, struct ifmap *map)
117 {
118         if (dev->flags & IFF_UP) /* can't act on a running interface */
119                 return -EBUSY;
120
121         /* ignore other fields */
122         return 0;
123 }
124
125 /*
126  * RX: normal working mode
127  */
128 static void
129 kni_net_rx_normal(struct kni_dev *kni)
130 {
131         unsigned ret;
132         uint32_t len;
133         unsigned i, num_rx, num_fq;
134         struct rte_kni_mbuf *kva;
135         struct rte_kni_mbuf *va[MBUF_BURST_SZ];
136         void * data_kva;
137
138         struct sk_buff *skb;
139         struct net_device *dev = kni->net_dev;
140
141         /* Get the number of free entries in free_q */
142         num_fq = kni_fifo_free_count(kni->free_q);
143         if (num_fq == 0) {
144                 /* No room on the free_q, bail out */
145                 return;
146         }
147
148         /* Calculate the number of entries to dequeue from rx_q */
149         num_rx = min(num_fq, (unsigned)MBUF_BURST_SZ);
150
151         /* Burst dequeue from rx_q */
152         num_rx = kni_fifo_get(kni->rx_q, (void **)va, num_rx);
153         if (num_rx == 0)
154                 return;
155
156         /* Transfer received packets to netif */
157         for (i = 0; i < num_rx; i++) {
158                 kva = (void *)va[i] - kni->mbuf_va + kni->mbuf_kva;
159                 len = kva->data_len;
160                 data_kva = kva->buf_addr + kva->data_off - kni->mbuf_va
161                                 + kni->mbuf_kva;
162
163                 skb = dev_alloc_skb(len + 2);
164                 if (!skb) {
165                         KNI_ERR("Out of mem, dropping pkts\n");
166                         /* Update statistics */
167                         kni->stats.rx_dropped++;
168                 }
169                 else {
170                         /* Align IP on 16B boundary */
171                         skb_reserve(skb, 2);
172                         memcpy(skb_put(skb, len), data_kva, len);
173                         skb->dev = dev;
174                         skb->protocol = eth_type_trans(skb, dev);
175                         skb->ip_summed = CHECKSUM_UNNECESSARY;
176
177                         /* Call netif interface */
178                         netif_rx_ni(skb);
179
180                         /* Update statistics */
181                         kni->stats.rx_bytes += len;
182                         kni->stats.rx_packets++;
183                 }
184         }
185
186         /* Burst enqueue mbufs into free_q */
187         ret = kni_fifo_put(kni->free_q, (void **)va, num_rx);
188         if (ret != num_rx)
189                 /* Failing should not happen */
190                 KNI_ERR("Fail to enqueue entries into free_q\n");
191 }
192
193 /*
194  * RX: loopback with enqueue/dequeue fifos.
195  */
196 static void
197 kni_net_rx_lo_fifo(struct kni_dev *kni)
198 {
199         unsigned ret;
200         uint32_t len;
201         unsigned i, num, num_rq, num_tq, num_aq, num_fq;
202         struct rte_kni_mbuf *kva;
203         struct rte_kni_mbuf *va[MBUF_BURST_SZ];
204         void * data_kva;
205
206         struct rte_kni_mbuf *alloc_kva;
207         struct rte_kni_mbuf *alloc_va[MBUF_BURST_SZ];
208         void *alloc_data_kva;
209
210         /* Get the number of entries in rx_q */
211         num_rq = kni_fifo_count(kni->rx_q);
212
213         /* Get the number of free entrie in tx_q */
214         num_tq = kni_fifo_free_count(kni->tx_q);
215
216         /* Get the number of entries in alloc_q */
217         num_aq = kni_fifo_count(kni->alloc_q);
218
219         /* Get the number of free entries in free_q */
220         num_fq = kni_fifo_free_count(kni->free_q);
221
222         /* Calculate the number of entries to be dequeued from rx_q */
223         num = min(num_rq, num_tq);
224         num = min(num, num_aq);
225         num = min(num, num_fq);
226         num = min(num, (unsigned)MBUF_BURST_SZ);
227
228         /* Return if no entry to dequeue from rx_q */
229         if (num == 0)
230                 return;
231
232         /* Burst dequeue from rx_q */
233         ret = kni_fifo_get(kni->rx_q, (void **)va, num);
234         if (ret == 0)
235                 return; /* Failing should not happen */
236
237         /* Dequeue entries from alloc_q */
238         ret = kni_fifo_get(kni->alloc_q, (void **)alloc_va, num);
239         if (ret) {
240                 num = ret;
241                 /* Copy mbufs */
242                 for (i = 0; i < num; i++) {
243                         kva = (void *)va[i] - kni->mbuf_va + kni->mbuf_kva;
244                         len = kva->pkt_len;
245                         data_kva = kva->buf_addr + kva->data_off -
246                                         kni->mbuf_va + kni->mbuf_kva;
247
248                         alloc_kva = (void *)alloc_va[i] - kni->mbuf_va +
249                                                         kni->mbuf_kva;
250                         alloc_data_kva = alloc_kva->buf_addr +
251                                         alloc_kva->data_off - kni->mbuf_va +
252                                                         kni->mbuf_kva;
253                         memcpy(alloc_data_kva, data_kva, len);
254                         alloc_kva->pkt_len = len;
255                         alloc_kva->data_len = len;
256
257                         kni->stats.tx_bytes += len;
258                         kni->stats.rx_bytes += len;
259                 }
260
261                 /* Burst enqueue mbufs into tx_q */
262                 ret = kni_fifo_put(kni->tx_q, (void **)alloc_va, num);
263                 if (ret != num)
264                         /* Failing should not happen */
265                         KNI_ERR("Fail to enqueue mbufs into tx_q\n");
266         }
267
268         /* Burst enqueue mbufs into free_q */
269         ret = kni_fifo_put(kni->free_q, (void **)va, num);
270         if (ret != num)
271                 /* Failing should not happen */
272                 KNI_ERR("Fail to enqueue mbufs into free_q\n");
273
274         /**
275          * Update statistic, and enqueue/dequeue failure is impossible,
276          * as all queues are checked at first.
277          */
278         kni->stats.tx_packets += num;
279         kni->stats.rx_packets += num;
280 }
281
282 /*
283  * RX: loopback with enqueue/dequeue fifos and sk buffer copies.
284  */
285 static void
286 kni_net_rx_lo_fifo_skb(struct kni_dev *kni)
287 {
288         unsigned ret;
289         uint32_t len;
290         unsigned i, num_rq, num_fq, num;
291         struct rte_kni_mbuf *kva;
292         struct rte_kni_mbuf *va[MBUF_BURST_SZ];
293         void * data_kva;
294
295         struct sk_buff *skb;
296         struct net_device *dev = kni->net_dev;
297
298         /* Get the number of entries in rx_q */
299         num_rq = kni_fifo_count(kni->rx_q);
300
301         /* Get the number of free entries in free_q */
302         num_fq = kni_fifo_free_count(kni->free_q);
303
304         /* Calculate the number of entries to dequeue from rx_q */
305         num = min(num_rq, num_fq);
306         num = min(num, (unsigned)MBUF_BURST_SZ);
307
308         /* Return if no entry to dequeue from rx_q */
309         if (num == 0)
310                 return;
311
312         /* Burst dequeue mbufs from rx_q */
313         ret = kni_fifo_get(kni->rx_q, (void **)va, num);
314         if (ret == 0)
315                 return;
316
317         /* Copy mbufs to sk buffer and then call tx interface */
318         for (i = 0; i < num; i++) {
319                 kva = (void *)va[i] - kni->mbuf_va + kni->mbuf_kva;
320                 len = kva->data_len;
321                 data_kva = kva->buf_addr + kva->data_off - kni->mbuf_va +
322                                 kni->mbuf_kva;
323
324                 skb = dev_alloc_skb(len + 2);
325                 if (skb == NULL)
326                         KNI_ERR("Out of mem, dropping pkts\n");
327                 else {
328                         /* Align IP on 16B boundary */
329                         skb_reserve(skb, 2);
330                         memcpy(skb_put(skb, len), data_kva, len);
331                         skb->dev = dev;
332                         skb->ip_summed = CHECKSUM_UNNECESSARY;
333                         dev_kfree_skb(skb);
334                 }
335
336                 /* Simulate real usage, allocate/copy skb twice */
337                 skb = dev_alloc_skb(len + 2);
338                 if (skb == NULL) {
339                         KNI_ERR("Out of mem, dropping pkts\n");
340                         kni->stats.rx_dropped++;
341                 }
342                 else {
343                         /* Align IP on 16B boundary */
344                         skb_reserve(skb, 2);
345                         memcpy(skb_put(skb, len), data_kva, len);
346                         skb->dev = dev;
347                         skb->ip_summed = CHECKSUM_UNNECESSARY;
348
349                         kni->stats.rx_bytes += len;
350                         kni->stats.rx_packets++;
351
352                         /* call tx interface */
353                         kni_net_tx(skb, dev);
354                 }
355         }
356
357         /* enqueue all the mbufs from rx_q into free_q */
358         ret = kni_fifo_put(kni->free_q, (void **)&va, num);
359         if (ret != num)
360                 /* Failing should not happen */
361                 KNI_ERR("Fail to enqueue mbufs into free_q\n");
362 }
363
364 /* rx interface */
365 void
366 kni_net_rx(struct kni_dev *kni)
367 {
368         /**
369          * It doesn't need to check if it is NULL pointer,
370          * as it has a default value
371          */
372         (*kni_net_rx_func)(kni);
373 }
374
375 /*
376  * Transmit a packet (called by the kernel)
377  */
378 #ifdef RTE_KNI_VHOST
379 static int
380 kni_net_tx(struct sk_buff *skb, struct net_device *dev)
381 {
382         struct kni_dev *kni = netdev_priv(dev);
383
384         dev_kfree_skb(skb);
385         kni->stats.tx_dropped++;
386
387         return NETDEV_TX_OK;
388 }
389 #else
390 static int
391 kni_net_tx(struct sk_buff *skb, struct net_device *dev)
392 {
393         int len = 0;
394         unsigned ret;
395         struct kni_dev *kni = netdev_priv(dev);
396         struct rte_kni_mbuf *pkt_kva = NULL;
397         struct rte_kni_mbuf *pkt_va = NULL;
398
399         dev->trans_start = jiffies; /* save the timestamp */
400
401         /* Check if the length of skb is less than mbuf size */
402         if (skb->len > kni->mbuf_size)
403                 goto drop;
404
405         /**
406          * Check if it has at least one free entry in tx_q and
407          * one entry in alloc_q.
408          */
409         if (kni_fifo_free_count(kni->tx_q) == 0 ||
410                         kni_fifo_count(kni->alloc_q) == 0) {
411                 /**
412                  * If no free entry in tx_q or no entry in alloc_q,
413                  * drops skb and goes out.
414                  */
415                 goto drop;
416         }
417
418         /* dequeue a mbuf from alloc_q */
419         ret = kni_fifo_get(kni->alloc_q, (void **)&pkt_va, 1);
420         if (likely(ret == 1)) {
421                 void *data_kva;
422
423                 pkt_kva = (void *)pkt_va - kni->mbuf_va + kni->mbuf_kva;
424                 data_kva = pkt_kva->buf_addr + pkt_kva->data_off - kni->mbuf_va
425                                 + kni->mbuf_kva;
426
427                 len = skb->len;
428                 memcpy(data_kva, skb->data, len);
429                 if (unlikely(len < ETH_ZLEN)) {
430                         memset(data_kva + len, 0, ETH_ZLEN - len);
431                         len = ETH_ZLEN;
432                 }
433                 pkt_kva->pkt_len = len;
434                 pkt_kva->data_len = len;
435
436                 /* enqueue mbuf into tx_q */
437                 ret = kni_fifo_put(kni->tx_q, (void **)&pkt_va, 1);
438                 if (unlikely(ret != 1)) {
439                         /* Failing should not happen */
440                         KNI_ERR("Fail to enqueue mbuf into tx_q\n");
441                         goto drop;
442                 }
443         } else {
444                 /* Failing should not happen */
445                 KNI_ERR("Fail to dequeue mbuf from alloc_q\n");
446                 goto drop;
447         }
448
449         /* Free skb and update statistics */
450         dev_kfree_skb(skb);
451         kni->stats.tx_bytes += len;
452         kni->stats.tx_packets++;
453
454         return NETDEV_TX_OK;
455
456 drop:
457         /* Free skb and update statistics */
458         dev_kfree_skb(skb);
459         kni->stats.tx_dropped++;
460
461         return NETDEV_TX_OK;
462 }
463 #endif
464
465 /*
466  * Deal with a transmit timeout.
467  */
468 static void
469 kni_net_tx_timeout (struct net_device *dev)
470 {
471         struct kni_dev *kni = netdev_priv(dev);
472
473         KNI_DBG("Transmit timeout at %ld, latency %ld\n", jiffies,
474                         jiffies - dev->trans_start);
475
476         kni->stats.tx_errors++;
477         netif_wake_queue(dev);
478         return;
479 }
480
481 /*
482  * Ioctl commands
483  */
484 static int
485 kni_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
486 {
487         KNI_DBG("kni_net_ioctl %d\n",
488                 ((struct kni_dev *)netdev_priv(dev))->group_id);
489
490         return 0;
491 }
492
493 static void
494 kni_net_set_rx_mode(struct net_device *dev)
495 {
496 }
497
498 static int
499 kni_net_change_mtu(struct net_device *dev, int new_mtu)
500 {
501         int ret;
502         struct rte_kni_request req;
503         struct kni_dev *kni = netdev_priv(dev);
504
505         KNI_DBG("kni_net_change_mtu new mtu %d to be set\n", new_mtu);
506
507         memset(&req, 0, sizeof(req));
508         req.req_id = RTE_KNI_REQ_CHANGE_MTU;
509         req.new_mtu = new_mtu;
510         ret = kni_net_process_request(kni, &req);
511         if (ret == 0 && req.result == 0)
512                 dev->mtu = new_mtu;
513
514         return (ret == 0) ? req.result : ret;
515 }
516
517 /*
518  * Checks if the user space application provided the resp message
519  */
520 void
521 kni_net_poll_resp(struct kni_dev *kni)
522 {
523         if (kni_fifo_count(kni->resp_q))
524                 wake_up_interruptible(&kni->wq);
525 }
526
527 /*
528  * It can be called to process the request.
529  */
530 static int
531 kni_net_process_request(struct kni_dev *kni, struct rte_kni_request *req)
532 {
533         int ret = -1;
534         void *resp_va;
535         unsigned num;
536         int ret_val;
537
538         if (!kni || !req) {
539                 KNI_ERR("No kni instance or request\n");
540                 return -EINVAL;
541         }
542
543         mutex_lock(&kni->sync_lock);
544
545         /* Construct data */
546         memcpy(kni->sync_kva, req, sizeof(struct rte_kni_request));
547         num = kni_fifo_put(kni->req_q, &kni->sync_va, 1);
548         if (num < 1) {
549                 KNI_ERR("Cannot send to req_q\n");
550                 ret = -EBUSY;
551                 goto fail;
552         }
553
554         ret_val = wait_event_interruptible_timeout(kni->wq,
555                         kni_fifo_count(kni->resp_q), 3 * HZ);
556         if (signal_pending(current) || ret_val <= 0) {
557                 ret = -ETIME;
558                 goto fail;
559         }
560         num = kni_fifo_get(kni->resp_q, (void **)&resp_va, 1);
561         if (num != 1 || resp_va != kni->sync_va) {
562                 /* This should never happen */
563                 KNI_ERR("No data in resp_q\n");
564                 ret = -ENODATA;
565                 goto fail;
566         }
567
568         memcpy(req, kni->sync_kva, sizeof(struct rte_kni_request));
569         ret = 0;
570
571 fail:
572         mutex_unlock(&kni->sync_lock);
573         return ret;
574 }
575
576 /*
577  * Return statistics to the caller
578  */
579 static struct net_device_stats *
580 kni_net_stats(struct net_device *dev)
581 {
582         struct kni_dev *kni = netdev_priv(dev);
583         return &kni->stats;
584 }
585
586 /*
587  *  Fill the eth header
588  */
589 static int
590 kni_net_header(struct sk_buff *skb, struct net_device *dev,
591                 unsigned short type, const void *daddr,
592                 const void *saddr, unsigned int len)
593 {
594         struct ethhdr *eth = (struct ethhdr *) skb_push(skb, ETH_HLEN);
595
596         memcpy(eth->h_source, saddr ? saddr : dev->dev_addr, dev->addr_len);
597         memcpy(eth->h_dest,   daddr ? daddr : dev->dev_addr, dev->addr_len);
598         eth->h_proto = htons(type);
599
600         return dev->hard_header_len;
601 }
602
603
604 /*
605  * Re-fill the eth header
606  */
607 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
608 static int
609 kni_net_rebuild_header(struct sk_buff *skb)
610 {
611         struct net_device *dev = skb->dev;
612         struct ethhdr *eth = (struct ethhdr *) skb->data;
613
614         memcpy(eth->h_source, dev->dev_addr, dev->addr_len);
615         memcpy(eth->h_dest, dev->dev_addr, dev->addr_len);
616
617         return 0;
618 }
619 #endif /* < 4.1.0  */
620
621 /**
622  * kni_net_set_mac - Change the Ethernet Address of the KNI NIC
623  * @netdev: network interface device structure
624  * @p: pointer to an address structure
625  *
626  * Returns 0 on success, negative on failure
627  **/
628 static int kni_net_set_mac(struct net_device *netdev, void *p)
629 {
630         struct sockaddr *addr = p;
631         if (!is_valid_ether_addr((unsigned char *)(addr->sa_data)))
632                 return -EADDRNOTAVAIL;
633         memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
634         return 0;
635 }
636
637 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0))
638 static int kni_net_change_carrier(struct net_device *dev, bool new_carrier)
639 {
640         if (new_carrier)
641                 netif_carrier_on(dev);
642         else
643                 netif_carrier_off(dev);
644         return 0;
645 }
646 #endif
647
648 static const struct header_ops kni_net_header_ops = {
649         .create  = kni_net_header,
650 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
651         .rebuild = kni_net_rebuild_header,
652 #endif /* < 4.1.0  */
653         .cache   = NULL,  /* disable caching */
654 };
655
656 static const struct net_device_ops kni_net_netdev_ops = {
657         .ndo_open = kni_net_open,
658         .ndo_stop = kni_net_release,
659         .ndo_set_config = kni_net_config,
660         .ndo_start_xmit = kni_net_tx,
661         .ndo_change_mtu = kni_net_change_mtu,
662         .ndo_do_ioctl = kni_net_ioctl,
663         .ndo_set_rx_mode = kni_net_set_rx_mode,
664         .ndo_get_stats = kni_net_stats,
665         .ndo_tx_timeout = kni_net_tx_timeout,
666         .ndo_set_mac_address = kni_net_set_mac,
667 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0))
668         .ndo_change_carrier = kni_net_change_carrier,
669 #endif
670 };
671
672 void
673 kni_net_init(struct net_device *dev)
674 {
675         struct kni_dev *kni = netdev_priv(dev);
676
677         KNI_DBG("kni_net_init\n");
678
679         init_waitqueue_head(&kni->wq);
680         mutex_init(&kni->sync_lock);
681
682         ether_setup(dev); /* assign some of the fields */
683         dev->netdev_ops      = &kni_net_netdev_ops;
684         dev->header_ops      = &kni_net_header_ops;
685         dev->watchdog_timeo = WD_TIMEOUT;
686 }
687
688 void
689 kni_net_config_lo_mode(char *lo_str)
690 {
691         if (!lo_str) {
692                 KNI_PRINT("loopback disabled");
693                 return;
694         }
695
696         if (!strcmp(lo_str, "lo_mode_none"))
697                 KNI_PRINT("loopback disabled");
698         else if (!strcmp(lo_str, "lo_mode_fifo")) {
699                 KNI_PRINT("loopback mode=lo_mode_fifo enabled");
700                 kni_net_rx_func = kni_net_rx_lo_fifo;
701         } else if (!strcmp(lo_str, "lo_mode_fifo_skb")) {
702                 KNI_PRINT("loopback mode=lo_mode_fifo_skb enabled");
703                 kni_net_rx_func = kni_net_rx_lo_fifo_skb;
704         } else
705                 KNI_PRINT("Incognizant parameter, loopback disabled");
706 }