/*-
* GPL LICENSE SUMMARY
*
- * Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
.fops = &kni_fops,
};
-/* Array of the kni supported PCI device ids */
-static struct pci_device_id kni_pci_ids[] = {
- /* EM and IGB to be supported in future */
- //#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {PCI_DEVICE(vend, dev)},
- #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {PCI_DEVICE(vend, dev)},
- #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {PCI_DEVICE(vend, dev)},
- #include <rte_pci_dev_ids.h>
- { 0, },
-};
-
-MODULE_DEVICE_TABLE(pci, kni_pci_ids);
-
/* loopback mode */
static char *lo_mode = NULL;
return 0;
}
-static int
-kni_check_pci_device_id(uint16_t vendor_id, uint16_t device_id)
-{
- int i, total = sizeof(kni_pci_ids)/sizeof(struct pci_device_id);
- struct pci_device_id *p;
-
- /* Check if the vendor id/device id are supported */
- for (i = 0; i < total; i++) {
- p = &kni_pci_ids[i];
- if (p->vendor != vendor_id && p->vendor != PCI_ANY_ID)
- continue;
- if (p->device != device_id && p->device != PCI_ANY_ID)
- continue;
- return 0;
- }
-
- return -1;
-}
-
static int
kni_ioctl_create(unsigned int ioctl_num, unsigned long ioctl_param)
{
return -EIO;
}
- /* Check if the PCI id is supported by KNI */
- ret = kni_check_pci_device_id(dev_info.vendor_id, dev_info.device_id);
- if (ret < 0) {
- KNI_ERR("Invalid vendor_id: %x or device_id: %x\n",
- dev_info.vendor_id, dev_info.device_id);
- return -EINVAL;
- }
-
net_dev = alloc_netdev(sizeof(struct kni_dev), dev_info.name,
kni_net_init);
if (net_dev == NULL) {
kni->mbuf_size = dev_info.mbuf_size;
KNI_PRINT("tx_phys: 0x%016llx, tx_q addr: 0x%p\n",
- dev_info.tx_phys, kni->tx_q);
+ (unsigned long long) dev_info.tx_phys, kni->tx_q);
KNI_PRINT("rx_phys: 0x%016llx, rx_q addr: 0x%p\n",
- dev_info.rx_phys, kni->rx_q);
+ (unsigned long long) dev_info.rx_phys, kni->rx_q);
KNI_PRINT("alloc_phys: 0x%016llx, alloc_q addr: 0x%p\n",
- dev_info.alloc_phys, kni->alloc_q);
+ (unsigned long long) dev_info.alloc_phys, kni->alloc_q);
KNI_PRINT("free_phys: 0x%016llx, free_q addr: 0x%p\n",
- dev_info.free_phys, kni->free_q);
+ (unsigned long long) dev_info.free_phys, kni->free_q);
KNI_PRINT("req_phys: 0x%016llx, req_q addr: 0x%p\n",
- dev_info.req_phys, kni->req_q);
+ (unsigned long long) dev_info.req_phys, kni->req_q);
KNI_PRINT("resp_phys: 0x%016llx, resp_q addr: 0x%p\n",
- dev_info.resp_phys, kni->resp_q);
+ (unsigned long long) dev_info.resp_phys, kni->resp_q);
KNI_PRINT("mbuf_phys: 0x%016llx, mbuf_kva: 0x%p\n",
- dev_info.mbuf_phys, kni->mbuf_kva);
+ (unsigned long long) dev_info.mbuf_phys, kni->mbuf_kva);
KNI_PRINT("mbuf_va: 0x%p\n", dev_info.mbuf_va);
KNI_PRINT("mbuf_size: %u\n", kni->mbuf_size);