version 1.125.2.9, 2020/01/26 11:03:17 |
version 1.125.2.10, 2020/07/10 11:35:51 |
Line 158 const struct sysctlnode *ixv_sysctl_inst |
|
Line 158 const struct sysctlnode *ixv_sysctl_inst |
|
static const ixgbe_vendor_info_t *ixv_lookup(const struct pci_attach_args *); |
static const ixgbe_vendor_info_t *ixv_lookup(const struct pci_attach_args *); |
|
|
/************************************************************************ |
/************************************************************************ |
* FreeBSD Device Interface Entry Points |
* NetBSD Device Interface Entry Points |
************************************************************************/ |
************************************************************************/ |
CFATTACH_DECL3_NEW(ixv, sizeof(struct adapter), |
CFATTACH_DECL3_NEW(ixv, sizeof(struct adapter), |
ixv_probe, ixv_attach, ixv_detach, NULL, NULL, NULL, |
ixv_probe, ixv_attach, ixv_detach, NULL, NULL, NULL, |
Line 226 TUNABLE_INT("hw.ixv.enable_legacy_tx", & |
|
Line 226 TUNABLE_INT("hw.ixv.enable_legacy_tx", & |
|
#ifdef NET_MPSAFE |
#ifdef NET_MPSAFE |
#define IXGBE_MPSAFE 1 |
#define IXGBE_MPSAFE 1 |
#define IXGBE_CALLOUT_FLAGS CALLOUT_MPSAFE |
#define IXGBE_CALLOUT_FLAGS CALLOUT_MPSAFE |
#define IXGBE_SOFTINFT_FLAGS SOFTINT_MPSAFE |
#define IXGBE_SOFTINT_FLAGS SOFTINT_MPSAFE |
#define IXGBE_WORKQUEUE_FLAGS WQ_PERCPU | WQ_MPSAFE |
#define IXGBE_WORKQUEUE_FLAGS WQ_PERCPU | WQ_MPSAFE |
#else |
#else |
#define IXGBE_CALLOUT_FLAGS 0 |
#define IXGBE_CALLOUT_FLAGS 0 |
#define IXGBE_SOFTINFT_FLAGS 0 |
#define IXGBE_SOFTINT_FLAGS 0 |
#define IXGBE_WORKQUEUE_FLAGS WQ_PERCPU |
#define IXGBE_WORKQUEUE_FLAGS WQ_PERCPU |
#endif |
#endif |
#define IXGBE_WORKQUEUE_PRI PRI_SOFTNET |
#define IXGBE_WORKQUEUE_PRI PRI_SOFTNET |
Line 319 ixv_attach(device_t parent, device_t dev |
|
Line 319 ixv_attach(device_t parent, device_t dev |
|
|
|
/* Allocate, clear, and link in our adapter structure */ |
/* Allocate, clear, and link in our adapter structure */ |
adapter = device_private(dev); |
adapter = device_private(dev); |
adapter->dev = dev; |
|
adapter->hw.back = adapter; |
adapter->hw.back = adapter; |
|
adapter->dev = dev; |
hw = &adapter->hw; |
hw = &adapter->hw; |
|
|
adapter->init_locked = ixv_init_locked; |
adapter->init_locked = ixv_init_locked; |
Line 341 ixv_attach(device_t parent, device_t dev |
|
Line 341 ixv_attach(device_t parent, device_t dev |
|
aprint_normal(": %s, Version - %s\n", |
aprint_normal(": %s, Version - %s\n", |
ixv_strings[ent->index], ixv_driver_version); |
ixv_strings[ent->index], ixv_driver_version); |
|
|
/* Core Lock Init*/ |
/* Core Lock Init */ |
IXGBE_CORE_LOCK_INIT(adapter, device_xname(dev)); |
IXGBE_CORE_LOCK_INIT(adapter, device_xname(dev)); |
|
|
/* Do base PCI setup - map BAR0 */ |
/* Do base PCI setup - map BAR0 */ |
Line 1084 ixv_negotiate_api(struct adapter *adapte |
|
Line 1084 ixv_negotiate_api(struct adapter *adapte |
|
|
|
|
|
/************************************************************************ |
/************************************************************************ |
* ixv_set_multi - Multicast Update |
* ixv_set_rxfilter - Multicast Update |
* |
* |
* Called whenever multicast address list is updated. |
* Called whenever multicast address list is updated. |
************************************************************************/ |
************************************************************************/ |
Line 1171 ixv_set_rxfilter(struct adapter *adapter |
|
Line 1171 ixv_set_rxfilter(struct adapter *adapter |
|
ETHER_LOCK(ec); |
ETHER_LOCK(ec); |
ec->ec_flags |= ETHER_F_ALLMULTI; |
ec->ec_flags |= ETHER_F_ALLMULTI; |
ETHER_UNLOCK(ec); |
ETHER_UNLOCK(ec); |
return rc; /* Promisc might failed */ |
return rc; /* Promisc might have failed */ |
} |
} |
|
|
if (rc == 0) |
if (rc == 0) |
Line 2400 ixv_update_stats(struct adapter *adapter |
|
Line 2400 ixv_update_stats(struct adapter *adapter |
|
stats->vfgotc); |
stats->vfgotc); |
UPDATE_STAT_32(IXGBE_VFMPRC, stats->last_vfmprc, stats->vfmprc); |
UPDATE_STAT_32(IXGBE_VFMPRC, stats->last_vfmprc, stats->vfmprc); |
|
|
/* Fill out the OS statistics structure */ |
/* VF doesn't count errors by hardware */ |
/* |
|
* NetBSD: Don't override if_{i|o}{packets|bytes|mcasts} with |
|
* adapter->stats counters. It's required to make ifconfig -z |
|
* (SOICZIFDATA) work. |
|
*/ |
|
} /* ixv_update_stats */ |
} /* ixv_update_stats */ |
|
|
/************************************************************************ |
/************************************************************************ |
Line 2436 ixv_sysctl_interrupt_rate_handler(SYSCTL |
|
Line 2432 ixv_sysctl_interrupt_rate_handler(SYSCTL |
|
if (rate > 0 && rate < 500000) { |
if (rate > 0 && rate < 500000) { |
if (rate < 1000) |
if (rate < 1000) |
rate = 1000; |
rate = 1000; |
reg |= ((4000000/rate) & 0xff8); |
reg |= ((4000000 / rate) & 0xff8); |
/* |
/* |
* When RSC is used, ITR interval must be larger than |
* When RSC is used, ITR interval must be larger than |
* RSC_DELAY. Currently, we use 2us for RSC_DELAY. |
* RSC_DELAY. Currently, we use 2us for RSC_DELAY. |
Line 3262 ixv_allocate_msix(struct adapter *adapte |
|
Line 3258 ixv_allocate_msix(struct adapter *adapte |
|
|
|
#ifndef IXGBE_LEGACY_TX |
#ifndef IXGBE_LEGACY_TX |
txr->txr_si |
txr->txr_si |
= softint_establish(SOFTINT_NET | IXGBE_SOFTINFT_FLAGS, |
= softint_establish(SOFTINT_NET | IXGBE_SOFTINT_FLAGS, |
ixgbe_deferred_mq_start, txr); |
ixgbe_deferred_mq_start, txr); |
#endif |
#endif |
que->que_si |
que->que_si |
= softint_establish(SOFTINT_NET | IXGBE_SOFTINFT_FLAGS, |
= softint_establish(SOFTINT_NET | IXGBE_SOFTINT_FLAGS, |
ixv_handle_que, que); |
ixv_handle_que, que); |
if (que->que_si == NULL) { |
if (que->que_si == NULL) { |
aprint_error_dev(dev, |
aprint_error_dev(dev, |
Line 3313 ixv_allocate_msix(struct adapter *adapte |
|
Line 3309 ixv_allocate_msix(struct adapter *adapte |
|
/* Round-robin affinity */ |
/* Round-robin affinity */ |
kcpuset_zero(affinity); |
kcpuset_zero(affinity); |
kcpuset_set(affinity, cpu_id % ncpu); |
kcpuset_set(affinity, cpu_id % ncpu); |
error = interrupt_distribute(adapter->osdep.ihs[vector], |
error = interrupt_distribute(adapter->osdep.ihs[vector], affinity, |
affinity, NULL); |
NULL); |
|
|
aprint_normal_dev(dev, |
aprint_normal_dev(dev, |
"for link, interrupting at %s", intrstr); |
"for link, interrupting at %s", intrstr); |
Line 3324 ixv_allocate_msix(struct adapter *adapte |
|
Line 3320 ixv_allocate_msix(struct adapter *adapte |
|
aprint_normal("\n"); |
aprint_normal("\n"); |
|
|
/* Tasklets for Mailbox */ |
/* Tasklets for Mailbox */ |
adapter->link_si = softint_establish(SOFTINT_NET |IXGBE_SOFTINFT_FLAGS, |
adapter->link_si = softint_establish(SOFTINT_NET |IXGBE_SOFTINT_FLAGS, |
ixv_handle_link, adapter); |
ixv_handle_link, adapter); |
/* |
/* |
* Due to a broken design QEMU will fail to properly |
* Due to a broken design QEMU will fail to properly |