...
 
Commits (2)
......@@ -165,11 +165,16 @@ module_param(allow_unsupported_sfp, uint, 0);
MODULE_PARM_DESC(allow_unsupported_sfp,
"Allow unsupported and untested SFP+ modules on 82599-based adapters");
#define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)
#define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK|NETIF_MSG_HW|NETIF_MSG_TX_DONE\
|NETIF_MSG_RX_STATUS)
static int debug = -1;
module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
static bool dump = false;
module_param_named(dump_regs, dump, bool, S_IWUSR);
MODULE_PARM_DESC(dump, "Dump ixgbe descriptors");
MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>");
MODULE_DESCRIPTION("Intel(R) 10 Gigabit PCI Express Network Driver");
MODULE_LICENSE("GPL");
......@@ -5632,7 +5637,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)
unsigned int rss, fdir;
u32 fwsm;
int i;
#define NUM_HW_QUEUES 4
#define NUM_HW_QUEUES num_online_cpus()
/* PCI config space info */
hw->vendor_id = pdev->vendor;
......@@ -7248,6 +7253,10 @@ static void ixgbe_service_task(struct work_struct *work)
}
ixgbe_service_event_complete(adapter);
if (dump) {
ixgbe_dump(adapter);
dump = false;
}
}
static int ixgbe_tso(struct ixgbe_ring *tx_ring,
......
......@@ -42,8 +42,10 @@ int lcd_iommu_map_page(struct lcd *lcd, gpa_t gpa, unsigned int order,
gfn_start = gpa_to_gfn(gpa_val(gpa));
/* If domain pointer is null */
if (!lcd->domain)
if (!lcd->domain) {
LIBLCD_ERR("lcd->domain is null");
return -EINVAL;
}
for (i = 0; i < gfn_end; ++i) {
gpa_t ga = gfn_to_gpa(gfn_start + i);
......@@ -87,9 +89,9 @@ int lcd_iommu_map_page(struct lcd *lcd, gpa_t gpa, unsigned int order,
BUG_ON(ret != PAGE_SIZE);
}
if (0) {
printk("%s, mapping gpa:hpa %lx:%lx pair\n", __func__,
gpa_val(ga), hpa_val(hpa));
if (1) {
printk("%s, mapping gpa:hpa %lx:%lx pair\n", __func__,
gpa_val(ga), hpa_val(hpa));
}
/* map */
ret = iommu_map(lcd->domain, gpa_val(ga), hpa_val(hpa),
......
......@@ -391,6 +391,7 @@ static int isolated_map_vmalloc_mem(struct lcd *lcd,
#ifdef CONFIG_LVD
if (0)
LCD_MSG("%s gpa: %llx hpa: %llx", __func__, gpa, va2hpa(page_address(p)));
ret = lcd_arch_ept_map_all_cpus(lcd->lcd_arch,
gpa,
va2hpa(page_address(p)),
......@@ -458,7 +459,7 @@ static int isolated_map_contiguous_mem(struct lcd *lcd,
* caching, and we always map memory as WB in guest physical.
*/
#ifdef CONFIG_LVD
LCD_MSG("%s gpa: %llx hpa: %llx", __func__, base, hpa_base);
LCD_MSG("%s gpa: %llx hpa: %llx nr_pages:%lu", __func__, base, hpa_base, mo->nr_pages);
/* in LVD's everything is one-to-one mapping */
ret = lcd_arch_ept_map_range_all_cpus(lcd->lcd_arch,
base,
......
......@@ -32,6 +32,8 @@
#include "ixgbe_type.h"
#include "ixgbe.h"
#define NUM_HW_QUEUES 1
u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw);
s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw);
s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw);
......
......@@ -734,7 +734,7 @@ static int ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter)
* be somewhat conservative and only ask for (roughly) the same number
* of vectors as there are CPUs.
*/
vectors = min_t(int, vectors, num_online_cpus());
vectors = min_t(int, vectors, NUM_HW_QUEUES);
/* Some vectors are necessary for non-queue interrupts */
vectors += NON_Q_VECTORS;
......
......@@ -2153,7 +2153,7 @@ static bool ixgbe_add_rx_frag(struct ixgbe_ring *rx_ring,
* pages However, inside LCDs, there is no notion of reclamation. We
* just have it
*/
/* page_ref_inc(page); */
page_ref_inc(page);
return true;
}
......@@ -5848,7 +5848,6 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)
hw->subsystem_vendor_id = pdev->subsystem_vendor;
hw->subsystem_device_id = pdev->subsystem_device;
#define NUM_HW_QUEUES 1
/* XXX: This decides the number of hardware queues
* It checks the number of online cpus and sets the number of
* queues to the number of cpus. Fake it now to enable
......
......@@ -1099,7 +1099,9 @@ int ndo_start_xmit(struct sk_buff *skb,
if (0)
printk("%s:%d %s skb->q %d\n", current->comm, current->pid, __func__, skb->queue_mapping);
#ifdef CONFIG_LCD_TRACE_BUFFER
add_trace_entry(EVENT_XMIT, async_msg_get_fn_type(_request));
#endif
vmfunc_klcd_wrapper(_request, 1);
func_ret = fipc_get_reg0(_request);
......@@ -3170,7 +3172,7 @@ fail_lookup:
return ret;
}
//#define HANDLE_IRQ_LOCALLY
#define HANDLE_IRQ_LOCALLY
irqreturn_t msix_vector_handler(int irq, void *data)
{
......@@ -3195,8 +3197,9 @@ irqreturn_t msix_vector_handler(int irq, void *data)
irqret = IRQ_HANDLED;
napi_schedule_irqoff(napi_q0);
#else
#ifdef CONFIG_LCD_TRACE_BUFFER
add_trace_entry(EVENT_MSIX_HANDLER, async_msg_get_fn_type(_request));
#endif
vmfunc_klcd_wrapper(_request, 1);
irqret = fipc_get_reg0(_request);
......@@ -3259,7 +3262,7 @@ fail_alloc:
int free_irq_callee(struct fipc_message *_request)
{
unsigned int irq;
struct irqhandler_t_container *irqhandler_container;
struct irqhandler_t_container *irqhandler_container = NULL;
int ret = 0;
int i;
......@@ -3274,6 +3277,9 @@ int free_irq_callee(struct fipc_message *_request)
}
}
if (!irqhandler_container)
printk("%s unable to retrieve container data for irq %d",
__func__, irq);
free_irq(irq, irqhandler_container);
reg_irqs--;
......@@ -3307,7 +3313,9 @@ int poll(struct napi_struct *napi,
printk("%s, poll - budget %d | napi_c->other_ref %lx\n", __func__,
budget, napi_c->other_ref.cptr);
#ifdef CONFIG_LCD_TRACE_BUFFER
add_trace_entry(EVENT_SOFTIRQ_POLL, async_msg_get_fn_type(_request));
#endif
vmfunc_klcd_wrapper(_request, 1);
ret = fipc_get_reg0(_request);
......@@ -3938,7 +3946,9 @@ int napi_complete_done_callee(struct fipc_message *_request)
napi->state = fipc_get_reg2(_request);
#endif
#ifdef CONFIG_LCD_TRACE_BUFFER
add_trace_entry(EVENT_NAPI_COMPLETE_DONE, async_msg_get_fn_type(_request));
#endif
napi_complete_done(napi, work_done);
fipc_set_reg0(_request, napi->state);
......
#include <lcd_config/pre_hook.h>
#include <liblcd/liblcd.h>
#include "../ixgbe_callee.h"
#ifdef CONFIG_LCD_TRACE_BUFFER
#include <linux/lcd_trace.h>
#endif
#include <lcd_config/post_hook.h>
......@@ -32,7 +35,9 @@ int net_klcd_dispatch_async_loop(struct fipc_message *message)
int ret;
fn_type = async_msg_get_fn_type(message);
#ifdef CONFIG_LCD_TRACE_BUFFER
add_trace_entry(EVENT_VMFUNC_SBOARD_KLCD_ENTER, async_msg_get_fn_type(message));
#endif
switch (fn_type) {
case __PCI_REGISTER_DRIVER:
......@@ -341,7 +346,8 @@ int net_klcd_dispatch_async_loop(struct fipc_message *message)
}
#ifdef CONFIG_LCD_TRACE_BUFFER
add_trace_entry(EVENT_VMFUNC_SBOARD_KLCD_LEAVE, async_msg_get_fn_type(message));
#endif
return ret;
}