kni: allow configuring thread granularity
[dpdk.git] / kernel / linux / kni / kni_dev.h
index ca5f92a..a2c6d9f 100644 (file)
 #include <linux/list.h>
 
 #include <rte_kni_common.h>
-#define KNI_KTHREAD_RESCHEDULE_INTERVAL 5 /* us */
+#define KNI_KTHREAD_MAX_RESCHEDULE_INTERVAL 1000000 /* us */
 
 #define MBUF_BURST_SZ 32
 
 /* Default carrier state for created KNI network interfaces */
 extern uint32_t kni_dflt_carrier;
 
+/* Request processing support for bifurcated drivers. */
+extern uint32_t bifurcated_support;
+
 /**
  * A structure describing the private information for a kni device.
  */
@@ -101,8 +104,13 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk,
        offset = iova & (PAGE_SIZE - 1);
 
        /* Read one page struct info */
+#ifdef HAVE_TSK_IN_GUP
        ret = get_user_pages_remote(tsk, tsk->mm, iova, 1,
                                    FOLL_TOUCH, &page, NULL, NULL);
+#else
+       ret = get_user_pages_remote(tsk->mm, iova, 1,
+                                   FOLL_TOUCH, &page, NULL, NULL);
+#endif
        if (ret < 0)
                return 0;