View | Details | Raw Unified | Return to bug 221530
Collapse All | Expand All

(-)b/sys/dev/ixl/if_ixl.c (+6 lines)
Lines 215-220 TUNABLE_INT("hw.ixl.tx_itr", &ixl_tx_itr); Link Here
215
SYSCTL_INT(_hw_ixl, OID_AUTO, tx_itr, CTLFLAG_RDTUN,
215
SYSCTL_INT(_hw_ixl, OID_AUTO, tx_itr, CTLFLAG_RDTUN,
216
    &ixl_tx_itr, 0, "TX Interrupt Rate");
216
    &ixl_tx_itr, 0, "TX Interrupt Rate");
217
217
218
static int ixl_hw_lldp = 1;
219
TUNABLE_INT("hw.ixl.hw_lldp", &ixl_hw_lldp);
220
SYSCTL_INT(_hw_ixl, OID_AUTO, hw_lldp, CTLFLAG_RDTUN,
221
     &ixl_hw_lldp, 0, "Handle LLDP by NIC");
222
218
#ifdef IXL_IW
223
#ifdef IXL_IW
219
int ixl_enable_iwarp = 0;
224
int ixl_enable_iwarp = 0;
220
TUNABLE_INT("hw.ixl.enable_iwarp", &ixl_enable_iwarp);
225
TUNABLE_INT("hw.ixl.enable_iwarp", &ixl_enable_iwarp);
Lines 315-320 ixl_save_pf_tunables(struct ixl_pf *pf) Link Here
315
	pf->dynamic_tx_itr = ixl_dynamic_tx_itr;
320
	pf->dynamic_tx_itr = ixl_dynamic_tx_itr;
316
	pf->dbg_mask = ixl_core_debug_mask;
321
	pf->dbg_mask = ixl_core_debug_mask;
317
	pf->hw.debug_mask = ixl_shared_debug_mask;
322
	pf->hw.debug_mask = ixl_shared_debug_mask;
323
	pf->hw_lldp = ixl_hw_lldp;
318
324
319
	if (ixl_ring_size < IXL_MIN_RING
325
	if (ixl_ring_size < IXL_MIN_RING
320
	     || ixl_ring_size > IXL_MAX_RING
326
	     || ixl_ring_size > IXL_MAX_RING
(-)b/sys/dev/ixl/ixl_pf.h (+1 lines)
Lines 100-105 struct ixl_pf { Link Here
100
	int			dynamic_tx_itr;
100
	int			dynamic_tx_itr;
101
	int			tx_itr;
101
	int			tx_itr;
102
	int			rx_itr;
102
	int			rx_itr;
103
	int			hw_lldp;
103
104
104
	struct mtx		pf_mtx;
105
	struct mtx		pf_mtx;
105
106
(-)b/sys/dev/ixl/ixl_pf_main.c (+41 lines)
Lines 62-67 static int ixl_sysctl_show_fw(SYSCTL_HANDLER_ARGS); Link Here
62
static int	ixl_sysctl_unallocated_queues(SYSCTL_HANDLER_ARGS);
62
static int	ixl_sysctl_unallocated_queues(SYSCTL_HANDLER_ARGS);
63
static int	ixl_sysctl_pf_tx_itr(SYSCTL_HANDLER_ARGS);
63
static int	ixl_sysctl_pf_tx_itr(SYSCTL_HANDLER_ARGS);
64
static int	ixl_sysctl_pf_rx_itr(SYSCTL_HANDLER_ARGS);
64
static int	ixl_sysctl_pf_rx_itr(SYSCTL_HANDLER_ARGS);
65
static int	ixl_sysctl_pf_lldp(SYSCTL_HANDLER_ARGS);
65
66
66
/* Debug Sysctls */
67
/* Debug Sysctls */
67
static int 	ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS);
68
static int 	ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS);
Lines 2714-2719 ixl_sysctl_pf_rx_itr(SYSCTL_HANDLER_ARGS) Link Here
2714
	return (error);
2715
	return (error);
2715
}
2716
}
2716
2717
2718
/*
2719
 * Used to set the Rx ITR value for all of the PF LAN VSI's queues.
2720
 * Writes to the ITR registers immediately.
2721
 */
2722
static int
2723
ixl_sysctl_pf_lldp(SYSCTL_HANDLER_ARGS)
2724
{
2725
	struct ixl_pf *pf = (struct ixl_pf *)arg1;
2726
	struct i40e_hw *hw = &pf->hw;
2727
	device_t dev = pf->dev;
2728
	int error = 0;
2729
	int requested_lldp_status;
2730
2731
	requested_lldp_status = pf->hw_lldp;
2732
	error = sysctl_handle_int(oidp, &requested_lldp_status, 0, req);
2733
	if ((error) || (req->newptr == NULL))
2734
		return (error);
2735
	if (requested_lldp_status < 0 || requested_lldp_status > 1 ) {
2736
		device_printf(dev, "Invalid lldp value; value must be 0 or 1\n");
2737
		return (EINVAL);
2738
	}
2739
2740
	if (pf->hw_lldp == requested_lldp_status)
2741
		return (error);
2742
2743
	if (!requested_lldp_status) {
2744
		i40e_aq_stop_lldp(hw, FALSE, NULL);
2745
	} else {
2746
		i40e_aq_start_lldp(hw, NULL);
2747
	}
2748
2749
	pf->hw_lldp = requested_lldp_status;
2750
	return (error);
2751
}
2752
2717
void
2753
void
2718
ixl_add_hw_stats(struct ixl_pf *pf)
2754
ixl_add_hw_stats(struct ixl_pf *pf)
2719
{
2755
{
Lines 4292-4297 ixl_add_device_sysctls(struct ixl_pf *pf) Link Here
4292
	    OID_AUTO, "dynamic_tx_itr", CTLFLAG_RW,
4328
	    OID_AUTO, "dynamic_tx_itr", CTLFLAG_RW,
4293
	    &pf->dynamic_tx_itr, 0, "Enable dynamic TX ITR");
4329
	    &pf->dynamic_tx_itr, 0, "Enable dynamic TX ITR");
4294
4330
4331
	SYSCTL_ADD_PROC(ctx, ctx_list,
4332
	    OID_AUTO, "hw_lldp", CTLTYPE_INT | CTLFLAG_RW,
4333
	    pf, 0, ixl_sysctl_pf_lldp, "I",
4334
	    "Handle LLDP by the NIC");
4335
4295
	/* Add FEC sysctls for 25G adapters */
4336
	/* Add FEC sysctls for 25G adapters */
4296
	/*
4337
	/*
4297
	 * XXX: These settings can be changed, but that isn't supported,
4338
	 * XXX: These settings can be changed, but that isn't supported,

Return to bug 221530