Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F843009
D9851 arc patch fail.txt
jeffrey.e.pieper_intel.com (Jeffrey Pieper)
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
jeffrey.e.pieper_intel.com
Mar 2 2017, 3:43 AM
2017-03-02 03:43:47 (UTC+0)
Size
141 KB
Referenced Files
None
Subscribers
None
D9851 arc patch fail.txt
View Options
root@s254:/diskless/os/FreeBSD/12.0-CURRENT_2017-02-10_D9851/usr/src # arc patch D9851 --skip-dependencies
Created and checked out branch arcpatch-D9851.
This diff is against commit 4e97d2b2c3055def6690c6b2a783850a3c7ec844, but
the commit is nowhere in the working copy. Try to apply it against the
current working copy state? (c86cbe211d7604a8cb7ff5133adb4d705f3a6de9)
[Y/n] y
Checking patch sys/modules/ix/Makefile...
error: while searching for:
KMOD = if_ix
SRCS = device_if.h bus_if.h pci_if.h pci_iov_if.h ifdi_if.h
SRCS += opt_inet.h opt_inet6.h opt_rss.h opt_iflib.h
SRCS += if_ix.c ix_txrx.c ixgbe_osdep.c ixgbe_sysctl.c
# Shared source
SRCS += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c
SRCS += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c
error: patch failed: sys/modules/ix/Makefile:5
Checking patch sys/dev/ixgbe/ixgbe_x550.h...
Checking patch sys/dev/ixgbe/ixgbe_x550.c...
Checking patch sys/dev/ixgbe/ixgbe_x540.h...
Checking patch sys/dev/ixgbe/ixgbe_x540.c...
Checking patch sys/dev/ixgbe/ixgbe_vf.h...
Checking patch sys/dev/ixgbe/ixgbe_vf.c...
Checking patch sys/dev/ixgbe/ixgbe_type.h...
Checking patch sys/dev/ixgbe/ixgbe_sysctl.c...
error: sys/dev/ixgbe/ixgbe_sysctl.c: does not exist in index
Checking patch sys/dev/ixgbe/ixgbe_sriov.h...
Checking patch sys/dev/ixgbe/ixgbe_82598.h => sys/dev/ixgbe/ixgbe_rss.h...
Checking patch sys/dev/ixgbe/ixgbe_phy.h...
Checking patch sys/dev/ixgbe/ixgbe_phy.c...
Checking patch sys/dev/ixgbe/ixgbe_osdep.h...
Checking patch sys/dev/ixgbe/ixgbe_osdep.c...
Checking patch sys/dev/ixgbe/ixgbe_mbx.h...
Checking patch sys/dev/ixgbe/ixgbe_mbx.c...
Checking patch sys/dev/ixgbe/ixgbe_features.h...
Checking patch sys/dev/ixgbe/ixgbe_82598.h => sys/dev/ixgbe/ixgbe_fdir.h...
Checking patch sys/dev/ixgbe/ixgbe_dcb_82599.h...
Checking patch sys/dev/ixgbe/ixgbe_dcb_82599.c...
Checking patch sys/dev/ixgbe/ixgbe_dcb_82598.h...
Checking patch sys/dev/ixgbe/ixgbe_dcb_82598.c...
Checking patch sys/dev/ixgbe/ixgbe_dcb.h...
Checking patch sys/dev/ixgbe/ixgbe_dcb.c...
Checking patch sys/dev/ixgbe/ixgbe_common.h...
Checking patch sys/dev/ixgbe/ixgbe_common.c...
Checking patch sys/dev/ixgbe/ixgbe_82598.h => sys/dev/ixgbe/ixgbe_bypass.h...
Checking patch sys/dev/ixgbe/ixgbe_api.h...
Checking patch sys/dev/ixgbe/ixgbe_api.c...
Checking patch sys/dev/ixgbe/ixgbe_82599.h...
Checking patch sys/dev/ixgbe/ixgbe_82599.c...
Checking patch sys/dev/ixgbe/ixgbe_82598.h...
Checking patch sys/dev/ixgbe/ixgbe_82598.c...
Checking patch sys/dev/ixgbe/ixgbe.h...
Hunk #2 succeeded at 92 (offset 7 lines).
Hunk #3 succeeded at 116 (offset 7 lines).
Hunk #4 succeeded at 160 (offset 7 lines).
Hunk #5 succeeded at 230 (offset 7 lines).
Hunk #6 succeeded at 244 (offset 7 lines).
error: while searching for:
unsigned int index;
} ixgbe_vendor_info_t;
struct ixgbe_tx_buf {
int eop;
error: patch failed: sys/dev/ixgbe/ixgbe.h:295
error: while searching for:
union ixgbe_adv_tx_desc *tx_base;
struct ixgbe_tx_buf *tx_buffers;
uint64_t tx_paddr;
#ifdef IXGBE_FDIR
u16 atr_sample;
u16 atr_count;
#endif
u32 bytes; /* used for AIM */
u32 packets;
/* Soft Stats */
unsigned long tso_tx;
u64 total_packets;
};
error: patch failed: sys/dev/ixgbe/ixgbe.h:331
error: while searching for:
u64 rx_irq;
u64 rx_copies;
u64 rx_packets;
u64 rx_bytes;
u64 rx_discarded;
u64 rsc_num;
#ifdef IXGBE_FDIR
u64 flm;
#endif
};
/*
error: patch failed: sys/dev/ixgbe/ixgbe.h:364
error: while searching for:
void *tag;
int busy;
struct rx_ring rxr;
struct if_irq que_irq;
u64 irqs;
};
error: patch failed: sys/dev/ixgbe/ixgbe.h:385
error: while searching for:
struct tx_ring txr;
};
#ifdef PCI_IOV
#define IXGBE_VF_CTS (1 << 0) /* VF is clear to send. */
#define IXGBE_VF_CAP_MAC (1 << 1) /* VF is permitted to change MAC. */
#define IXGBE_VF_CAP_VLAN (1 << 2) /* VF is permitted to join vlans. */
#define IXGBE_VF_ACTIVE (1 << 3) /* VF is active. */
#define IXGBE_MAX_VF_MC 30 /* Max number of multicast entries */
struct ixgbe_vf {
error: patch failed: sys/dev/ixgbe/ixgbe.h:395
Hunk #12 succeeded at 419 (offset 36 lines).
error: while searching for:
*/
struct if_irq irq;
void *tag;
struct resource *res;
struct ifmedia *media;
int msix;
error: patch failed: sys/dev/ixgbe/ixgbe.h:441
Hunk #14 succeeded at 470 (offset 37 lines).
error: while searching for:
/* Support for pluggable optics */
bool sfp_probe;
struct grouptask mod_task; /* SFP tasklet */
struct grouptask msf_task; /* Multispeed Fiber */
#ifdef PCI_IOV
struct grouptask mbx_task; /* VF -> PF mailbox interrupt */
#endif /* PCI_IOV */
#ifdef IXGBE_FDIR
int fdir_reinit;
struct grouptask fdir_task;
#endif
struct grouptask phy_task; /* PHY intr tasklet */
/*
** Queues:
** This is the irq holder, it has
** and RX/TX pair or rings associated
** with it.
*/
struct ix_tx_queue *tx_queues;
struct ix_rx_queue *rx_queues;
u64 active_queues;
u32 tx_process_limit;
u32 rx_process_limit;
/* Multicast array memory */
struct ixgbe_mc_addr *mta;
int num_vfs;
int pool;
#ifdef PCI_IOV
struct ixgbe_vf *vfs;
#endif
#ifdef DEV_NETMAP
void (*init_locked)(struct adapter *);
void (*stop_locked)(void *);
#endif
/* Misc stats maintained by the driver */
unsigned long rx_mbuf_sz;
unsigned long mbuf_header_failed;
unsigned long mbuf_packet_failed;
unsigned long watchdog_events;
unsigned long link_irq;
union {
struct ixgbe_hw_stats pf;
error: patch failed: sys/dev/ixgbe/ixgbe.h:478
error: while searching for:
u64 iqdrops;
u64 noproto;
#endif
};
/* Precision Time Sync (IEEE 1588) defines */
error: patch failed: sys/dev/ixgbe/ixgbe.h:539
Hunk #17 succeeded at 622 (offset 64 lines).
error: while searching for:
void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *);
int ixgbe_get_regs(SYSCTL_HANDLER_ARGS);
void ixgbe_init_tx_ring(struct ix_tx_queue *que);
#ifdef PCI_IOV
static inline boolean_t
ixgbe_vf_mac_changed(struct ixgbe_vf *vf, const uint8_t *mac)
{
return (bcmp(mac, vf->ether_addr, ETHER_ADDR_LEN) != 0);
}
static inline void
ixgbe_send_vf_msg(struct adapter *adapter, struct ixgbe_vf *vf, u32 msg)
{
if (vf->flags & IXGBE_VF_CTS)
msg |= IXGBE_VT_MSGTYPE_CTS;
ixgbe_write_mbx(&adapter->hw, &msg, 1, vf->pool);
}
static inline void
ixgbe_send_vf_ack(struct adapter *adapter, struct ixgbe_vf *vf, u32 msg)
{
msg &= IXGBE_VT_MSG_MASK;
ixgbe_send_vf_msg(adapter, vf, msg | IXGBE_VT_MSGTYPE_ACK);
}
static inline void
ixgbe_send_vf_nack(struct adapter *adapter, struct ixgbe_vf *vf, u32 msg)
{
msg &= IXGBE_VT_MSG_MASK;
ixgbe_send_vf_msg(adapter, vf, msg | IXGBE_VT_MSGTYPE_NACK);
}
static inline void
ixgbe_process_vf_ack(struct adapter *adapter, struct ixgbe_vf *vf)
{
if (!(vf->flags & IXGBE_VF_CTS))
ixgbe_send_vf_nack(adapter, vf, 0);
}
static inline enum ixgbe_iov_mode
ixgbe_get_iov_mode(struct adapter *adapter)
{
if (adapter->num_vfs == 0)
return (IXGBE_NO_VM);
if (adapter->num_tx_queues <= 2)
return (IXGBE_64_VM);
else if (adapter->num_tx_queues <= 4)
return (IXGBE_32_VM);
else
return (IXGBE_NO_VM);
}
static inline u16
ixgbe_max_vfs(enum ixgbe_iov_mode mode)
{
/*
* We return odd numbers below because we
* reserve 1 VM's worth of queues for the PF.
*/
switch (mode) {
case IXGBE_64_VM:
return (63);
case IXGBE_32_VM:
return (31);
case IXGBE_NO_VM:
default:
return (0);
}
}
static inline int
ixgbe_vf_queues(enum ixgbe_iov_mode mode)
{
switch (mode) {
case IXGBE_64_VM:
return (2);
case IXGBE_32_VM:
return (4);
case IXGBE_NO_VM:
default:
return (0);
}
}
static inline int
ixgbe_vf_que_index(enum ixgbe_iov_mode mode, u32 vfnum, int num)
{
return ((vfnum * ixgbe_vf_queues(mode)) + num);
}
static inline int
ixgbe_pf_que_index(enum ixgbe_iov_mode mode, int num)
{
return (ixgbe_vf_que_index(mode, ixgbe_max_vfs(mode), num));
}
static inline void
ixgbe_update_max_frame(struct adapter * adapter, int max_frame)
{
if (adapter->max_frame_size < max_frame)
adapter->max_frame_size = max_frame;
}
static inline u32
ixgbe_get_mrqc(enum ixgbe_iov_mode mode)
{
u32 mrqc = 0;
switch (mode) {
case IXGBE_64_VM:
mrqc = IXGBE_MRQC_VMDQRSS64EN;
break;
case IXGBE_32_VM:
mrqc = IXGBE_MRQC_VMDQRSS32EN;
break;
case IXGBE_NO_VM:
mrqc = 0;
break;
default:
panic("Unexpected SR-IOV mode %d", mode);
}
return(mrqc);
}
static inline u32
ixgbe_get_mtqc(enum ixgbe_iov_mode mode)
{
uint32_t mtqc = 0;
switch (mode) {
case IXGBE_64_VM:
mtqc |= IXGBE_MTQC_64VF | IXGBE_MTQC_VT_ENA;
break;
case IXGBE_32_VM:
mtqc |= IXGBE_MTQC_32VF | IXGBE_MTQC_VT_ENA;
break;
case IXGBE_NO_VM:
mtqc = IXGBE_MTQC_64Q_1PB;
break;
default:
panic("Unexpected SR-IOV mode %d", mode);
}
return(mtqc);
}
#endif /* PCI_IOV */
#endif /* _IXGBE_H_ */
error: patch failed: sys/dev/ixgbe/ixgbe.h:659
Checking patch sys/dev/ixgbe/ix_txrx.c...
error: while searching for:
#include "ixgbe.h"
#ifdef RSS
#include <net/rss_config.h>
#include <netinet/in_rss.h>
#endif
#undef CSUM_TCP
#define CSUM_TCP (CSUM_IP_TCP | CSUM_IP6_TCP)
#undef CSUM_UDP
error: patch failed: sys/dev/ixgbe/ix_txrx.c:41
error: while searching for:
TXD->seqnum_seed = htole32(0);
TXD->mss_l4len_idx = htole32(mss_l4len_idx);
return (olinfo_status);
}
static int
error: patch failed: sys/dev/ixgbe/ix_txrx.c:175
error: while searching for:
if (pi->ipi_mflags & M_VLANTAG)
cmd |= IXGBE_ADVTXD_DCMD_VLE;
i = first = pi->ipi_pidx;
flags = (pi->ipi_flags & IPI_TX_INTR) ? IXGBE_TXD_CMD_RS : 0;
error: patch failed: sys/dev/ixgbe/ix_txrx.c:198
error: while searching for:
pi->ipi_new_pidx = i;
++txr->total_packets;
return (0);
}
static void
ixgbe_isc_txd_flush(void *arg, uint16_t txqid, uint32_t pidx)
{
struct adapter *sc = arg;
struct ix_tx_queue *que = &sc->tx_queues[txqid];
struct tx_ring *txr = &que->txr;
IXGBE_WRITE_REG(&sc->hw, txr->tail, pidx);
}
error: patch failed: sys/dev/ixgbe/ix_txrx.c:252
error: while searching for:
if_softc_ctx_t scctx = sc->shared;
struct ix_tx_queue *que = &sc->tx_queues[txqid];
struct tx_ring *txr = &que->txr;
u32 cidx, ntxd, processed = 0;
u32 limit = sc->tx_process_limit;
error: patch failed: sys/dev/ixgbe/ix_txrx.c:273
error: while searching for:
/****************************************************************
* Routine sends data which has been dma'ed into host memory
* to upper layer. Initialize ri structure.
*
* Returns 0 upon success, errno on failure
***************************************************************/
error: patch failed: sys/dev/ixgbe/ix_txrx.c:388
error: while searching for:
} else {
vtag = 0;
}
/* Make sure bad packets are discarded */
if (eop && (staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK) != 0) {
error: patch failed: sys/dev/ixgbe/ix_txrx.c:432
error: while searching for:
static void
ixgbe_rx_checksum(u32 staterr, if_rxd_info_t ri, u32 ptype)
{
u16 status = (u16) staterr;
u8 errors = (u8) (staterr >> 24);
bool sctp = FALSE;
if ((ptype & IXGBE_RXDADV_PKTTYPE_ETQF) == 0 &&
error: patch failed: sys/dev/ixgbe/ix_txrx.c:479
error: while searching for:
ri->iri_csum_flags |= type;
if (!sctp)
ri->iri_csum_data = htons(0xffff);
}
}
}
/********************************************************************
*
* Parse the packet type to determine the appropriate hash
*
******************************************************************/
static int
ixgbe_determine_rsstype(u16 pkt_info)
{
switch (pkt_info & IXGBE_RXDADV_RSSTYPE_MASK) {
error: patch failed: sys/dev/ixgbe/ix_txrx.c:504
Checking patch sys/dev/ixgbe/if_sriov.c...
Checking patch sys/dev/ixgbe/if_ixv.c...
Hunk #2 succeeded at 43 (offset -2 lines).
error: while searching for:
static int ixv_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nqs, int nqsets);
static void ixv_if_queues_free(if_ctx_t ctx);
static void ixv_identify_hardware(if_ctx_t ctx);
static int ixv_allocate_pci_resources(if_ctx_t ctx);
static void ixv_free_pci_resources(if_ctx_t ctx);
static int ixv_setup_interface(if_ctx_t ctx);
static void ixv_if_media_status(if_ctx_t , struct ifmediareq *);
static int ixv_if_media_change(if_ctx_t ctx);
static void ixv_if_update_admin_status(if_ctx_t ctx);
static int ixv_if_msix_intr_assign(if_ctx_t ctx, int msix);
static int ixv_if_mtu_set(if_ctx_t ctx, uint32_t mtu);
static void ixv_if_init(if_ctx_t ctx);
static void ixv_if_local_timer(if_ctx_t ctx, uint16_t qid);
static void ixv_if_stop(if_ctx_t ctx);
static void ixv_initialize_transmit_units(if_ctx_t ctx);
static void ixv_initialize_receive_units(if_ctx_t ctx);
static void ixv_setup_vlan_support(if_ctx_t ctx);
static void ixv_configure_ivars(struct adapter *);
static void ixv_if_enable_intr(if_ctx_t ctx);
static void ixv_if_disable_intr(if_ctx_t ctx);
static void ixv_if_set_multi(if_ctx_t ctx);
static void ixv_if_register_vlan(if_ctx_t, u16);
static void ixv_if_unregister_vlan(if_ctx_t, u16);
static void ixv_save_stats(struct adapter *);
static void ixv_init_stats(struct adapter *);
static void ixv_update_stats(struct adapter *);
static void ixv_add_stats_sysctls(struct adapter *adapter);
static int ixv_sysctl_debug(SYSCTL_HANDLER_ARGS);
static void ixv_set_ivar(struct adapter *, u8, u8, s8);
error: patch failed: sys/dev/ixgbe/if_ixv.c:79
error: while searching for:
DEVMETHOD(ifdi_queues_free, ixv_if_queues_free),
DEVMETHOD(ifdi_detach, ixv_if_detach),
DEVMETHOD(ifdi_media_status, ixv_if_media_status),
DEVMETHOD(ifdi_media_change, ixv_if_media_change),
DEVMETHOD(ifdi_update_admin_status, ixv_if_update_admin_status),
DEVMETHOD(ifdi_mtu_set, ixv_if_mtu_set),
DEVMETHOD(ifdi_init, ixv_if_init),
DEVMETHOD(ifdi_multi_set, ixv_if_set_multi),
DEVMETHOD(ifdi_timer, ixv_if_local_timer),
DEVMETHOD(ifdi_stop, ixv_if_stop),
DEVMETHOD(ifdi_msix_intr_assign, ixv_if_msix_intr_assign),
DEVMETHOD(ifdi_intr_enable, ixv_if_enable_intr),
error: patch failed: sys/dev/ixgbe/if_ixv.c:154
error: while searching for:
** a soft reset and we need to repopulate it.
*/
static u32 ixv_shadow_vfta[IXGBE_VFTA_SIZE];
extern struct if_txrx ixgbe_txrx;
static struct if_shared_ctx ixv_sctx_init = {
.isc_magic = IFLIB_MAGIC,
error: patch failed: sys/dev/ixgbe/if_ixv.c:229
error: while searching for:
static void *
ixv_register(device_t dev)
{
return (ixv_sctx);
}
error: patch failed: sys/dev/ixgbe/if_ixv.c:255
error: while searching for:
struct ix_tx_queue *que;
int i, j, error;
#ifdef PCI_IOV
enum ixgbe_iov_mode iov_mode;
#endif
MPASS(adapter->num_tx_queues == ntxqsets);
MPASS(ntxqs == 1);
/* Allocate queue structure memory */
if (!(adapter->tx_queues =
(struct ix_tx_queue *) malloc(sizeof(struct ix_tx_queue) * ntxqsets,
M_DEVBUF, M_NOWAIT | M_ZERO))) {
device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n");
return (ENOMEM);
}
#ifdef PCI_IOV
iov_mode = ixgbe_get_iov_mode(adapter);
adapter->pool = ixgbe_max_vfs(iov_mode);
#else
adapter->pool = 0;
#endif
for (i = 0, que = adapter->tx_queues; i < ntxqsets; i++, que++) {
struct tx_ring *txr = &que->txr;
if (!(txr->tx_buffers = (struct ixgbe_tx_buf *) malloc(sizeof(struct ixgbe_tx_buf) * scctx->isc_ntxd[0], M_DEVBUF, M_NOWAIT | M_ZERO))) {
device_printf(iflib_get_dev(ctx), "failed to allocate tx_buffer memory\n");
error = ENOMEM;
goto fail;
}
#ifdef PCI_IOV
txr->me = ixgbe_pf_que_index(iov_mode, i);
#else
txr->me = i;
#endif
txr->adapter = que->adapter = adapter;
adapter->active_queues |= (u64)1 << txr->me;
error: patch failed: sys/dev/ixgbe/if_ixv.c:267
error: while searching for:
txr->bytes = 0;
txr->total_packets = 0;
#ifdef IXGBE_FDIR
/* Set the rate at which we sample packets */
if (adapter->hw.mac.type != ixgbe_mac_82598EB)
txr->atr_sample = atr_sample_rate;
#endif
}
device_printf(iflib_get_dev(ctx), "allocated for %d queues\n", adapter->num_tx_queues);
return (0);
fail:
error: patch failed: sys/dev/ixgbe/if_ixv.c:314
error: while searching for:
struct ix_rx_queue *que;
int i, error;
#ifdef PCI_IOV
enum ixgbe_iov_mode iov_mode;
#endif
MPASS(adapter->num_rx_queues == nrxqsets);
MPASS(nrxqs == 1);
/* Allocate queue structure memory */
if (!(adapter->rx_queues =
(struct ix_rx_queue *) malloc(sizeof(struct ix_rx_queue) *nrxqsets,
M_DEVBUF, M_NOWAIT | M_ZERO))) {
device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n");
return (ENOMEM);
}
#ifdef PCI_IOV
iov_mode = ixgbe_get_iov_mode(adapter);
adapter->pool = ixgbe_max_vfs(iov_mode);
#else
adapter->pool = 0;
#endif
for (i = 0, que = adapter->rx_queues; i < nrxqsets; i++, que++) {
struct rx_ring *rxr = &que->rxr;
#ifdef PCI_IOV
rxr->me = ixgbe_pf_que_index(iov_mode, i);
#else
rxr->me = i;
#endif
rxr->adapter = que->adapter = adapter;
error: patch failed: sys/dev/ixgbe/if_ixv.c:337
error: while searching for:
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ix_tx_queue *que = adapter->tx_queues;
int i;
if (que == NULL)
goto free;
for (i = 0; i < adapter->num_tx_queues; i++, que++) {
struct tx_ring *txr = &que->txr;
if (txr->tx_buffers == NULL)
break;
free(txr->tx_buffers, M_DEVBUF);
txr->tx_buffers = NULL;
error: patch failed: sys/dev/ixgbe/if_ixv.c:389
error: while searching for:
static int
ixv_if_attach_pre(if_ctx_t ctx)
{
device_t dev;
struct adapter *adapter;
if_softc_ctx_t scctx;
struct ixgbe_hw *hw;
int error = 0;
INIT_DEBUGOUT("ixv_attach: begin");
/* Allocate, clear, and link in our adapter structure */
dev = iflib_get_dev(ctx);
adapter = iflib_get_softc(ctx);
adapter->dev = dev;
adapter->ctx = ctx;
scctx = adapter->shared = iflib_get_softc_ctx(ctx);
adapter->media = iflib_get_media(ctx);
error: patch failed: sys/dev/ixgbe/if_ixv.c:424
error: while searching for:
/* Determine hardware revision */
ixv_identify_hardware(ctx);
adapter->shared->isc_tx_nsegments = IXGBE_82599_SCATTER;
/* Do base PCI setup - map BAR0 */
error: patch failed: sys/dev/ixgbe/if_ixv.c:454
error: while searching for:
scctx->isc_nrxd[0] = DEFAULT_RXD;
}
if (scctx->isc_ntxd[0] < MIN_TXD || scctx->isc_ntxd[0] > MAX_TXD) {
device_printf(dev, "ntxd: %d not within permitted range of %d-%d setting to default value: %d\n",
scctx->isc_ntxd[0], MIN_TXD, MAX_TXD, DEFAULT_TXD);
scctx->isc_ntxd[0] = DEFAULT_TXD;
}
scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union ixgbe_adv_tx_desc) +
sizeof(u32), DBA_ALIGN),
scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union ixgbe_adv_rx_desc), DBA_ALIGN);
scctx->isc_txrx = &ixgbe_txrx;
/*
error: patch failed: sys/dev/ixgbe/if_ixv.c:482
error: while searching for:
if (error == IXGBE_ERR_RESET_FAILED)
device_printf(dev, "ixgbe_reset_hw() failure: Reset Failed!\n");
else if (error)
device_printf(dev, "ixgbe_reset_hw() failed with error %d\n", error);
if (error) {
error = EIO;
goto err;
}
/* Negotiate mailbox API version */
error = ixgbevf_negotiate_api_version(hw, ixgbe_mbox_api_11);
if (error) {
device_printf(dev, "MBX API 1.1 negotiation failed! Error %d\n", error);
error = EIO;
goto err;
}
error: patch failed: sys/dev/ixgbe/if_ixv.c:510
error: while searching for:
error = EIO;
goto err;
}
/* If no mac address was assigned, make a random one */
if (!ixv_check_ether_addr(hw->mac.addr)) {
u8 addr[ETHER_ADDR_LEN];
error: patch failed: sys/dev/ixgbe/if_ixv.c:530
error: while searching for:
ixv_if_attach_post(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
device_t dev = iflib_get_dev(ctx);
int error = 0;
/* Setup OS specific network interface */
error = ixv_setup_interface(ctx);
if (error) {
device_printf(dev, "Interface setup failed: %d\n", error);
goto end;
}
/* Do the stats setup */
ixv_save_stats(adapter);
ixv_init_stats(adapter);
ixv_add_stats_sysctls(adapter);
INIT_DEBUGOUT("ixv_attachpost: end");
end:
return error;
}
/*********************************************************************
error: patch failed: sys/dev/ixgbe/if_ixv.c:553
error: while searching for:
{
INIT_DEBUGOUT("ixv_detach: begin");
ixv_free_pci_resources(ctx);
return (0);
}
static int
ixv_if_mtu_set(if_ctx_t ctx, uint32_t mtu)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ifnet *ifp = iflib_get_ifp(ctx);
int error = 0;
IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)");
if (mtu > IXGBE_MAX_FRAME_SIZE - IXGBE_MTU_HDR) {
error = EINVAL;
} else {
ifp->if_mtu = mtu;
adapter->max_frame_size =
ifp->if_mtu + IXGBE_MTU_HDR;
}
return error;
}
/*********************************************************************
error: patch failed: sys/dev/ixgbe/if_ixv.c:589
error: while searching for:
static void
ixv_if_init(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ifnet *ifp = iflib_get_ifp(ctx);
device_t dev = iflib_get_dev(ctx);
struct ixgbe_hw *hw = &adapter->hw;
int error = 0;
INIT_DEBUGOUT("ixv_init: begin");
hw->adapter_stopped = FALSE;
/* reprogram the RAR[0] in case user changed it. */
ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
/* Get the latest mac address, User can use a LAA */
bcopy(IF_LLADDR(adapter->ifp), hw->mac.addr,
IXGBE_ETH_LENGTH_OF_ADDRESS);
ixgbe_set_rar(hw, 0, hw->mac.addr, 0, 1);
hw->addr_ctrl.rar_used_count = 1;
/* Reset VF and renegotiate mailbox API version */
ixgbe_reset_hw(hw);
error = ixgbevf_negotiate_api_version(hw, ixgbe_mbox_api_11);
if (error)
device_printf(dev, "MBX API 1.1 negotiation failed! Error %d\n", error);
ixv_initialize_transmit_units(ctx);
error: patch failed: sys/dev/ixgbe/if_ixv.c:627
error: while searching for:
ifp->if_hwassist |= CSUM_SCTP;
#endif
}
/* Set up VLAN offload and filter */
ixv_setup_vlan_support(ctx);
/* Set up MSI/X routing */
ixv_configure_ivars(adapter);
/* Set up auto-mask */
IXGBE_WRITE_REG(hw, IXGBE_VTEIAM, IXGBE_EICS_RTX_QUEUE);
/* Set moderation on the Link interrupt */
IXGBE_WRITE_REG(hw, IXGBE_VTEITR(adapter->vector), IXGBE_LINK_ITR);
/* Stats init */
ixv_init_stats(adapter);
error: patch failed: sys/dev/ixgbe/if_ixv.c:678
error: while searching for:
#ifdef notyet
struct tx_ring *txr = &que->txr;
#endif
ixv_disable_queue(adapter, que->msix);
++que->irqs;
error: patch failed: sys/dev/ixgbe/if_ixv.c:748
error: while searching for:
goto no_calc;
/*
** Do Adaptive Interrupt Moderation:
** - Write out last calculated setting
** - Calculate based on average size over
** the last interval.
*/
if (que->eitr_setting)
IXGBE_WRITE_REG(&adapter->hw,
IXGBE_VTEITR(que->msix),
que->eitr_setting);
que->eitr_setting = 0;
#ifdef notyet
if ((txr->bytes) && (txr->packets))
newitr = txr->bytes/txr->packets;
#endif
if (rxr->bytes == 0)
goto no_calc;
if ((rxr->bytes) && (rxr->packets))
newitr = max(newitr,
(rxr->bytes / rxr->packets));
newitr += 24; /* account for hardware frame, crc */
/* set an upper boundary */
error: patch failed: sys/dev/ixgbe/if_ixv.c:758
error: while searching for:
newitr = (newitr / 2);
newitr |= newitr << 16;
/* save for next interrupt */
que->eitr_setting = newitr;
#if 0
/* Reset state */
txr->bytes = 0;
txr->packets = 0;
#endif
rxr->bytes = 0;
rxr->packets = 0;
no_calc:
return (FILTER_SCHEDULE_THREAD);
}
static int
error: patch failed: sys/dev/ixgbe/if_ixv.c:791
error: while searching for:
/* Link status change */
if (reg & IXGBE_EICR_LSC)
iflib_admin_intr_deferred(adapter->ctx);
IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, IXGBE_EIMS_OTHER);
return (FILTER_HANDLED);
}
/*********************************************************************
error: patch failed: sys/dev/ixgbe/if_ixv.c:823
error: while searching for:
static void
ixv_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr)
{
struct adapter *adapter = iflib_get_softc(ctx);
INIT_DEBUGOUT("ixv_media_status: begin");
ixv_if_update_admin_status(ctx);
ifmr->ifm_status = IFM_AVALID;
ifmr->ifm_active = IFM_ETHER;
error: patch failed: sys/dev/ixgbe/if_ixv.c:840
Hunk #25 succeeded at 982 (offset 140 lines).
error: while searching for:
static int
ixv_if_media_change(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ifmedia *ifm = adapter->media;
INIT_DEBUGOUT("ixv_media_change: begin");
if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
return (EINVAL);
switch (IFM_SUBTYPE(ifm->ifm_media)) {
case IFM_AUTO:
break;
default:
device_printf(adapter->dev, "Only auto media type\n");
return (EINVAL);
}
return (0);
}
error: patch failed: sys/dev/ixgbe/if_ixv.c:877
error: while searching for:
#define IXGBE_RAR_ENTRIES 16
static void
ixv_if_set_multi(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
if_t ifp = iflib_get_ifp(ctx);
error: patch failed: sys/dev/ixgbe/if_ixv.c:906
Hunk #28 succeeded at 1055 (offset 146 lines).
error: while searching for:
static void
ixv_if_local_timer(if_ctx_t ctx, uint16_t qid)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ix_tx_queue *que = &adapter->tx_queues[qid];
u64 queues = 0;
ixv_if_update_admin_status(ctx);
/* Stats Update */
ixv_update_stats(adapter);
error: patch failed: sys/dev/ixgbe/if_ixv.c:962
error: while searching for:
static void
ixv_if_update_admin_status(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
device_t dev = iflib_get_dev(ctx);
if (adapter->link_up){
if (adapter->link_active == FALSE) {
if (bootverbose)
device_printf(dev,"Link is up %d Gbps %s \n",
((adapter->link_speed == 128)? 10:1),
"Full Duplex");
adapter->link_active = TRUE;
iflib_link_state_change(ctx, LINK_STATE_UP, IF_Gbps(10));
}
} else { /* Link down */
if (adapter->link_active == TRUE) {
if (bootverbose)
device_printf(dev,"Link is Down\n");
iflib_link_state_change(ctx, LINK_STATE_DOWN, 0);
adapter->link_active = FALSE;
}
error: patch failed: sys/dev/ixgbe/if_ixv.c:1000
error: while searching for:
static void
ixv_if_stop(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
INIT_DEBUGOUT("ixv_stop: begin\n");
error: patch failed: sys/dev/ixgbe/if_ixv.c:1035
error: while searching for:
static void
ixv_identify_hardware(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
device_t dev = iflib_get_dev(ctx);
struct ixgbe_hw *hw = &adapter->hw;
/* Save off the information about this board */
hw->vendor_id = pci_get_vendor(dev);
hw->device_id = pci_get_device(dev);
hw->revision_id = pci_read_config(dev, PCIR_REVID, 1);
hw->subsystem_vendor_id =
pci_read_config(dev, PCIR_SUBVEND_0, 2);
hw->subsystem_device_id =
pci_read_config(dev, PCIR_SUBDEV_0, 2);
/* We need this to determine device-specific things */
ixgbe_set_mac_type(hw);
error: patch failed: sys/dev/ixgbe/if_ixv.c:1059
error: while searching for:
/*********************************************************************
*
* Setup MSIX Interrupt resources and handlers
*
**********************************************************************/
static int
ixv_if_msix_intr_assign(if_ctx_t ctx, int msix)
{
struct adapter *adapter = iflib_get_softc(ctx);
device_t dev = iflib_get_dev(ctx);
struct ix_rx_queue *que = adapter->rx_queues;
struct ix_tx_queue *tx_que = adapter->tx_queues;
int error, rid, vector = 0;
char buf[16];
/* Admin Que is vector 0*/
rid = vector + 1;
for (int i = 0; i < adapter->num_rx_queues; i++, vector++, que++) {
rid = vector + 1;
snprintf(buf, sizeof(buf), "rxq%d", i);
error = iflib_irq_alloc_generic(ctx, &que->que_irq, rid, IFLIB_INTR_RX,
ixv_msix_que, que, que->rxr.me, buf);
if (error) {
device_printf(iflib_get_dev(ctx), "Failed to allocate que int %d err: %d", i, error);
adapter->num_rx_queues = i + 1;
goto fail;
}
que->msix = vector;
adapter->active_queues |= (u64)(1 << que->msix);
}
for (int i = 0; i < adapter->num_tx_queues; i++, tx_que++) {
snprintf(buf, sizeof(buf), "txq%d", i);
iflib_softirq_alloc_generic(ctx, i + 1, IFLIB_INTR_TX, tx_que, tx_que->txr.me, buf);
}
rid = vector + 1;
error = iflib_irq_alloc_generic(ctx, &adapter->irq, rid, IFLIB_INTR_ADMIN,
ixv_msix_mbx, adapter, 0, "aq");
if (error) {
device_printf(iflib_get_dev(ctx), "Failed to register admin handler");
return (error);
}
error: patch failed: sys/dev/ixgbe/if_ixv.c:1080
error: while searching for:
que = adapter->rx_queues;
for (int i = 0; i < adapter->num_rx_queues; i++, que++)
iflib_irq_free(ctx, &que->que_irq);
return (error);
}
static int
ixv_allocate_pci_resources(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
int rid;
device_t dev = iflib_get_dev(ctx);
rid = PCIR_BAR(0);
adapter->pci_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
error: patch failed: sys/dev/ixgbe/if_ixv.c:1149
error: while searching for:
static void
ixv_free_pci_resources(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ix_rx_queue *que = adapter->rx_queues;
device_t dev = iflib_get_dev(ctx);
/* Release all msix queue resources */
if (adapter->intr_type == IFLIB_INTR_MSIX)
iflib_irq_free(ctx, &adapter->irq);
error: patch failed: sys/dev/ixgbe/if_ixv.c:1183
error: while searching for:
struct adapter *adapter = iflib_get_softc(ctx);
if_softc_ctx_t scctx = adapter->shared;
struct ifnet *ifp = iflib_get_ifp(ctx);
uint64_t cap = 0;
INIT_DEBUGOUT("ixv_setup_interface: begin");
if_setbaudrate(ifp, 1000000000);
ifp->if_snd.ifq_maxlen = scctx->isc_ntxd[0] - 2;
adapter->max_frame_size =
ifp->if_mtu + IXGBE_MTU_HDR_VLAN;
/*
* Tell the upper layer(s) we support long frames.
error: patch failed: sys/dev/ixgbe/if_ixv.c:1214
error: while searching for:
if_setifheaderlen(ifp, sizeof(struct ether_vlan_header));
if_setcapabilitiesbit(ifp, cap, 0);
if_setcapenable(ifp, if_getcapabilities(ifp));
ifmedia_set(adapter->media, IFM_ETHER | IFM_AUTO);
error: patch failed: sys/dev/ixgbe/if_ixv.c:1236
error: while searching for:
int i;
for (i = 0; i < adapter->num_tx_queues; i++, que++) {
struct tx_ring *txr = &que->txr;
u64 tdba = txr->tx_paddr;
u32 txctrl, txdctl;
int j = txr->me;
/* Set WTHRESH to 8, burst writeback */
txdctl = IXGBE_READ_REG(hw, IXGBE_VFTXDCTL(j));
txdctl |= (8 << 16);
IXGBE_WRITE_REG(hw, IXGBE_VFTXDCTL(j), txdctl);
/* Set the HW Tx Head and Tail indices */
IXGBE_WRITE_REG(&adapter->hw, IXGBE_VFTDH(j), 0);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_VFTDT(j), 0);
/* Set Tx Tail register */
txr->tail = IXGBE_VFTDT(j);
error: patch failed: sys/dev/ixgbe/if_ixv.c:1258
error: while searching for:
(tdba & 0x00000000ffffffffULL));
IXGBE_WRITE_REG(hw, IXGBE_VFTDBAH(j), (tdba >> 32));
IXGBE_WRITE_REG(hw, IXGBE_VFTDLEN(j),
scctx->isc_ntxd[0] *
sizeof(struct ixgbe_legacy_tx_desc));
txctrl = IXGBE_READ_REG(hw, IXGBE_VFDCA_TXCTRL(j));
txctrl &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN;
IXGBE_WRITE_REG(hw, IXGBE_VFDCA_TXCTRL(j), txctrl);
error: patch failed: sys/dev/ixgbe/if_ixv.c:1280
Hunk #40 succeeded at 1232 (offset -52 lines).
error: while searching for:
if_softc_ctx_t scctx;
struct ixgbe_hw *hw = &adapter->hw;
struct ifnet *ifp = adapter->ifp;
struct ix_rx_queue *que = adapter->rx_queues;
u32 bufsz, rxcsum, psrtype;
if (ifp->if_mtu > ETHERMTU)
error: patch failed: sys/dev/ixgbe/if_ixv.c:1310
error: while searching for:
scctx = adapter->shared;
for (int i = 0; i < adapter->num_rx_queues; i++, que++) {
struct rx_ring *rxr = &que->rxr;
u64 rdba = rxr->rx_paddr;
u32 reg, rxdctl;
int j = rxr->me;
/* Disable the queue */
rxdctl = IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(j));
error: patch failed: sys/dev/ixgbe/if_ixv.c:1329
error: while searching for:
/* Setup the Base and Length of the Rx Descriptor Ring */
IXGBE_WRITE_REG(hw, IXGBE_VFRDBAL(j),
(rdba & 0x00000000ffffffffULL));
IXGBE_WRITE_REG(hw, IXGBE_VFRDBAH(j),
(rdba >> 32));
IXGBE_WRITE_REG(hw, IXGBE_VFRDLEN(j),
scctx->isc_nrxd[0] * sizeof(union ixgbe_adv_rx_desc));
/* Reset the ring indices */
IXGBE_WRITE_REG(hw, IXGBE_VFRDH(rxr->me), 0);
error: patch failed: sys/dev/ixgbe/if_ixv.c:1349
Hunk #44 succeeded at 1843 (offset 347 lines).
error: while searching for:
static void
ixv_setup_vlan_support(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
u32 ctrl, vid, vfta, retry;
struct rx_ring *rxr;
error: patch failed: sys/dev/ixgbe/if_ixv.c:1427
Hunk #46 succeeded at 1909 (offset 346 lines).
error: while searching for:
static void
ixv_if_enable_intr(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
struct ix_rx_queue *que = adapter->rx_queues;
u32 mask = (IXGBE_EIMS_ENABLE_MASK & ~IXGBE_EIMS_RTX_QUEUE);
error: patch failed: sys/dev/ixgbe/if_ixv.c:1520
error: while searching for:
mask &= ~(IXGBE_EIMS_OTHER | IXGBE_EIMS_LSC);
IXGBE_WRITE_REG(hw, IXGBE_VTEIAC, mask);
for (int i = 0; i < adapter->num_rx_queues; i++, que++)
ixv_enable_queue(adapter, que->msix);
IXGBE_WRITE_FLUSH(hw);
error: patch failed: sys/dev/ixgbe/if_ixv.c:1531
error: while searching for:
static void
ixv_if_disable_intr(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_VTEIAC, 0);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_VTEIMC, ~0);
IXGBE_WRITE_FLUSH(&adapter->hw);
error: patch failed: sys/dev/ixgbe/if_ixv.c:1542
error: while searching for:
for (int i = 0; i < adapter->num_rx_queues; i++, que++) {
/* First the RX queue entry */
ixv_set_ivar(adapter, i, que->msix, 0);
/* ... and the TX */
ixv_set_ivar(adapter, i, que->msix, 1);
/* Set an initial value in EITR */
IXGBE_WRITE_REG(&adapter->hw,
IXGBE_VTEITR(que->msix), IXV_EITR_DEFAULT);
}
/* For the mailbox interrupt */
ixv_set_ivar(adapter, 1, adapter->vector, -1);
}
/*
error: patch failed: sys/dev/ixgbe/if_ixv.c:1586
Hunk #51 succeeded at 2088 (offset 378 lines).
Hunk #52 succeeded at 2123 (offset 378 lines).
Hunk #53 succeeded at 2141 (offset 378 lines).
error: while searching for:
CTLFLAG_RD, &stats->vfgprc,
"Good Packets Received");
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_rcvd",
CTLFLAG_RD, &stats->vfgorc,
"Good Octets Received");
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_rcvd",
CTLFLAG_RD, &stats->vfmprc,
"Multicast Packets Received");
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd",
CTLFLAG_RD, &stats->vfgptc,
"Good Packets Transmitted");
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd",
CTLFLAG_RD, &stats->vfgotc,
"Good Octets Transmitted");
}
static void
ixv_set_sysctl_value(struct adapter *adapter, const char *name,
const char *description, int *limit, int value)
{
error: patch failed: sys/dev/ixgbe/if_ixv.c:1717
error: while searching for:
static void
ixv_print_debug_info(struct adapter *adapter)
{
device_t dev = adapter->dev;
struct ixgbe_hw *hw = &adapter->hw;
device_printf(dev,"Error Byte Count = %u \n",
IXGBE_READ_REG(hw, IXGBE_ERRBC));
device_printf(dev,"MBX IRQ Handled: %lu\n",
(long)adapter->link_irq);
return;
}
static int
error: patch failed: sys/dev/ixgbe/if_ixv.c:1751
Hunk #56 succeeded at 2304 (offset 440 lines).
Checking patch sys/dev/ixgbe/if_ix.c...
error: while searching for:
#include <net/netmap.h>
#include <dev/netmap/netmap_kern.h>
#ifdef RSS
#include <net/rss_config.h>
#include <netinet/in_rss.h>
#endif /* RSS */
/*********************************************************************
* Driver version
*********************************************************************/
char ixgbe_driver_version[] = "3.1.13-k";
/*********************************************************************
error: patch failed: sys/dev/ixgbe/if_ix.c:43
error: while searching for:
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, "Intel(R) PRO/10GbE PCI-Express Network Driver"),
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, "Intel(R) PRO/10GbE PCI-Express Network Driver"),
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP, "Intel(R) PRO/10GbE PCI-Express Network Driver"),
/* required last entry */
PVID_END
error: patch failed: sys/dev/ixgbe/if_ix.c:97
error: while searching for:
static int ixgbe_if_resume(if_ctx_t ctx);
static void ixgbe_if_stop(if_ctx_t ctx);
static void ixgbe_if_init(if_ctx_t ctx);
void ixgbe_if_enable_intr(if_ctx_t ctx);
static void ixgbe_if_disable_intr(if_ctx_t ctx);
static int ixgbe_if_queue_intr_enable(if_ctx_t ctx, uint16_t qid);
error: patch failed: sys/dev/ixgbe/if_ix.c:114
error: while searching for:
static void ixgbe_initialize_transmit_units(if_ctx_t ctx);
static int ixgbe_interface_setup(if_ctx_t ctx);
static void ixgbe_add_media_types(if_ctx_t ctx);
static void ixgbe_update_stats_counters(struct adapter *adapter);
static void ixgbe_config_link(struct adapter *adapter);
error: patch failed: sys/dev/ixgbe/if_ix.c:161
error: while searching for:
static void ixgbe_handle_mod(void *);
static void ixgbe_handle_phy(void *);
#ifdef IXGBE_FDIR
static void ixgbe_reinit_fdir(void *, int);
#endif
#ifdef PCI_IOV
static void ixgbe_ping_all_vfs(struct adapter *);
static void ixgbe_handle_mbx(void *);
static int ixgbe_init_iov(device_t, u16, const nvlist_t *);
static void ixgbe_uninit_iov(device_t);
static int ixgbe_add_vf(device_t, u16, const nvlist_t *);
static void ixgbe_initialize_iov(struct adapter *);
static void ixgbe_init_vf(struct adapter *, struct ixgbe_vf *);
#if 0
static void ixgbe_recalculate_max_frame(struct adapter *);
#endif
#endif /* PCI_IOV */
/**********************************************************************
* FreeBSD Device Interface Entry Points
*********************************************************************/
error: patch failed: sys/dev/ixgbe/if_ix.c:208
Hunk #7 succeeded at 282 (offset -27 lines).
error: while searching for:
static int allow_unsupported_sfp = FALSE;
TUNABLE_INT("hw.ix.unsupported_sfp", &allow_unsupported_sfp);
#if 0
/* Keep running tab on them for sanity check */
static int ixgbe_total_ports;
#endif
#ifdef IXGBE_FDIR
/*
** Flow Director actually 'steals'
** part of the packet buffer as its
** filter pool, this variable controls
** how much it uses:
** 0 = 64K, 1 = 128K, 2 = 256K
*/
static int fdir_pballoc = 1;
#endif
static MALLOC_DEFINE(M_IXGBE, "ix", "ix driver allocations");
extern struct if_txrx ixgbe_txrx;
error: patch failed: sys/dev/ixgbe/if_ix.c:380
error: while searching for:
if_softc_ctx_t scctx = adapter->shared;
struct ix_tx_queue *que;
int i, j, error;
#ifdef PCI_IOV
enum ixgbe_iov_mode mode;
#endif
MPASS(adapter->num_tx_queues > 0);
MPASS(adapter->num_tx_queues == ntxqsets);
MPASS(ntxqs == 1);
/* Allocate queue structure memory */
if (!(adapter->tx_queues =
(struct ix_tx_queue *) malloc(sizeof(struct ix_tx_queue) *
ntxqsets, M_DEVBUF, M_NOWAIT | M_ZERO))) {
device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n");
return (ENOMEM);
}
#ifdef PCI_IOV
mode = ixgbe_get_iov_mode(adapter);
adapter->pool = ixgbe_max_vfs(mode);
#else
adapter->pool = 0;
#endif
for (i = 0, que = adapter->tx_queues; i < ntxqsets; i++, que++) {
struct tx_ring *txr = &que->txr;
if (!(txr->tx_buffers = (struct ixgbe_tx_buf *) malloc(sizeof(struct ixgbe_tx_buf) * scctx->isc_ntxd[0], M_DEVBUF, M_NOWAIT | M_ZERO))) {
device_printf(iflib_get_dev(ctx), "failed to allocate tx_buffer memory\n");
error = ENOMEM;
goto fail;
}
#ifdef PCI_IOV
txr->me = ixgbe_pf_que_index(mode, i);
#else
txr->me = i;
#endif
txr->adapter = que->adapter = adapter;
adapter->active_queues |= (u64)1 << txr->me;
error: patch failed: sys/dev/ixgbe/if_ix.c:436
error: while searching for:
txr->bytes = 0;
txr->total_packets = 0;
#ifdef IXGBE_FDIR
/* Set the rate at which we sample packets */
if (adapter->hw.mac.type != ixgbe_mac_82598EB)
txr->atr_sample = atr_sample_rate;
#endif
}
iflib_config_gtask_init(ctx, &adapter->mod_task, ixgbe_handle_mod, "mod_task");
iflib_config_gtask_init(ctx, &adapter->msf_task, ixgbe_handle_msf, "msf_task");
iflib_config_gtask_init(ctx, &adapter->phy_task, ixgbe_handle_phy, "phy_task");
#ifdef PCI_IOV
iflib_config_gtask_init(ctx, &adapter->mbx_task, ixgbe_handle_mbx, "mbx_task");
#endif
device_printf(iflib_get_dev(ctx), "allocated for %d queues\n", adapter->num_tx_queues);
return (0);
error: patch failed: sys/dev/ixgbe/if_ix.c:488
error: while searching for:
struct adapter *adapter = iflib_get_softc(ctx);
struct ix_rx_queue *que;
int i;
#ifdef PCI_IOV
enum ixgbe_iov_mode mode;
#endif
MPASS(adapter->num_rx_queues > 0);
MPASS(adapter->num_rx_queues == nrxqsets);
MPASS(nrxqs == 1);
/* Allocate queue structure memory */
if (!(adapter->rx_queues =
(struct ix_rx_queue *) malloc(sizeof(struct ix_rx_queue)*nrxqsets , M_DEVBUF, M_NOWAIT | M_ZERO))) {
device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n");
return (ENOMEM);
}
#ifdef PCI_IOV
mode = ixgbe_get_iov_mode(adapter);
adapter->pool = ixgbe_max_vfs(mode);
#else
adapter->pool = 0;
#endif
for (i = 0, que = adapter->rx_queues; i < nrxqsets; i++, que++) {
struct rx_ring *rxr = &que->rxr;
#ifdef PCI_IOV
rxr->me = ixgbe_pf_que_index(mode, i);
#else
rxr->me = i;
#endif
rxr->adapter = que->adapter = adapter;
error: patch failed: sys/dev/ixgbe/if_ix.c:517
error: while searching for:
struct adapter *adapter = iflib_get_softc(ctx);
struct ix_tx_queue *tx_que = adapter->tx_queues;
struct ix_rx_queue *rx_que = adapter->rx_queues;
int i;
if (tx_que == NULL && rx_que == NULL)
return;
for (i = 0; i < adapter->num_tx_queues; i++, tx_que++) {
struct tx_ring *txr = &tx_que->txr;
if (txr->tx_buffers == NULL)
break;
free(txr->tx_buffers, M_DEVBUF);
txr->tx_buffers = NULL;
}
free(adapter->tx_queues, M_DEVBUF);
free(adapter->rx_queues, M_DEVBUF);
adapter->rx_queues = NULL;
error: patch failed: sys/dev/ixgbe/if_ix.c:569
Hunk #13 succeeded at 3090 (offset 2510 lines).
error: while searching for:
break;
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
table_size = 512;
break;
default:
break;
}
/* Set up the redirection table */
for (int i = 0, j = 0; i < table_size; i++, j++) {
if (j == adapter->num_rx_queues) j = 0;
#ifdef RSS
/*
* Fetch the RSS bucket id for the given indirection entry.
* Cap it at the number of configured buckets (which is
* num_queues.)
*/
queue_id = rss_get_indirection_to_bucket(i);
queue_id = queue_id % adapter->num_rx_queues;
#else
queue_id = (j * index_mult);
#endif
/*
* The low 8 bits are for hash value (n+0);
* The next 8 bits are for hash value (n+1), etc.
*/
reta = reta >> 8;
reta = reta | ( ((uint32_t) queue_id) << 24);
if ((i & 3) == 3) {
if (i < 128)
IXGBE_WRITE_REG(hw, IXGBE_RETA(i >> 2), reta);
else
IXGBE_WRITE_REG(hw, IXGBE_ERETA((i >> 2) - 32), reta);
reta = 0;
}
}
/* Now fill our hash function seeds */
for (int i = 0; i < 10; i++)
IXGBE_WRITE_REG(hw, IXGBE_RSSRK(i), rss_key[i]);
/* Perform hash on these packet types */
#ifdef RSS
mrqc = IXGBE_MRQC_RSSEN;
rss_hash_config = rss_gethashconfig();
if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4)
mrqc |= IXGBE_MRQC_RSS_FIELD_IPV4;
if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV4)
error: patch failed: sys/dev/ixgbe/if_ix.c:619
Hunk #15 succeeded at 3168 (offset 2493 lines).
error: while searching for:
static void
ixgbe_initialize_receive_units(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
if_softc_ctx_t scctx = adapter->shared;
struct ixgbe_hw *hw = &adapter->hw;
struct ifnet *ifp = iflib_get_ifp(ctx);
error: patch failed: sys/dev/ixgbe/if_ix.c:719
error: while searching for:
BSIZEPKT_ROUNDUP) >> IXGBE_SRRCTL_BSIZEPKT_SHIFT;
/* Setup the Base and Length of the Rx Descriptor Ring */
for (i = 0, que = adapter->rx_queues; i < adapter->num_rx_queues; i++, que++) {
struct rx_ring *rxr = &que->rxr;
u64 rdba = rxr->rx_paddr;
int j = rxr->me;
/* Setup the Base and Length of the Rx Descriptor Ring */
IXGBE_WRITE_REG(hw, IXGBE_RDBAL(j),
error: patch failed: sys/dev/ixgbe/if_ix.c:756
error: while searching for:
static void
ixgbe_initialize_transmit_units(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
if_softc_ctx_t scctx = adapter->shared;
struct ixgbe_hw *hw = &adapter->hw;
struct ix_tx_queue *que;
int i;
/* Setup the Base and Length of the Tx Descriptor Ring */
for (i = 0, que = adapter->tx_queues; i < adapter->num_tx_queues; i++, que++) {
struct tx_ring *txr = &que->txr;
u64 tdba = txr->tx_paddr;
u32 txctrl = 0;
int j = txr->me;
IXGBE_WRITE_REG(hw, IXGBE_TDBAL(j),
(tdba & 0x00000000ffffffffULL));
IXGBE_WRITE_REG(hw, IXGBE_TDBAH(j), (tdba >> 32));
IXGBE_WRITE_REG(hw, IXGBE_TDLEN(j),
scctx->isc_ntxd[0] * sizeof(union ixgbe_adv_tx_desc));
error: patch failed: sys/dev/ixgbe/if_ix.c:834
Hunk #19 succeeded at 3047 (offset 2196 lines).
Hunk #20 succeeded at 3062 (offset 2196 lines).
error: while searching for:
struct ixgbe_hw *hw;
uint16_t csum;
int error = 0;
INIT_DEBUGOUT("ixgbe_attach: begin");
/* Allocate, clear, and link in our adapter structure */
error: patch failed: sys/dev/ixgbe/if_ix.c:936
error: while searching for:
/* Identify hardware revision */
ixgbe_identify_hardware(ctx);
if (adapter->hw.mac.type == ixgbe_mac_82598EB) {
scctx->isc_tx_nsegments = IXGBE_82598_SCATTER;
scctx->isc_msix_bar = PCIR_BAR(MSIX_82598_BAR);
error: patch failed: sys/dev/ixgbe/if_ix.c:951
error: while searching for:
/* Sysctls for limiting the amount of work done in the taskqueues */
ixgbe_set_sysctl_value(adapter, "rx_processing_limit",
"max number of rx packets to process",
&adapter->rx_process_limit, ixgbe_rx_process_limit);
ixgbe_set_sysctl_value(adapter, "tx_processing_limit",
"max number of tx packets to process",
&adapter->tx_process_limit, ixgbe_tx_process_limit);
/* Allocate multicast array memory. */
adapter->mta = malloc(sizeof(*adapter->mta) *
MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT);
if (adapter->mta == NULL) {
device_printf(dev, "Can not allocate multicast setup array\n");
error = ENOMEM;
error: patch failed: sys/dev/ixgbe/if_ix.c:979
error: while searching for:
adapter->sfp_probe = TRUE;
error = 0;
} else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) {
device_printf(dev,"Unsupported SFP+ module detected!\n");
error = EIO;
goto err_late;
} else if (error) {
device_printf(dev,"Unable to initialize the shared code\n");
error = EIO;
goto err_late;
}
/* Make sure we have a good EEPROM before we read from it */
if (ixgbe_validate_eeprom_checksum(&adapter->hw, &csum) < 0) {
device_printf(dev,"The EEPROM Checksum Is Not Valid\n");
error = EIO;
goto err_late;
}
error = ixgbe_init_hw(hw);
switch (error) {
case IXGBE_ERR_EEPROM_VERSION:
device_printf(dev, "This device is a pre-production adapter/"
"LOM. Please be aware there may be issues associated "
"with your hardware.\n If you are experiencing problems "
"please contact your Intel or hardware representative "
"who provided you with this hardware.\n");
break;
case IXGBE_ERR_SFP_NOT_SUPPORTED:
device_printf(dev,"Unsupported SFP+ Module\n");
error = EIO;
goto err_late;
case IXGBE_ERR_SFP_NOT_PRESENT:
device_printf(dev,"No SFP+ Module found\n");
/* falls thru */
default:
break;
error: patch failed: sys/dev/ixgbe/if_ix.c:1007
error: while searching for:
switch (adapter->hw.mac.type) {
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
scctx->isc_rss_table_size = 512;
break;
default:
error: patch failed: sys/dev/ixgbe/if_ix.c:1048
error: while searching for:
/* Enable power to the phy. */
ixgbe_set_phy_power(hw, TRUE);
#ifdef PCI_IOV
ixgbe_initialize_iov(adapter);
#endif
error = ixgbe_interface_setup(ctx);
if (error) {
error: patch failed: sys/dev/ixgbe/if_ix.c:1093
error: while searching for:
/* Initialize statistics */
ixgbe_update_stats_counters(adapter);
ixgbe_add_hw_stats(adapter);
/* Check PCIE slot type/speed/width */
ixgbe_get_slot_info(adapter);
/* Set an initial default flow control & dmac value */
adapter->fc = ixgbe_fc_full;
adapter->dmac = 0;
adapter->eee_enabled = 0;
#ifdef PCI_IOV
if ((hw->mac.type != ixgbe_mac_82598EB) && (adapter->intr_type == IFLIB_INTR_MSIX)) {
nvlist_t *pf_schema, *vf_schema;
hw->mbx.ops.init_params(hw);
pf_schema = pci_iov_schema_alloc_node();
vf_schema = pci_iov_schema_alloc_node();
pci_iov_schema_add_unicast_mac(vf_schema, "mac-addr", 0, NULL);
pci_iov_schema_add_bool(vf_schema, "mac-anti-spoof",
IOV_SCHEMA_HASDEFAULT, TRUE);
pci_iov_schema_add_bool(vf_schema, "allow-set-mac",
IOV_SCHEMA_HASDEFAULT, FALSE);
pci_iov_schema_add_bool(vf_schema, "allow-promisc",
IOV_SCHEMA_HASDEFAULT, FALSE);
error = pci_iov_attach(dev, pf_schema, vf_schema);
if (error != 0) {
device_printf(dev,
"Error %d setting up SR-IOV\n", error);
}
} else {
device_printf(dev, "PCI_IOV enabled but not configured: mac_type: %x intr_type: %d\n",
hw->mac.type, adapter->intr_type);
}
#endif /* PCI_IOV */
/* Check for certain supported features */
ixgbe_check_wol_support(adapter);
error: patch failed: sys/dev/ixgbe/if_ix.c:1106
error: while searching for:
if ((dev_caps & IXGBE_DEVICE_CAPS_WOL_PORT0_1) ||
((dev_caps & IXGBE_DEVICE_CAPS_WOL_PORT0) &&
hw->bus.func == 0))
adapter->wol_support = hw->wol_enabled = 1;
/* Save initial wake up filter configuration */
adapter->wufc = IXGBE_READ_REG(hw, IXGBE_WUFC);
return;
}
/*********************************************************************
*
* Setup networking device structure and register an interface.
error: patch failed: sys/dev/ixgbe/if_ix.c:1172
error: while searching for:
if_setcapenable(ifp, if_getcapabilities(ifp));
if_setbaudrate(ifp, 1000000000);
adapter->max_frame_size =
ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
/*
** Don't turn this on by default, if vlans are
error: patch failed: sys/dev/ixgbe/if_ix.c:1206
error: while searching for:
static void
ixgbe_add_media_types(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
device_t dev = iflib_get_dev(ctx);
int layer;
error: patch failed: sys/dev/ixgbe/if_ix.c:1263
error: while searching for:
ifmedia_add(adapter->media, IFM_ETHER | IFM_1000_T, 0, NULL);
if (layer & IXGBE_PHYSICAL_LAYER_100BASE_TX)
ifmedia_add(adapter->media, IFM_ETHER | IFM_100_TX, 0, NULL);
if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU ||
layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA)
ifmedia_add(adapter->media, IFM_ETHER | IFM_10G_TWINAX, 0, NULL);
error: patch failed: sys/dev/ixgbe/if_ix.c:1277
error: while searching for:
/* Someday, someone will care about you... */
device_printf(dev, "Media supported: 1000baseBX\n");
}
if (hw->device_id == IXGBE_DEV_ID_82598AT) {
ifmedia_add(adapter->media,
IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL);
error: patch failed: sys/dev/ixgbe/if_ix.c:1320
error: while searching for:
ifmedia_add(adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL);
}
static void
ixgbe_config_link(struct adapter *adapter)
{
error: patch failed: sys/dev/ixgbe/if_ix.c:1331
error: while searching for:
sfp = ixgbe_is_sfp(hw);
if (sfp) {
GROUPTASK_ENQUEUE(&adapter->mod_task);
} else {
if (hw->mac.ops.check_link)
err = ixgbe_check_link(hw, &adapter->link_speed,
&adapter->link_up, FALSE);
if (err)
return;
autoneg = hw->phy.autoneg_advertised;
if ((!autoneg) && (hw->mac.ops.get_link_capabilities))
err = hw->mac.ops.get_link_capabilities(hw,
&autoneg, &negotiate);
if (err)
return;
if (hw->mac.ops.setup_link)
err = hw->mac.ops.setup_link(hw,
autoneg, adapter->link_up);
}
}
/**********************************************************************
*
* Update the board statistics counters.
error: patch failed: sys/dev/ixgbe/if_ix.c:1340
error: while searching for:
static void
ixgbe_add_hw_stats(struct adapter *adapter)
{
device_t dev = iflib_get_dev(adapter->ctx);
struct ix_rx_queue *rx_que;
struct ix_tx_queue *tx_que;
int i;
struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev);
error: patch failed: sys/dev/ixgbe/if_ix.c:1487
error: while searching for:
"Link MSIX IRQ Handled");
for (i = 0, tx_que = adapter->tx_queues; i < adapter->num_tx_queues; i++, tx_que++) {
struct tx_ring *txr = &tx_que->txr;
snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf,
CTLFLAG_RD, NULL, "Queue Name");
queue_list = SYSCTL_CHILDREN(queue_node);
SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head",
CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr),
ixgbe_sysctl_tdh_handler, "IU",
"Transmit Descriptor Head");
SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail",
CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr),
ixgbe_sysctl_tdt_handler, "IU",
"Transmit Descriptor Tail");
error: patch failed: sys/dev/ixgbe/if_ix.c:1512
error: while searching for:
}
for (i = 0, rx_que = adapter->rx_queues; i < adapter->num_rx_queues; i++, rx_que++) {
struct rx_ring *rxr = &rx_que->rxr;
snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf,
CTLFLAG_RD, NULL, "Queue Name");
queue_list = SYSCTL_CHILDREN(queue_node);
snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf,
CTLFLAG_RD, NULL, "Queue Name");
queue_list = SYSCTL_CHILDREN(queue_node);
error: patch failed: sys/dev/ixgbe/if_ix.c:1534
error: while searching for:
SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "irqs",
CTLFLAG_RD, &(adapter->rx_queues[i].irqs),
"irqs on this queue");
SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head",
CTLTYPE_UINT | CTLFLAG_RD, rxr, sizeof(rxr),
ixgbe_sysctl_rdh_handler, "IU",
"Receive Descriptor Head");
SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail",
CTLTYPE_UINT | CTLFLAG_RD, rxr, sizeof(rxr),
ixgbe_sysctl_rdt_handler, "IU",
"Receive Descriptor Tail");
error: patch failed: sys/dev/ixgbe/if_ix.c:1553
Hunk #39 succeeded at 4497 (offset 2936 lines).
error: while searching for:
/* Packet Transmission Stats */
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd",
CTLFLAG_RD, &stats->gotc,
"Good Octets Transmitted");
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd",
CTLFLAG_RD, &stats->tpt,
error: patch failed: sys/dev/ixgbe/if_ix.c:1675
Hunk #41 succeeded at 4170 (offset 2468 lines).
Hunk #42 succeeded at 4189 (offset 2468 lines).
Hunk #43 succeeded at 4214 (offset 2468 lines).
Hunk #44 succeeded at 4227 (offset 2468 lines).
error: while searching for:
static void
ixgbe_setup_vlan_hw_support(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
struct ifnet *ifp = iflib_get_ifp(ctx);
struct rx_ring *rxr;
u32 ctrl;
error: patch failed: sys/dev/ixgbe/if_ix.c:1826
error: while searching for:
if (hw->mac.type == ixgbe_mac_82598EB)
ctrl |= IXGBE_VLNCTRL_VME;
IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, ctrl);
}
/*
** Get the width and transaction speed of
** the slot this adapter is plugged into.
error: patch failed: sys/dev/ixgbe/if_ix.c:1872
error: while searching for:
{
device_t dev = iflib_get_dev(adapter->ctx);
struct ixgbe_hw *hw = &adapter->hw;
struct ixgbe_mac_info *mac = &hw->mac;
u16 link;
u32 offset;
MPASS(hw->back != NULL);
/* For most devices simply call the shared code routine */
if (hw->device_id != IXGBE_DEV_ID_82599_SFP_SF_QP) {
ixgbe_get_bus_info(hw);
/* These devices don't use PCI-E */
switch (hw->mac.type) {
case ixgbe_mac_X550EM_x:
return;
default:
goto display;
error: patch failed: sys/dev/ixgbe/if_ix.c:1883
error: while searching for:
dev = device_get_parent(device_get_parent(dev));
#ifdef IXGBE_DEBUG
device_printf(dev, "parent pcib = %x,%x,%x\n",
pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev));
#endif
dev = device_get_parent(device_get_parent(dev));
#ifdef IXGBE_DEBUG
device_printf(dev, "slot pcib = %x,%x,%x\n",
pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev));
#endif
/* Now get the PCI Express Capabilities offset */
pci_find_cap(dev, PCIY_EXPRESS, &offset);
/* ...and read the Link Status Register */
link = pci_read_config(dev, offset + PCIER_LINK_STA, 2);
switch (link & IXGBE_PCI_LINK_WIDTH) {
case IXGBE_PCI_LINK_WIDTH_1:
hw->bus.width = ixgbe_bus_width_pcie_x1;
break;
case IXGBE_PCI_LINK_WIDTH_2:
hw->bus.width = ixgbe_bus_width_pcie_x2;
break;
case IXGBE_PCI_LINK_WIDTH_4:
hw->bus.width = ixgbe_bus_width_pcie_x4;
break;
case IXGBE_PCI_LINK_WIDTH_8:
hw->bus.width = ixgbe_bus_width_pcie_x8;
break;
default:
hw->bus.width = ixgbe_bus_width_unknown;
break;
}
switch (link & IXGBE_PCI_LINK_SPEED) {
case IXGBE_PCI_LINK_SPEED_2500:
hw->bus.speed = ixgbe_bus_speed_2500;
break;
case IXGBE_PCI_LINK_SPEED_5000:
hw->bus.speed = ixgbe_bus_speed_5000;
break;
case IXGBE_PCI_LINK_SPEED_8000:
hw->bus.speed = ixgbe_bus_speed_8000;
break;
default:
hw->bus.speed = ixgbe_bus_speed_unknown;
break;
}
mac->ops.set_lan_id(hw);
display:
device_printf(dev,"PCI Express Bus: Speed %s %s\n",
((hw->bus.speed == ixgbe_bus_speed_8000) ? "8.0GT/s":
(hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0GT/s":
(hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5GT/s":"Unknown"),
(hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" :
(hw->bus.width == ixgbe_bus_width_pcie_x4) ? "Width x4" :
(hw->bus.width == ixgbe_bus_width_pcie_x1) ? "Width x1" :
("Unknown"));
if ((hw->device_id != IXGBE_DEV_ID_82599_SFP_SF_QP) &&
((hw->bus.width <= ixgbe_bus_width_pcie_x4) &&
(hw->bus.speed == ixgbe_bus_speed_2500))) {
device_printf(dev, "PCI-Express bandwidth available"
" for this card\n is not sufficient for"
" optimal performance.\n");
device_printf(dev, "For optimal performance a x8 "
"PCIE, or x4 PCIE Gen2 slot is required.\n");
}
if ((hw->device_id == IXGBE_DEV_ID_82599_SFP_SF_QP) &&
((hw->bus.width <= ixgbe_bus_width_pcie_x8) &&
(hw->bus.speed < ixgbe_bus_speed_8000))) {
device_printf(dev, "PCI-Express bandwidth available"
" for this card\n is not sufficient for"
" optimal performance.\n");
device_printf(dev, "For optimal performance a x8 "
"PCIE Gen3 slot is required.\n");
}
return;
}
/*********************************************************************
*
* Setup MSIX Interrupt resources and handlers
*
**********************************************************************/
static int
ixgbe_if_msix_intr_assign(if_ctx_t ctx, int msix)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ix_rx_queue *rx_que = adapter->rx_queues;
struct ix_tx_queue *tx_que;
int error, rid, vector = 0;
int cpu_id = 0;
char buf[16];
error: patch failed: sys/dev/ixgbe/if_ix.c:1907
error: while searching for:
rx_que->msix = vector;
adapter->active_queues |= (u64)(1 << rx_que->msix);
#ifdef RSS
/*
* The queue ID is used as the RSS layer bucket ID.
* We look up the queue ID -> RSS CPU ID and select
* that.
*/
cpu_id = rss_getcpu(i % rss_getnumbuckets());
#else
/*
* Bind the msix vector, and thus the
* rings to the corresponding cpu.
*
* This just happens to match the default RSS round-robin
* bucket -> queue -> CPU allocation.
*/
if (adapter->num_rx_queues > 1)
cpu_id = i;
#endif
}
for (int i = 0; i < adapter->num_tx_queues; i++) {
error: patch failed: sys/dev/ixgbe/if_ix.c:2016
error: while searching for:
struct adapter *adapter = que->adapter;
#ifdef notyet
struct tx_ring *txr = &que->txr;
#endif
struct rx_ring *rxr = &que->rxr;
struct ifnet *ifp = iflib_get_ifp(que->adapter->ctx);
u32 newitr = 0;
error: patch failed: sys/dev/ixgbe/if_ix.c:2073
error: while searching for:
return 0;
ixgbe_disable_queue(adapter, que->msix);
++que->irqs;
if (ixgbe_enable_aim == FALSE)
goto no_calc;
/*
error: patch failed: sys/dev/ixgbe/if_ix.c:2083
error: while searching for:
** the last interval.
*/
if (que->eitr_setting) {
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITR(que->msix), que->eitr_setting);
}
que->eitr_setting = 0;
/* Idle, do nothing */
#ifdef notyet
if ((txr->bytes) && (txr->packets))
newitr = txr->bytes/txr->packets;
#endif
if ((rxr->bytes) && (rxr->packets))
newitr = max(newitr,
(rxr->bytes / rxr->packets));
newitr += 24; /* account for hardware frame, crc */
/* set an upper boundary */
error: patch failed: sys/dev/ixgbe/if_ix.c:2094
error: while searching for:
newitr |= newitr << 16;
else
newitr |= IXGBE_EITR_CNT_WDIS;
/* save for next interrupt */
que->eitr_setting = newitr;
/* Reset state */
#ifdef notyet
txr->bytes = 0;
txr->packets = 0;
#endif
rxr->bytes = 0;
rxr->packets = 0;
error: patch failed: sys/dev/ixgbe/if_ix.c:2122
error: while searching for:
**********************************************************************/
static void
ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
int layer;
INIT_DEBUGOUT("ixgbe_if_media_status: begin");
error: patch failed: sys/dev/ixgbe/if_ix.c:2148
error: while searching for:
ifmr->ifm_active |= IFM_1000_CX | IFM_FDX;
break;
}
else if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KX4
|| layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX)
switch (adapter->link_speed) {
case IXGBE_LINK_SPEED_10GB_FULL:
ifmr->ifm_active |= IFM_10G_CX4 | IFM_FDX;
error: patch failed: sys/dev/ixgbe/if_ix.c:2238
Hunk #56 succeeded at 1858 (offset -371 lines).
error: while searching for:
if (hw->fc.current_mode == ixgbe_fc_tx_pause ||
hw->fc.current_mode == ixgbe_fc_full)
ifmr->ifm_active |= IFM_ETH_TXPAUSE;
}
/*********************************************************************
*
error: patch failed: sys/dev/ixgbe/if_ix.c:2289
error: while searching for:
device_printf(iflib_get_dev(ctx), "Invalid media type!\n");
return (EINVAL);
}
static int
ixgbe_if_promisc_set(if_ctx_t ctx, int flags)
{
error: patch failed: sys/dev/ixgbe/if_ix.c:2386
error: while searching for:
/* clear promiscuous mode and multicast filters before enabling */
IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, reg_rctl);
if (ifp->if_flags & IFF_PROMISC) {
reg_rctl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, reg_rctl);
} else if (ifp->if_flags & IFF_ALLMULTI) {
reg_rctl |= IXGBE_FCTRL_MPE;
reg_rctl &= ~IXGBE_FCTRL_UPE;
IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, reg_rctl);
}
return (0);
}
error: patch failed: sys/dev/ixgbe/if_ix.c:2407
error: while searching for:
/* Clear interrupt with write */
IXGBE_WRITE_REG(hw, IXGBE_EICR, reg_eicr);
/* Link status change */
if (reg_eicr & IXGBE_EICR_LSC)
iflib_admin_intr_deferred(adapter->ctx);
if (adapter->hw.mac.type != ixgbe_mac_82598EB) {
#ifdef IXGBE_FDIR
if (reg_eicr & IXGBE_EICR_FLOW_DIR) {
/* This is probably overkill :) */
if (!atomic_cmpset_int(&adapter->fdir_reinit, 0, 1))
return;
/* Disable the interrupt */
IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EICR_FLOW_DIR);
GROUPTASK_ENQUEUE(&adapter->fdir_task);
} else
#endif
if (reg_eicr & IXGBE_EICR_ECC) {
device_printf(iflib_get_dev(adapter->ctx), "\nCRITICAL: ECC ERROR!! "
"Please Reboot!!\n");
IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC);
}
/* Check for over temp condition */
if (reg_eicr & IXGBE_EICR_TS) {
device_printf(iflib_get_dev(adapter->ctx), "\nCRITICAL: OVER TEMP!! "
"PHY IS SHUT DOWN!!\n");
device_printf(iflib_get_dev(adapter->ctx), "System shutdown required!\n");
IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_TS);
}
#ifdef PCI_IOV
if (reg_eicr & IXGBE_EICR_MAILBOX)
GROUPTASK_ENQUEUE(&adapter->mbx_task);
#endif
}
/* Pluggable optics-related interrupt */
if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP)
error: patch failed: sys/dev/ixgbe/if_ix.c:2437
error: while searching for:
if ((hw->device_id == IXGBE_DEV_ID_82598AT) &&
(reg_eicr & IXGBE_EICR_GPI_SDP1)) {
IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1);
device_printf(iflib_get_dev(adapter->ctx), "\nCRITICAL: FAN FAILURE!! "
"REPLACE IMMEDIATELY!!\n");
}
/* External PHY interrupt */
if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T &&
(reg_eicr & IXGBE_EICR_GPI_SDP0_X540)) {
IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP0_X540);
GROUPTASK_ENQUEUE(&adapter->phy_task);
}
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);
return (FILTER_HANDLED);
}
static int
ixgbe_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS)
error: patch failed: sys/dev/ixgbe/if_ix.c:2491
error: while searching for:
static void
ixgbe_add_device_sysctls(if_ctx_t ctx)
{
device_t dev = iflib_get_dev(ctx);
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
struct sysctl_oid_list *child;
error: patch failed: sys/dev/ixgbe/if_ix.c:2537
error: while searching for:
/* Sysctls for all devices */
SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fc",
CTLTYPE_INT | CTLFLAG_RW, adapter, 0,
ixgbe_sysctl_flowcntl, "I", IXGBE_SYSCTL_DESC_SET_FC);
SYSCTL_ADD_INT(ctx_list, child, OID_AUTO, "enable_aim",
CTLFLAG_RW,
&ixgbe_enable_aim, 1, "Interrupt Moderation");
SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "advertise_speed",
CTLTYPE_INT | CTLFLAG_RW, adapter, 0,
ixgbe_sysctl_advertise, "I", IXGBE_SYSCTL_DESC_ADV_SPEED);
SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "thermal_test",
CTLTYPE_INT | CTLFLAG_RW, adapter, 0,
ixgbe_sysctl_thermal_test, "I", "Thermal Test");
SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "reg_dump",
CTLTYPE_STRING | CTLFLAG_RD, adapter, 0,
ixgbe_get_regs, "A", "Dump Registers");
#ifdef IXGBE_DEBUG
/* testing sysctls (for all devices) */
error: patch failed: sys/dev/ixgbe/if_ix.c:2548
error: while searching for:
/* for X550 series devices */
if (hw->mac.type >= ixgbe_mac_X550)
SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "dmac",
CTLTYPE_INT | CTLFLAG_RW, adapter, 0,
ixgbe_sysctl_dmac, "I", "DMA Coalesce");
/* for X552 backplane devices */
if (hw->device_id == IXGBE_DEV_ID_X550EM_X_KR) {
struct sysctl_oid *eee_node;
struct sysctl_oid_list *eee_list;
eee_node = SYSCTL_ADD_NODE(ctx_list, child, OID_AUTO, "eee",
CTLFLAG_RD, NULL,
"Energy Efficient Ethernet sysctls");
eee_list = SYSCTL_CHILDREN(eee_node);
SYSCTL_ADD_PROC(ctx_list, eee_list, OID_AUTO, "enable",
CTLTYPE_INT | CTLFLAG_RW, adapter, 0,
ixgbe_sysctl_eee_enable, "I",
"Enable or Disable EEE");
SYSCTL_ADD_PROC(ctx_list, eee_list, OID_AUTO, "negotiated",
CTLTYPE_INT | CTLFLAG_RD, adapter, 0,
ixgbe_sysctl_eee_negotiated, "I",
"EEE negotiated on link");
SYSCTL_ADD_PROC(ctx_list, eee_list, OID_AUTO, "tx_lpi_status",
CTLTYPE_INT | CTLFLAG_RD, adapter, 0,
ixgbe_sysctl_eee_tx_lpi_status, "I",
"Whether or not TX link is in LPI state");
SYSCTL_ADD_PROC(ctx_list, eee_list, OID_AUTO, "rx_lpi_status",
CTLTYPE_INT | CTLFLAG_RD, adapter, 0,
ixgbe_sysctl_eee_rx_lpi_status, "I",
"Whether or not RX link is in LPI state");
SYSCTL_ADD_PROC(ctx_list, eee_list, OID_AUTO, "tx_lpi_delay",
CTLTYPE_INT | CTLFLAG_RD, adapter, 0,
ixgbe_sysctl_eee_tx_lpi_delay, "I",
error: patch failed: sys/dev/ixgbe/if_ix.c:2580
error: while searching for:
/* for WoL-capable devices */
if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) {
SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wol_enable",
CTLTYPE_INT | CTLFLAG_RW, adapter, 0,
ixgbe_sysctl_wol_enable, "I",
"Enable/Disable Wake on LAN");
SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wufc",
CTLTYPE_INT | CTLFLAG_RW, adapter, 0,
ixgbe_sysctl_wufc, "I",
"Enable/Disable Wake Up Filters");
}
/* for X550EM 10GBaseT devices */
if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) {
struct sysctl_oid *phy_node;
struct sysctl_oid_list *phy_list;
phy_node = SYSCTL_ADD_NODE(ctx_list, child, OID_AUTO, "phy",
CTLFLAG_RD, NULL,
"External PHY sysctls");
phy_list = SYSCTL_CHILDREN(phy_node);
SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, "temp",
CTLTYPE_INT | CTLFLAG_RD, adapter, 0,
ixgbe_sysctl_phy_temp, "I",
"Current External PHY Temperature (Celsius)");
SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, "overtemp_occurred",
CTLTYPE_INT | CTLFLAG_RD, adapter, 0,
ixgbe_sysctl_phy_overtemp_occurred, "I",
"External PHY High Temperature Event Occurred");
}
}
error: patch failed: sys/dev/ixgbe/if_ix.c:2621
error: while searching for:
static void
ixgbe_identify_hardware(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
device_t dev = iflib_get_dev(ctx);
struct ixgbe_hw *hw = &adapter->hw;
/* Save off the information about this board */
hw->vendor_id = pci_get_vendor(dev);
hw->device_id = pci_get_device(dev);
hw->revision_id = pci_read_config(dev, PCIR_REVID, 1);
hw->subsystem_vendor_id =
pci_read_config(dev, PCIR_SUBVEND_0, 2);
hw->subsystem_device_id =
pci_read_config(dev, PCIR_SUBDEV_0, 2);
/* We need this here to set the num_segs in the code that follows */
ixgbe_set_mac_type(hw);
error: patch failed: sys/dev/ixgbe/if_ix.c:2660
error: while searching for:
}
if (layer & (IXGBE_PHYSICAL_LAYER_10GBASE_LR |
IXGBE_PHYSICAL_LAYER_10GBASE_LRM)) {
adapter->optics = IFM_10G_LR;
return;
}
error: patch failed: sys/dev/ixgbe/if_ix.c:2707
error: while searching for:
}
if (layer & (IXGBE_PHYSICAL_LAYER_10GBASE_KX4 |
IXGBE_PHYSICAL_LAYER_10GBASE_CX4)) {
adapter->optics = IFM_10G_CX4;
return;
}
/* If we get here just set the default */
adapter->optics = IFM_ETHER | IFM_AUTO;
}
static int
ixgbe_allocate_pci_resources(if_ctx_t ctx)
{
error: patch failed: sys/dev/ixgbe/if_ix.c:2723
error: while searching for:
&rid, RF_ACTIVE);
if (!(adapter->pci_mem)) {
device_printf(dev,"Unable to allocate bus resource: memory\n");
return (ENXIO);
}
adapter->osdep.mem_bus_space_tag =
rman_get_bustag(adapter->pci_mem);
adapter->osdep.mem_bus_space_handle =
rman_get_bushandle(adapter->pci_mem);
adapter->hw.hw_addr = (u8 *) &adapter->osdep.mem_bus_space_handle;
adapter->hw.back = adapter;
return (0);
error: patch failed: sys/dev/ixgbe/if_ix.c:2744
error: while searching for:
{
struct adapter *adapter = iflib_get_softc(ctx);
u32 ctrl_ext;
#ifdef PCI_IOV
device_t dev = iflib_get_dev(ctx);
#endif
INIT_DEBUGOUT("ixgbe_detach: begin");
#ifdef PCI_IOV
if (pci_iov_detach(dev) != 0) {
device_printf(dev, "SR-IOV in use; detach first.\n");
return (EBUSY);
}
#endif /* PCI_IOV */
iflib_config_gtask_deinit(&adapter->mod_task);
iflib_config_gtask_deinit(&adapter->msf_task);
iflib_config_gtask_deinit(&adapter->phy_task);
#ifdef PCI_IOV
iflib_config_gtask_deinit(&adapter->mbx_task);
#endif
ixgbe_setup_low_power_mode(ctx);
/* let hardware know driver is unloading */
ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT);
ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD;
IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT, ctrl_ext);
ixgbe_free_pci_resources(ctx);
free(adapter->mta, M_DEVBUF);
return (0);
}
static int
ixgbe_setup_low_power_mode(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
device_t dev = iflib_get_dev(ctx);
s32 error = 0;
error: patch failed: sys/dev/ixgbe/if_ix.c:2771
error: while searching for:
/* Turn off support for APM wakeup. (Using ACPI instead) */
IXGBE_WRITE_REG(hw, IXGBE_GRC,
IXGBE_READ_REG(hw, IXGBE_GRC) & ~(u32)2);
/*
* Clear Wake Up Status register to prevent any previous wakeup
* events from waking us up immediately after we suspend.
*/
IXGBE_WRITE_REG(hw, IXGBE_WUS, 0xffffffff);
/*
* Program the Wakeup Filter Control register with user filter
* settings
*/
IXGBE_WRITE_REG(hw, IXGBE_WUFC, adapter->wufc);
/* Enable wakeups and power management in Wakeup Control */
IXGBE_WRITE_REG(hw, IXGBE_WUC,
IXGBE_WUC_WKEN | IXGBE_WUC_PME_EN);
/* X550EM baseT adapters need a special LPLU flow */
hw->phy.reset_disable = true;
error = hw->phy.ops.enter_lplu(hw);
if (error)
device_printf(dev,
"Error entering LPLU: %d\n", error);
hw->phy.reset_disable = false;
}
return error;
}
error: patch failed: sys/dev/ixgbe/if_ix.c:2821
error: while searching for:
wus = IXGBE_READ_REG(hw, IXGBE_WUS);
if (wus)
device_printf(dev, "Woken up by (WUS): %#010x\n",
IXGBE_READ_REG(hw, IXGBE_WUS));
IXGBE_WRITE_REG(hw, IXGBE_WUS, 0xffffffff);
/* And clear WUFC until next low-power transition */
IXGBE_WRITE_REG(hw, IXGBE_WUFC, 0);
error: patch failed: sys/dev/ixgbe/if_ix.c:2893
error: while searching for:
return (0);
}
/*********************************************************************
* Ioctl mtu entry point
*
*
* return 0 on success, EINVAL on failure
**********************************************************************/
static int
ixgbe_if_mtu_set(if_ctx_t ctx, uint32_t mtu)
error: patch failed: sys/dev/ixgbe/if_ix.c:2909
error: while searching for:
} else {
adapter->max_frame_size = mtu + IXGBE_MTU_HDR;
}
return error;
}
error: patch failed: sys/dev/ixgbe/if_ix.c:2928
error: while searching for:
**********************************************************************/
#define IXGBE_MHADD_MFS_SHIFT 16
static void
ixgbe_if_init(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ifnet *ifp = iflib_get_ifp(ctx);
device_t dev = iflib_get_dev(ctx);
struct ixgbe_hw *hw = &adapter->hw;
struct ix_rx_queue *rx_que;
struct ix_tx_queue *tx_que;
u32 txdctl, mhadd;
u32 rxdctl, rxctrl;
int i, err;
#ifdef PCI_IOV
enum ixgbe_iov_mode mode;
#endif
INIT_DEBUGOUT("ixgbe_if_init: begin");
#ifdef PCI_IOV
mode = ixgbe_get_iov_mode(adapter);
adapter->pool = ixgbe_max_vfs(mode);
/* Queue indices may change with IOV mode */
for (int i = 0; i < adapter->num_rx_queues; i++) {
adapter->rx_queues[i].rxr.me = ixgbe_pf_que_index(mode, i);
adapter->tx_queues[i].txr.me = ixgbe_pf_que_index(mode, i);
}
#endif
/* reprogram the RAR[0] in case user changed it. */
ixgbe_set_rar(hw, 0, hw->mac.addr, adapter->pool, IXGBE_RAH_AV);
error: patch failed: sys/dev/ixgbe/if_ix.c:2988
error: while searching for:
ixgbe_init_hw(hw);
#ifdef PCI_IOV
ixgbe_initialize_iov(adapter);
#endif
ixgbe_initialize_transmit_units(ctx);
error: patch failed: sys/dev/ixgbe/if_ix.c:3027
error: while searching for:
/* Configure RX settings */
ixgbe_initialize_receive_units(ctx);
/* Enable SDP & MSIX interrupts based on adapter */
ixgbe_config_gpie(adapter);
error: patch failed: sys/dev/ixgbe/if_ix.c:3047
error: while searching for:
}
for (i = 0, rx_que = adapter->rx_queues; i < adapter->num_rx_queues; i++, rx_que++) {
struct rx_ring *rxr = &rx_que->rxr;
rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me));
if (hw->mac.type == ixgbe_mac_82598EB) {
/*
error: patch failed: sys/dev/ixgbe/if_ix.c:3081
error: while searching for:
IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE);
}
#ifdef IXGBE_FDIR
/* Init Flow director */
if (hw->mac.type != ixgbe_mac_82598EB) {
u32 hdrm = 32 << fdir_pballoc;
hw->mac.ops.setup_rxpba(hw, 0, hdrm, PBA_STRATEGY_EQUAL);
ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc);
}
#endif
/*
* Check on any SFP devices that
* need to be kick-started
*/
if (hw->phy.type == ixgbe_phy_none) {
int err = hw->phy.ops.identify(hw);
if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
device_printf(dev,
"Unsupported SFP+ module type was detected.\n");
return;
}
}
error: patch failed: sys/dev/ixgbe/if_ix.c:3127
error: while searching for:
/* And now turn on interrupts */
ixgbe_if_enable_intr(ctx);
#ifdef PCI_IOV
/* Enable the use of the MBX by the VF's */
{
u32 reg = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
reg |= IXGBE_CTRL_EXT_PFRSTD;
IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, reg);
}
#endif
}
/*
error: patch failed: sys/dev/ixgbe/if_ix.c:3181
Hunk #81 succeeded at 3648 (offset 489 lines).
error: while searching for:
/* For the Link interrupt */
ixgbe_set_ivar(adapter, 1, adapter->vector, -1);
}
static void
ixgbe_config_gpie(struct adapter *adapter)
{
error: patch failed: sys/dev/ixgbe/if_ix.c:3279
error: while searching for:
{
struct ixgbe_hw *hw = &adapter->hw;
u32 rxpb, frame, size, tmp;
frame = adapter->max_frame_size;
/* Calculate High Water */
switch (hw->mac.type) {
case ixgbe_mac_X540:
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
tmp = IXGBE_DV_X540(frame, frame);
break;
default:
error: patch failed: sys/dev/ixgbe/if_ix.c:3329
error: while searching for:
size = IXGBE_BT2KB(tmp);
rxpb = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(0)) >> 10;
hw->fc.high_water[0] = rxpb - size;
/* Now calculate Low Water */
switch (hw->mac.type) {
case ixgbe_mac_X540:
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
tmp = IXGBE_LOW_DV_X540(frame);
break;
default:
tmp = IXGBE_LOW_DV(frame);
break;
}
hw->fc.low_water[0] = IXGBE_BT2KB(tmp);
hw->fc.requested_mode = adapter->fc;
hw->fc.pause_time = IXGBE_FC_PAUSE;
hw->fc.send_xon = TRUE;
error: patch failed: sys/dev/ixgbe/if_ix.c:3346
error: while searching for:
if (ifma->ifma_addr->sa_family != AF_LINK)
return (0);
if (count == MAX_NUM_MULTICAST_ADDRESSES)
return (0);
bcopy(LLADDR((struct sockaddr_dl *) ifma->ifma_addr),
mta[count].addr, IXGBE_ETH_LENGTH_OF_ADDRESS);
mta[count].vmdq = adapter->pool;
return (1);
}
error: patch failed: sys/dev/ixgbe/if_ix.c:3381
error: while searching for:
struct ixgbe_mc_addr *mta;
int mcnt = 0;
struct ifnet *ifp = iflib_get_ifp(ctx);
IOCTL_DEBUGOUT("ixgbe_if_multi_set: begin");
mta = adapter->mta;
bzero(mta, sizeof(*mta) * MAX_NUM_MULTICAST_ADDRESSES);
mcnt = if_multi_apply(iflib_get_ifp(ctx), ixgbe_mc_filter_apply, adapter);
fctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL);
fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
if (ifp->if_flags & IFF_PROMISC)
error: patch failed: sys/dev/ixgbe/if_ix.c:3398
error: while searching for:
fctrl &= ~IXGBE_FCTRL_UPE;
} else
fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, fctrl);
if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) {
update_ptr = (u8 *)mta;
ixgbe_update_mc_addr_list(&adapter->hw, update_ptr, mcnt, ixgbe_mc_array_itr, TRUE);
}
IOCTL_DEBUGOUT("ixgbe_if_multi_set: end");
}
error: patch failed: sys/dev/ixgbe/if_ix.c:3416
error: while searching for:
if (!ixgbe_sfp_probe(ctx))
return; /* Nothing to do */
ixgbe_check_link(&adapter->hw,
&adapter->link_speed, &adapter->link_up, 0);
ixgbe_if_update_admin_status(ctx);
ixgbe_update_stats_counters(adapter);
/* Fire off the adminq task */
iflib_admin_intr_deferred(ctx);
}
/*
** ixgbe_sfp_probe - called in the local timer to
** determine if a port had optics inserted.
*/
static bool
ixgbe_sfp_probe(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
device_t dev = iflib_get_dev(ctx);
bool result = FALSE;
error: patch failed: sys/dev/ixgbe/if_ix.c:3471
error: while searching for:
goto out;
ret = hw->phy.ops.reset(hw);
if (ret == IXGBE_ERR_SFP_NOT_SUPPORTED) {
device_printf(dev,"Unsupported SFP+ module detected!");
printf(" Reload driver with supported module.\n");
adapter->sfp_probe = FALSE;
goto out;
} else
device_printf(dev,"SFP+ module detected!\n");
/* We now have supported optics */
adapter->sfp_probe = FALSE;
/* Set the optics type so system reports correctly */
error: patch failed: sys/dev/ixgbe/if_ix.c:3500
error: while searching for:
"Setup failure - unsupported SFP+ module type.\n");
goto out;
}
if (hw->phy.multispeed_fiber)
GROUPTASK_ENQUEUE(&adapter->msf_task);
out:
/* Update media type */
switch (hw->mac.ops.get_media_type(hw)) {
error: patch failed: sys/dev/ixgbe/if_ix.c:3568
Hunk #91 succeeded at 3866 (offset 301 lines).
error: while searching for:
struct ixgbe_hw *hw = &adapter->hw;
ifp = iflib_get_ifp(ctx);
INIT_DEBUGOUT("ixgbe_stop: begin\n");
ixgbe_reset_hw(hw);
error: patch failed: sys/dev/ixgbe/if_ix.c:3652
error: while searching for:
ixgbe_stop_mac_link_on_d3_82599(hw);
/* Turn off the laser - noop with no optics */
ixgbe_disable_tx_laser(hw);
/* Update the stack */
adapter->link_up = FALSE;
ixgbe_if_update_admin_status(ctx);
/* reprogram the RAR[0] in case user changed it. */
ixgbe_set_rar(&adapter->hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV);
return;
}
error: patch failed: sys/dev/ixgbe/if_ix.c:3662
error: while searching for:
static void
ixgbe_if_update_admin_status(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
device_t dev = iflib_get_dev(ctx);
if (adapter->link_up){
if (adapter->link_active == FALSE) {
if (bootverbose)
device_printf(dev,"Link is up %d Gbps %s \n",
((adapter->link_speed == 128)? 10:1),
"Full Duplex");
adapter->link_active = TRUE;
/* Update any Flow Control changes */
ixgbe_fc_enable(hw);
/* Update DMA coalescing config */
ixgbe_config_dmac(adapter);
/* should actually be negotiated value */
iflib_link_state_change(ctx, LINK_STATE_UP, IF_Gbps(10));
#ifdef PCI_IOV
ixgbe_ping_all_vfs(adapter);
#endif
}
} else { /* Link down */
if (adapter->link_active == TRUE) {
if (bootverbose)
device_printf(dev,"Link is Down\n");
iflib_link_state_change(ctx, LINK_STATE_DOWN, 0);
adapter->link_active = FALSE;
#ifdef PCI_IOV
ixgbe_ping_all_vfs(adapter);
#endif
}
}
/* Re-enable link interrupts */
IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_LSC);
}
#ifdef IXGBE_FDIR
/*
** Tasklet for reinitializing the Flow Director filter table
*/
static void
ixgbe_reinit_fdir(void *context, int pending)
{
struct adapter *adapter = context;
struct ifnet *ifp = iflib_get_ifp(adapter->ctx);
if (adapter->fdir_reinit != 1) /* Shouldn't happen */
return;
ixgbe_reinit_fdir_tables_82599(&adapter->hw);
adapter->fdir_reinit = 0;
/* re-enable flow director interrupts */
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_FLOW_DIR);
/* Restart the interface */
ifp->if_drv_flags |= IFF_DRV_RUNNING;
}
#endif
/*********************************************************************
*
error: patch failed: sys/dev/ixgbe/if_ix.c:3681
error: while searching for:
dcfg->fcoe_en = false;
dcfg->link_speed = adapter->link_speed;
dcfg->num_tcs = 1;
INIT_DEBUGOUT2("dmac settings: watchdog %d, link speed %d\n",
dcfg->watchdog_timer, dcfg->link_speed);
hw->mac.ops.dmac_config(hw);
}
}
void
ixgbe_if_enable_intr(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
struct ix_rx_queue *que = adapter->rx_queues;
u32 mask, fwsm;
error: patch failed: sys/dev/ixgbe/if_ix.c:3762
error: while searching for:
/* SFP+ (RX_LOS_N & MOD_ABS_N) */
mask |= IXGBE_EIMS_GPI_SDP1;
mask |= IXGBE_EIMS_GPI_SDP2;
#ifdef IXGBE_FDIR
mask |= IXGBE_EIMS_FLOW_DIR;
#endif
#ifdef PCI_IOV
mask |= IXGBE_EIMS_MAILBOX;
#endif
break;
case ixgbe_mac_X540:
/* Detect if Thermal Sensor is enabled */
fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM);
if (fwsm & IXGBE_FWSM_TS_ENABLED)
mask |= IXGBE_EIMS_TS;
mask |= IXGBE_EIMS_ECC;
#ifdef IXGBE_FDIR
mask |= IXGBE_EIMS_FLOW_DIR;
#endif
break;
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
/* MAC thermal sensor is automatically enabled */
mask |= IXGBE_EIMS_TS;
/* Some devices use SDP0 for important information */
if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP ||
hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T)
mask |= IXGBE_EIMS_GPI_SDP0_BY_MAC(hw);
mask |= IXGBE_EIMS_ECC;
#ifdef IXGBE_FDIR
mask |= IXGBE_EIMS_FLOW_DIR;
#endif
#ifdef PCI_IOV
mask |= IXGBE_EIMS_MAILBOX;
#endif
/* falls through */
default:
break;
}
IXGBE_WRITE_REG(hw, IXGBE_EIMS, mask);
/* With MSI-X we use auto clear */
if (adapter->intr_type == IFLIB_INTR_MSIX) {
mask = IXGBE_EIMS_ENABLE_MASK;
/* Don't autoclear Link */
mask &= ~IXGBE_EIMS_OTHER;
mask &= ~IXGBE_EIMS_LSC;
#ifdef PCI_IOV
mask &= ~IXGBE_EIMS_MAILBOX;
#endif
IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask);
}
/*
** Now enable all queues, this is done separately to
error: patch failed: sys/dev/ixgbe/if_ix.c:3791
error: while searching for:
IXGBE_WRITE_FLUSH(hw);
}
static void
ixgbe_if_disable_intr(if_ctx_t ctx)
{
error: patch failed: sys/dev/ixgbe/if_ix.c:3852
error: while searching for:
ixgbe_enable_queue(adapter, que->rxr.me);
return (0);
}
/*
**
** MSIX Interrupt Handlers and Tasklets
error: patch failed: sys/dev/ixgbe/if_ix.c:3879
error: while searching for:
/* Check for fan failure */
if ((hw->device_id == IXGBE_DEV_ID_82598AT) &&
(reg_eicr & IXGBE_EICR_GPI_SDP1)) {
device_printf(adapter->dev, "\nCRITICAL: FAN FAILURE!! "
"REPLACE IMMEDIATELY!!\n");
IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EICR_GPI_SDP1_BY_MAC(hw));
}
/* Link status change */
if (reg_eicr & IXGBE_EICR_LSC) {
IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_LSC);
error: patch failed: sys/dev/ixgbe/if_ix.c:3952
error: while searching for:
static void
ixgbe_free_pci_resources(if_ctx_t ctx)
{
struct adapter *adapter = iflib_get_softc(ctx);
struct ix_rx_queue *que = adapter->rx_queues;
device_t dev = iflib_get_dev(ctx);
/* Release all msix queue resources */
error: patch failed: sys/dev/ixgbe/if_ix.c:3974
error: while searching for:
*/
if (adapter->pci_mem != NULL)
bus_release_resource(dev, SYS_RES_MEMORY,
PCIR_BAR(0), adapter->pci_mem);
}
static void
error: patch failed: sys/dev/ixgbe/if_ix.c:3991
Hunk #102 succeeded at 4650 (offset 739 lines).
Hunk #103 succeeded at 4661 (offset 739 lines).
Hunk #104 succeeded at 5185 (offset 1218 lines).
error: while searching for:
srrctl |= IXGBE_SRRCTL_DROP_EN;
IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl);
}
#ifdef PCI_IOV
/* enable drop for each vf */
for (int i = 0; i < adapter->num_vfs; i++) {
IXGBE_WRITE_REG(hw, IXGBE_QDE,
(IXGBE_QDE_WRITE | (i << IXGBE_QDE_IDX_SHIFT) |
IXGBE_QDE_ENABLE));
}
#endif
}
static void
error: patch failed: sys/dev/ixgbe/if_ix.c:4078
error: while searching for:
srrctl &= ~IXGBE_SRRCTL_DROP_EN;
IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl);
}
#ifdef PCI_IOV
/* disable drop for each vf */
for (int i = 0; i < adapter->num_vfs; i++) {
IXGBE_WRITE_REG(hw, IXGBE_QDE,
(IXGBE_QDE_WRITE | (i << IXGBE_QDE_IDX_SHIFT)));
}
#endif
}
/*
error: patch failed: sys/dev/ixgbe/if_ix.c:4099
Hunk #107 succeeded at 4716 (offset 694 lines).
error: while searching for:
return (ENODEV);
if (!((hw->phy.media_type == ixgbe_media_type_copper) ||
(hw->phy.multispeed_fiber))) {
device_printf(dev, "Advertised speed can only be set on copper or "
"multispeed fiber media types.\n");
return (EINVAL);
}
error: patch failed: sys/dev/ixgbe/if_ix.c:4148
error: while searching for:
static int
ixgbe_sysctl_thermal_test(SYSCTL_HANDLER_ARGS)
{
struct adapter *adapter = (struct adapter *) arg1;
struct ixgbe_hw *hw = &adapter->hw;
int error, fire = 0;
error = sysctl_handle_int(oidp, &fire, 0, req);
if ((error) || (req->newptr == NULL))
return (error);
if (fire) {
printf("Warning: Thermal Shutdown trigger\n");
u32 reg = IXGBE_READ_REG(hw, IXGBE_EICS);
reg |= IXGBE_EICR_TS;
IXGBE_WRITE_REG(hw, IXGBE_EICS, reg);
error: patch failed: sys/dev/ixgbe/if_ix.c:4188
error: while searching for:
/* Manage DMA Coalescing.
** Control values:
** 0/1 - off / on (use default value of 1000)
**
** Legal timer values are:
** 50,100,250,500,1000,2000,5000,10000
error: patch failed: sys/dev/ixgbe/if_ix.c:4208
error: while searching for:
static int
ixgbe_sysctl_dmac(SYSCTL_HANDLER_ARGS)
{
struct adapter *adapter = (struct adapter *) arg1;
struct ifnet *ifp = iflib_get_ifp(adapter->ctx);
int error;
u16 newval;
error: patch failed: sys/dev/ixgbe/if_ix.c:4218
Hunk #112 succeeded at 4933 (offset 763 lines).
Hunk #113 succeeded at 4967 (offset 762 lines).
Hunk #114 succeeded at 5030 (offset 797 lines).
Hunk #115 succeeded at 5045 (offset 797 lines).
Hunk #116 succeeded at 5061 (offset 797 lines).
Hunk #117 succeeded at 5077 (offset 797 lines).
Hunk #118 succeeded at 5106 (offset 797 lines).
Hunk #119 succeeded at 5151 (offset 796 lines).
error: while searching for:
static int
ixgbe_sysctl_phy_temp(SYSCTL_HANDLER_ARGS)
{
struct adapter *adapter = (struct adapter *) arg1;
struct ixgbe_hw *hw = &adapter->hw;
u16 reg;
if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) {
device_printf(iflib_get_dev(adapter->ctx),
"Device has no supported external thermal sensor.\n");
return (ENODEV);
}
if (hw->phy.ops.read_reg(hw, IXGBE_PHY_CURRENT_TEMP,
IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
®)) {
device_printf(iflib_get_dev(adapter->ctx),
"Error reading from PHY's current temperature register\n");
return (EAGAIN);
}
/* Shift temp for output */
reg = reg >> 8;
return (sysctl_handle_int(oidp, NULL, reg, req));
}
/*
* Reports whether the current PHY temperature is over
error: patch failed: sys/dev/ixgbe/if_ix.c:4492
error: while searching for:
static int
ixgbe_sysctl_phy_overtemp_occurred(SYSCTL_HANDLER_ARGS)
{
struct adapter *adapter = (struct adapter *) arg1;
struct ixgbe_hw *hw = &adapter->hw;
u16 reg;
if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) {
device_printf(iflib_get_dev(adapter->ctx),
"Device has no supported external thermal sensor.\n");
return (ENODEV);
}
if (hw->phy.ops.read_reg(hw, IXGBE_PHY_OVERTEMP_STATUS,
IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
®)) {
device_printf(iflib_get_dev(adapter->ctx),
"Error reading from PHY's temperature status register\n");
return (EAGAIN);
}
/* Get occurrence bit */
reg = !!(reg & 0x4000);
return (sysctl_handle_int(oidp, 0, reg, req));
}
/*
* Sysctl to enable/disable the Energy Efficient Ethernet capability,
* if supported by the adapter.
error: patch failed: sys/dev/ixgbe/if_ix.c:4524
error: while searching for:
static int
ixgbe_sysctl_eee_enable(SYSCTL_HANDLER_ARGS)
{
struct adapter *adapter = (struct adapter *) arg1;
struct ixgbe_hw *hw = &adapter->hw;
struct ifnet *ifp = iflib_get_ifp(adapter->ctx);
int new_eee_enabled, error = 0;
error: patch failed: sys/dev/ixgbe/if_ix.c:4557
error: while searching for:
return (0);
}
#ifdef PCI_IOV
/*
** Support functions for SRIOV/VF management
*/
static void
ixgbe_ping_all_vfs(struct adapter *adapter)
{
struct ixgbe_vf *vf;
for (int i = 0; i < adapter->num_vfs; i++) {
vf = &adapter->vfs[i];
if (vf->flags & IXGBE_VF_ACTIVE)
ixgbe_send_vf_msg(adapter, vf, IXGBE_PF_CONTROL_MSG);
}
}
static void
ixgbe_vf_set_default_vlan(struct adapter *adapter, struct ixgbe_vf *vf,
uint16_t tag)
{
struct ixgbe_hw *hw;
uint32_t vmolr, vmvir;
hw = &adapter->hw;
vf->vlan_tag = tag;
vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf->pool));
/* Do not receive packets that pass inexact filters. */
vmolr &= ~(IXGBE_VMOLR_ROMPE | IXGBE_VMOLR_ROPE);
/* Disable Multicast Promicuous Mode. */
vmolr &= ~IXGBE_VMOLR_MPE;
/* Accept broadcasts. */
vmolr |= IXGBE_VMOLR_BAM;
if (tag == 0) {
/* Accept non-vlan tagged traffic. */
//vmolr |= IXGBE_VMOLR_AUPE;
/* Allow VM to tag outgoing traffic; no default tag. */
vmvir = 0;
} else {
/* Require vlan-tagged traffic. */
vmolr &= ~IXGBE_VMOLR_AUPE;
/* Tag all traffic with provided vlan tag. */
vmvir = (tag | IXGBE_VMVIR_VLANA_DEFAULT);
}
IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf->pool), vmolr);
IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf->pool), vmvir);
}
static boolean_t
ixgbe_vf_frame_size_compatible(struct adapter *adapter, struct ixgbe_vf *vf)
{
/*
* Frame size compatibility between PF and VF is only a problem on
* 82599-based cards. X540 and later support any combination of jumbo
* frames on PFs and VFs.
*/
if (adapter->hw.mac.type != ixgbe_mac_82599EB)
return (TRUE);
switch (vf->api_ver) {
case IXGBE_API_VER_1_0:
case IXGBE_API_VER_UNKNOWN:
/*
* On legacy (1.0 and older) VF versions, we don't support jumbo
* frames on either the PF or the VF.
*/
if (adapter->max_frame_size > ETHER_MAX_LEN ||
vf->maximum_frame_size > ETHER_MAX_LEN)
return (FALSE);
return (TRUE);
break;
case IXGBE_API_VER_1_1:
default:
/*
* 1.1 or later VF versions always work if they aren't using
* jumbo frames.
*/
if (vf->maximum_frame_size <= ETHER_MAX_LEN)
return (TRUE);
/*
* Jumbo frames only work with VFs if the PF is also using jumbo
* frames.
*/
if (adapter->max_frame_size <= ETHER_MAX_LEN)
return (TRUE);
return (FALSE);
}
}
static void
ixgbe_process_vf_reset(struct adapter *adapter, struct ixgbe_vf *vf)
{
ixgbe_vf_set_default_vlan(adapter, vf, vf->default_vlan);
// XXX clear multicast addresses
ixgbe_clear_rar(&adapter->hw, vf->rar_index);
vf->api_ver = IXGBE_API_VER_UNKNOWN;
}
static void
ixgbe_vf_enable_transmit(struct adapter *adapter, struct ixgbe_vf *vf)
{
struct ixgbe_hw *hw;
uint32_t vf_index, vfte;
hw = &adapter->hw;
vf_index = IXGBE_VF_INDEX(vf->pool);
vfte = IXGBE_READ_REG(hw, IXGBE_VFTE(vf_index));
vfte |= IXGBE_VF_BIT(vf->pool);
IXGBE_WRITE_REG(hw, IXGBE_VFTE(vf_index), vfte);
}
static void
ixgbe_vf_enable_receive(struct adapter *adapter, struct ixgbe_vf *vf)
{
struct ixgbe_hw *hw;
uint32_t vf_index, vfre;
hw = &adapter->hw;
vf_index = IXGBE_VF_INDEX(vf->pool);
vfre = IXGBE_READ_REG(hw, IXGBE_VFRE(vf_index));
if (ixgbe_vf_frame_size_compatible(adapter, vf))
vfre |= IXGBE_VF_BIT(vf->pool);
else
vfre &= ~IXGBE_VF_BIT(vf->pool);
IXGBE_WRITE_REG(hw, IXGBE_VFRE(vf_index), vfre);
}
static void
ixgbe_vf_reset_msg(struct adapter *adapter, struct ixgbe_vf *vf, uint32_t *msg)
{
struct ixgbe_hw *hw;
uint32_t ack;
uint32_t resp[IXGBE_VF_PERMADDR_MSG_LEN];
hw = &adapter->hw;
ixgbe_process_vf_reset(adapter, vf);
if (ixgbe_validate_mac_addr(vf->ether_addr) == 0) {
ixgbe_set_rar(&adapter->hw, vf->rar_index,
vf->ether_addr, vf->pool, TRUE);
ack = IXGBE_VT_MSGTYPE_ACK;
} else
ack = IXGBE_VT_MSGTYPE_NACK;
ixgbe_vf_enable_transmit(adapter, vf);
ixgbe_vf_enable_receive(adapter, vf);
vf->flags |= IXGBE_VF_CTS;
resp[0] = IXGBE_VF_RESET | ack | IXGBE_VT_MSGTYPE_CTS;
bcopy(vf->ether_addr, &resp[1], ETHER_ADDR_LEN);
resp[3] = hw->mac.mc_filter_type;
ixgbe_write_mbx(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool);
}
static void
ixgbe_vf_set_mac(struct adapter *adapter, struct ixgbe_vf *vf, uint32_t *msg)
{
uint8_t *mac;
mac = (uint8_t*)&msg[1];
/* Check that the VF has permission to change the MAC address. */
if (!(vf->flags & IXGBE_VF_CAP_MAC) && ixgbe_vf_mac_changed(vf, mac)) {
ixgbe_send_vf_nack(adapter, vf, msg[0]);
return;
}
if (ixgbe_validate_mac_addr(mac) != 0) {
ixgbe_send_vf_nack(adapter, vf, msg[0]);
return;
}
bcopy(mac, vf->ether_addr, ETHER_ADDR_LEN);
ixgbe_set_rar(&adapter->hw, vf->rar_index, vf->ether_addr,
vf->pool, TRUE);
ixgbe_send_vf_ack(adapter, vf, msg[0]);
}
/*
** VF multicast addresses are set by using the appropriate bit in
** 1 of 128 32 bit addresses (4096 possible).
*/
static void
ixgbe_vf_set_mc_addr(struct adapter *adapter, struct ixgbe_vf *vf, u32 *msg)
{
u16 *list = (u16*)&msg[1];
int entries;
u32 vmolr, vec_bit, vec_reg, mta_reg;
entries = (msg[0] & IXGBE_VT_MSGINFO_MASK) >> IXGBE_VT_MSGINFO_SHIFT;
entries = min(entries, IXGBE_MAX_VF_MC);
vmolr = IXGBE_READ_REG(&adapter->hw, IXGBE_VMOLR(vf->pool));
vf->num_mc_hashes = entries;
/* Set the appropriate MTA bit */
for (int i = 0; i < entries; i++) {
vf->mc_hash[i] = list[i];
vec_reg = (vf->mc_hash[i] >> 5) & 0x7F;
vec_bit = vf->mc_hash[i] & 0x1F;
mta_reg = IXGBE_READ_REG(&adapter->hw, IXGBE_MTA(vec_reg));
mta_reg |= (1 << vec_bit);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_MTA(vec_reg), mta_reg);
}
vmolr |= IXGBE_VMOLR_ROMPE;
IXGBE_WRITE_REG(&adapter->hw, IXGBE_VMOLR(vf->pool), vmolr);
ixgbe_send_vf_ack(adapter, vf, msg[0]);
}
static void
ixgbe_vf_set_vlan(struct adapter *adapter, struct ixgbe_vf *vf, uint32_t *msg)
{
struct ixgbe_hw *hw;
int enable;
uint16_t tag;
hw = &adapter->hw;
enable = IXGBE_VT_MSGINFO(msg[0]);
tag = msg[1] & IXGBE_VLVF_VLANID_MASK;
if (!(vf->flags & IXGBE_VF_CAP_VLAN)) {
ixgbe_send_vf_nack(adapter, vf, msg[0]);
return;
}
/* It is illegal to enable vlan tag 0. */
if (tag == 0 && enable != 0){
ixgbe_send_vf_nack(adapter, vf, msg[0]);
return;
}
ixgbe_set_vfta(hw, tag, vf->pool, enable);
ixgbe_send_vf_ack(adapter, vf, msg[0]);
}
static void
ixgbe_vf_set_lpe(struct adapter *adapter, struct ixgbe_vf *vf, uint32_t *msg)
{
struct ixgbe_hw *hw;
uint32_t vf_max_size, pf_max_size, mhadd;
hw = &adapter->hw;
vf_max_size = msg[1];
if (vf_max_size < ETHER_CRC_LEN) {
/* We intentionally ACK invalid LPE requests. */
ixgbe_send_vf_ack(adapter, vf, msg[0]);
return;
}
vf_max_size -= ETHER_CRC_LEN;
if (vf_max_size > IXGBE_MAX_FRAME_SIZE) {
/* We intentionally ACK invalid LPE requests. */
ixgbe_send_vf_ack(adapter, vf, msg[0]);
return;
}
vf->maximum_frame_size = vf_max_size;
ixgbe_update_max_frame(adapter, vf->maximum_frame_size);
/*
* We might have to disable reception to this VF if the frame size is
* not compatible with the config on the PF.
*/
ixgbe_vf_enable_receive(adapter, vf);
mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD);
pf_max_size = (mhadd & IXGBE_MHADD_MFS_MASK) >> IXGBE_MHADD_MFS_SHIFT;
if (pf_max_size < adapter->max_frame_size) {
mhadd &= ~IXGBE_MHADD_MFS_MASK;
mhadd |= adapter->max_frame_size << IXGBE_MHADD_MFS_SHIFT;
IXGBE_WRITE_REG(hw, IXGBE_MHADD, mhadd);
}
ixgbe_send_vf_ack(adapter, vf, msg[0]);
}
static void
ixgbe_vf_set_macvlan(struct adapter *adapter, struct ixgbe_vf *vf,
uint32_t *msg)
{
//XXX implement this
ixgbe_send_vf_nack(adapter, vf, msg[0]);
}
static void
ixgbe_vf_api_negotiate(struct adapter *adapter, struct ixgbe_vf *vf,
uint32_t *msg)
{
switch (msg[1]) {
case IXGBE_API_VER_1_0:
case IXGBE_API_VER_1_1:
vf->api_ver = msg[1];
ixgbe_send_vf_ack(adapter, vf, msg[0]);
break;
default:
vf->api_ver = IXGBE_API_VER_UNKNOWN;
ixgbe_send_vf_nack(adapter, vf, msg[0]);
break;
}
}
static void
ixgbe_vf_get_queues(struct adapter *adapter, struct ixgbe_vf *vf,
uint32_t *msg)
{
struct ixgbe_hw *hw;
uint32_t resp[IXGBE_VF_GET_QUEUES_RESP_LEN];
int number_queues;
hw = &adapter->hw;
/* GET_QUEUES is not supported on pre-1.1 APIs. */
switch (msg[0]) {
case IXGBE_API_VER_1_0:
case IXGBE_API_VER_UNKNOWN:
ixgbe_send_vf_nack(adapter, vf, msg[0]);
return;
}
resp[0] = IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_ACK |
IXGBE_VT_MSGTYPE_CTS;
number_queues = ixgbe_vf_queues(ixgbe_get_iov_mode(adapter));
resp[IXGBE_VF_TX_QUEUES] = number_queues;
resp[IXGBE_VF_RX_QUEUES] = number_queues;
resp[IXGBE_VF_TRANS_VLAN] = (vf->default_vlan != 0);
resp[IXGBE_VF_DEF_QUEUE] = 0;
ixgbe_write_mbx(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool);
}
static void
ixgbe_process_vf_msg(struct adapter *adapter, struct ixgbe_vf *vf)
{
struct ixgbe_hw *hw;
uint32_t msg[IXGBE_VFMAILBOX_SIZE];
int error;
hw = &adapter->hw;
error = ixgbe_read_mbx(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool);
if (error != 0)
return;
CTR3(KTR_MALLOC, "%s: received msg %x from %d",
adapter->ifp->if_xname, msg[0], vf->pool);
if (msg[0] == IXGBE_VF_RESET) {
ixgbe_vf_reset_msg(adapter, vf, msg);
return;
}
if (!(vf->flags & IXGBE_VF_CTS)) {
ixgbe_send_vf_nack(adapter, vf, msg[0]);
return;
}
switch (msg[0] & IXGBE_VT_MSG_MASK) {
case IXGBE_VF_SET_MAC_ADDR:
ixgbe_vf_set_mac(adapter, vf, msg);
break;
case IXGBE_VF_SET_MULTICAST:
ixgbe_vf_set_mc_addr(adapter, vf, msg);
break;
case IXGBE_VF_SET_VLAN:
ixgbe_vf_set_vlan(adapter, vf, msg);
break;
case IXGBE_VF_SET_LPE:
ixgbe_vf_set_lpe(adapter, vf, msg);
break;
case IXGBE_VF_SET_MACVLAN:
ixgbe_vf_set_macvlan(adapter, vf, msg);
break;
case IXGBE_VF_API_NEGOTIATE:
ixgbe_vf_api_negotiate(adapter, vf, msg);
break;
case IXGBE_VF_GET_QUEUES:
ixgbe_vf_get_queues(adapter, vf, msg);
break;
default:
ixgbe_send_vf_nack(adapter, vf, msg[0]);
}
}
/*
* Tasklet for handling VF -> PF mailbox messages.
*/
static void
ixgbe_handle_mbx(void *context)
{
struct adapter *adapter;
struct ixgbe_hw *hw;
struct ixgbe_vf *vf;
int i;
adapter = context;
hw = &adapter->hw;
for (i = 0; i < adapter->num_vfs; i++) {
vf = &adapter->vfs[i];
if (vf->flags & IXGBE_VF_ACTIVE) {
if (ixgbe_check_for_rst(hw, vf->pool) == 0)
ixgbe_process_vf_reset(adapter, vf);
if (ixgbe_check_for_msg(hw, vf->pool) == 0)
ixgbe_process_vf_msg(adapter, vf);
if (ixgbe_check_for_ack(hw, vf->pool) == 0)
ixgbe_process_vf_ack(adapter, vf);
}
}
}
static int
ixgbe_init_iov(device_t dev, u16 num_vfs, const nvlist_t *config)
{
struct adapter *adapter;
enum ixgbe_iov_mode mode;
adapter = device_get_softc(dev);
adapter->num_vfs = num_vfs;
mode = ixgbe_get_iov_mode(adapter);
if (num_vfs > ixgbe_max_vfs(mode)) {
adapter->num_vfs = 0;
return (ENOSPC);
}
adapter->vfs = malloc(sizeof(*adapter->vfs) * num_vfs, M_IXGBE,
M_NOWAIT | M_ZERO);
if (adapter->vfs == NULL) {
adapter->num_vfs = 0;
return (ENOMEM);
}
ixgbe_if_init(adapter->ctx);
return (0);
}
static void
ixgbe_uninit_iov(device_t dev)
{
struct ixgbe_hw *hw;
struct adapter *adapter;
uint32_t pf_reg, vf_reg;
adapter = device_get_softc(dev);
hw = &adapter->hw;
/* Enable rx/tx for the PF and disable it for all VFs. */
pf_reg = IXGBE_VF_INDEX(adapter->pool);
IXGBE_WRITE_REG(hw, IXGBE_VFRE(pf_reg),
IXGBE_VF_BIT(adapter->pool));
IXGBE_WRITE_REG(hw, IXGBE_VFTE(pf_reg),
IXGBE_VF_BIT(adapter->pool));
if (pf_reg == 0)
vf_reg = 1;
else
vf_reg = 0;
IXGBE_WRITE_REG(hw, IXGBE_VFRE(vf_reg), 0);
IXGBE_WRITE_REG(hw, IXGBE_VFTE(vf_reg), 0);
IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, 0);
free(adapter->vfs, M_IXGBE);
adapter->vfs = NULL;
adapter->num_vfs = 0;
}
static void
ixgbe_initialize_iov(struct adapter *adapter)
{
struct ixgbe_hw *hw = &adapter->hw;
uint32_t mrqc, mtqc, vt_ctl, vf_reg, gcr_ext, gpie;
enum ixgbe_iov_mode mode;
int i;
mode = ixgbe_get_iov_mode(adapter);
if (mode == IXGBE_NO_VM)
return;
mrqc = IXGBE_READ_REG(hw, IXGBE_MRQC);
mrqc &= ~IXGBE_MRQC_MRQE_MASK;
switch (mode) {
case IXGBE_64_VM:
mrqc |= IXGBE_MRQC_VMDQRSS64EN;
break;
case IXGBE_32_VM:
mrqc |= IXGBE_MRQC_VMDQRSS32EN;
break;
default:
panic("Unexpected SR-IOV mode %d", mode);
}
IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc);
mtqc = IXGBE_MTQC_VT_ENA;
switch (mode) {
case IXGBE_64_VM:
mtqc |= IXGBE_MTQC_64VF;
break;
case IXGBE_32_VM:
mtqc |= IXGBE_MTQC_32VF;
break;
default:
panic("Unexpected SR-IOV mode %d", mode);
}
IXGBE_WRITE_REG(hw, IXGBE_MTQC, mtqc);
gcr_ext = IXGBE_READ_REG(hw, IXGBE_GCR_EXT);
gcr_ext |= IXGBE_GCR_EXT_MSIX_EN;
gcr_ext &= ~IXGBE_GCR_EXT_VT_MODE_MASK;
switch (mode) {
case IXGBE_64_VM:
gcr_ext |= IXGBE_GCR_EXT_VT_MODE_64;
break;
case IXGBE_32_VM:
gcr_ext |= IXGBE_GCR_EXT_VT_MODE_32;
break;
default:
panic("Unexpected SR-IOV mode %d", mode);
}
IXGBE_WRITE_REG(hw, IXGBE_GCR_EXT, gcr_ext);
gpie = IXGBE_READ_REG(hw, IXGBE_GPIE);
gcr_ext &= ~IXGBE_GPIE_VTMODE_MASK;
switch (mode) {
case IXGBE_64_VM:
gpie |= IXGBE_GPIE_VTMODE_64;
break;
case IXGBE_32_VM:
gpie |= IXGBE_GPIE_VTMODE_32;
break;
default:
panic("Unexpected SR-IOV mode %d", mode);
}
IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie);
/* Enable rx/tx for the PF. */
vf_reg = IXGBE_VF_INDEX(adapter->pool);
IXGBE_WRITE_REG(hw, IXGBE_VFRE(vf_reg),
IXGBE_VF_BIT(adapter->pool));
IXGBE_WRITE_REG(hw, IXGBE_VFTE(vf_reg),
IXGBE_VF_BIT(adapter->pool));
/* Allow VM-to-VM communication. */
IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN);
vt_ctl = IXGBE_VT_CTL_VT_ENABLE | IXGBE_VT_CTL_REPLEN;
vt_ctl |= (adapter->pool << IXGBE_VT_CTL_POOL_SHIFT);
IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vt_ctl);
for (i = 0; i < adapter->num_vfs; i++)
ixgbe_init_vf(adapter, &adapter->vfs[i]);
}
#if 0
/*
** Check the max frame setting of all active VF's
*/
static void
ixgbe_recalculate_max_frame(struct adapter *adapter)
{
struct ixgbe_vf *vf;
for (int i = 0; i < adapter->num_vfs; i++) {
vf = &adapter->vfs[i];
if (vf->flags & IXGBE_VF_ACTIVE)
ixgbe_update_max_frame(adapter, vf->maximum_frame_size);
}
}
#endif
static void
ixgbe_init_vf(struct adapter *adapter, struct ixgbe_vf *vf)
{
struct ixgbe_hw *hw;
uint32_t vf_index, pfmbimr;
hw = &adapter->hw;
if (!(vf->flags & IXGBE_VF_ACTIVE))
return;
vf_index = IXGBE_VF_INDEX(vf->pool);
pfmbimr = IXGBE_READ_REG(hw, IXGBE_PFMBIMR(vf_index));
pfmbimr |= IXGBE_VF_BIT(vf->pool);
IXGBE_WRITE_REG(hw, IXGBE_PFMBIMR(vf_index), pfmbimr);
ixgbe_vf_set_default_vlan(adapter, vf, vf->vlan_tag);
// XXX multicast addresses
if (ixgbe_validate_mac_addr(vf->ether_addr) == 0) {
ixgbe_set_rar(&adapter->hw, vf->rar_index,
vf->ether_addr, vf->pool, TRUE);
}
ixgbe_vf_enable_transmit(adapter, vf);
ixgbe_vf_enable_receive(adapter, vf);
ixgbe_send_vf_msg(adapter, vf, IXGBE_PF_CONTROL_MSG);
}
static int
ixgbe_add_vf(device_t dev, u16 vfnum, const nvlist_t *config)
{
struct adapter *adapter;
struct ixgbe_vf *vf;
const void *mac;
adapter = device_get_softc(dev);
KASSERT(vfnum < adapter->num_vfs, ("VF index %d is out of range %d",
vfnum, adapter->num_vfs));
vf = &adapter->vfs[vfnum];
vf->pool= vfnum;
/* RAR[0] is used by the PF so use vfnum + 1 for VF RAR. */
vf->rar_index = vfnum + 1;
vf->default_vlan = 0;
vf->maximum_frame_size = ETHER_MAX_LEN;
ixgbe_update_max_frame(adapter, vf->maximum_frame_size);
if (nvlist_exists_binary(config, "mac-addr")) {
mac = nvlist_get_binary(config, "mac-addr", NULL);
bcopy(mac, vf->ether_addr, ETHER_ADDR_LEN);
if (nvlist_get_bool(config, "allow-set-mac"))
vf->flags |= IXGBE_VF_CAP_MAC;
} else
/*
* If the administrator has not specified a MAC address then
* we must allow the VF to choose one.
*/
vf->flags |= IXGBE_VF_CAP_MAC;
vf->flags = IXGBE_VF_ACTIVE;
ixgbe_init_vf(adapter, vf);
return (0);
}
#endif /* PCI_IOV */
error: patch failed: sys/dev/ixgbe/if_ix.c:4582
Checking patch sys/dev/ixgbe/if_fdir.c...
Checking patch sys/dev/ixgbe/if_bypass.c...
Checking patch sys/conf/files...
Applying patch sys/modules/ix/Makefile with 1 reject...
Rejected hunk #1.
Applied patch sys/dev/ixgbe/ixgbe_x550.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_x550.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_x540.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_x540.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_vf.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_vf.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_type.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_sriov.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_82598.h => sys/dev/ixgbe/ixgbe_rss.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_phy.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_phy.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_osdep.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_osdep.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_mbx.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_mbx.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_features.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_82598.h => sys/dev/ixgbe/ixgbe_fdir.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_dcb_82599.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_dcb_82599.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_dcb_82598.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_dcb_82598.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_dcb.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_dcb.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_common.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_common.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_82598.h => sys/dev/ixgbe/ixgbe_bypass.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_api.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_api.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_82599.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_82599.c cleanly.
Applied patch sys/dev/ixgbe/ixgbe_82598.h cleanly.
Applied patch sys/dev/ixgbe/ixgbe_82598.c cleanly.
Applying patch sys/dev/ixgbe/ixgbe.h with 9 rejects...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Hunk #6 applied cleanly.
Rejected hunk #7.
Rejected hunk #8.
Rejected hunk #9.
Rejected hunk #10.
Rejected hunk #11.
Hunk #12 applied cleanly.
Rejected hunk #13.
Hunk #14 applied cleanly.
Rejected hunk #15.
Rejected hunk #16.
Hunk #17 applied cleanly.
Rejected hunk #18.
Applying patch sys/dev/ixgbe/ix_txrx.c with 9 rejects...
Hunk #1 applied cleanly.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk #7.
Rejected hunk #8.
Rejected hunk #9.
Rejected hunk #10.
Applied patch sys/dev/ixgbe/if_sriov.c cleanly.
Applying patch sys/dev/ixgbe/if_ixv.c with 45 rejects...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk #7.
Rejected hunk #8.
Rejected hunk #9.
Rejected hunk #10.
Rejected hunk #11.
Rejected hunk #12.
Rejected hunk #13.
Rejected hunk #14.
Rejected hunk #15.
Rejected hunk #16.
Rejected hunk #17.
Rejected hunk #18.
Rejected hunk #19.
Rejected hunk #20.
Rejected hunk #21.
Rejected hunk #22.
Rejected hunk #23.
Rejected hunk #24.
Hunk #25 applied cleanly.
Rejected hunk #26.
Rejected hunk #27.
Hunk #28 applied cleanly.
Rejected hunk #29.
Rejected hunk #30.
Rejected hunk #31.
Rejected hunk #32.
Rejected hunk #33.
Rejected hunk #34.
Rejected hunk #35.
Rejected hunk #36.
Rejected hunk #37.
Rejected hunk #38.
Rejected hunk #39.
Hunk #40 applied cleanly.
Rejected hunk #41.
Rejected hunk #42.
Rejected hunk #43.
Hunk #44 applied cleanly.
Rejected hunk #45.
Hunk #46 applied cleanly.
Rejected hunk #47.
Rejected hunk #48.
Rejected hunk #49.
Rejected hunk #50.
Hunk #51 applied cleanly.
Hunk #52 applied cleanly.
Hunk #53 applied cleanly.
Rejected hunk #54.
Rejected hunk #55.
Hunk #56 applied cleanly.
Applying patch sys/dev/ixgbe/if_ix.c with 97 rejects...
Hunk #1 applied cleanly.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Hunk #7 applied cleanly.
Rejected hunk #8.
Rejected hunk #9.
Rejected hunk #10.
Rejected hunk #11.
Rejected hunk #12.
Hunk #13 applied cleanly.
Rejected hunk #14.
Hunk #15 applied cleanly.
Rejected hunk #16.
Rejected hunk #17.
Rejected hunk #18.
Hunk #19 applied cleanly.
Hunk #20 applied cleanly.
Rejected hunk #21.
Rejected hunk #22.
Rejected hunk #23.
Rejected hunk #24.
Rejected hunk #25.
Rejected hunk #26.
Rejected hunk #27.
Rejected hunk #28.
Rejected hunk #29.
Rejected hunk #30.
Rejected hunk #31.
Rejected hunk #32.
Rejected hunk #33.
Rejected hunk #34.
Rejected hunk #35.
Rejected hunk #36.
Rejected hunk #37.
Rejected hunk #38.
Hunk #39 applied cleanly.
Rejected hunk #40.
Hunk #41 applied cleanly.
Hunk #42 applied cleanly.
Hunk #43 applied cleanly.
Hunk #44 applied cleanly.
Rejected hunk #45.
Rejected hunk #46.
Rejected hunk #47.
Rejected hunk #48.
Rejected hunk #49.
Rejected hunk #50.
Rejected hunk #51.
Rejected hunk #52.
Rejected hunk #53.
Rejected hunk #54.
Rejected hunk #55.
Hunk #56 applied cleanly.
Rejected hunk #57.
Rejected hunk #58.
Rejected hunk #59.
Rejected hunk #60.
Rejected hunk #61.
Rejected hunk #62.
Rejected hunk #63.
Rejected hunk #64.
Rejected hunk #65.
Rejected hunk #66.
Rejected hunk #67.
Rejected hunk #68.
Rejected hunk #69.
Rejected hunk #70.
Rejected hunk #71.
Rejected hunk #72.
Rejected hunk #73.
Rejected hunk #74.
Rejected hunk #75.
Rejected hunk #76.
Rejected hunk #77.
Rejected hunk #78.
Rejected hunk #79.
Rejected hunk #80.
Hunk #81 applied cleanly.
Rejected hunk #82.
Rejected hunk #83.
Rejected hunk #84.
Rejected hunk #85.
Rejected hunk #86.
Rejected hunk #87.
Rejected hunk #88.
Rejected hunk #89.
Rejected hunk #90.
Hunk #91 applied cleanly.
Rejected hunk #92.
Rejected hunk #93.
Rejected hunk #94.
Rejected hunk #95.
Rejected hunk #96.
Rejected hunk #97.
Rejected hunk #98.
Rejected hunk #99.
Rejected hunk #100.
Rejected hunk #101.
Hunk #102 applied cleanly.
Hunk #103 applied cleanly.
Hunk #104 applied cleanly.
Rejected hunk #105.
Rejected hunk #106.
Hunk #107 applied cleanly.
Rejected hunk #108.
Rejected hunk #109.
Rejected hunk #110.
Rejected hunk #111.
Hunk #112 applied cleanly.
Hunk #113 applied cleanly.
Hunk #114 applied cleanly.
Hunk #115 applied cleanly.
Hunk #116 applied cleanly.
Hunk #117 applied cleanly.
Hunk #118 applied cleanly.
Hunk #119 applied cleanly.
Rejected hunk #120.
Rejected hunk #121.
Rejected hunk #122.
Rejected hunk #123.
Applied patch sys/dev/ixgbe/if_fdir.c cleanly.
Applied patch sys/dev/ixgbe/if_bypass.c cleanly.
Applied patch sys/conf/files cleanly.
Patch Failed!
Usage Exception: Unable to apply patch!
File Metadata
Details
Attached
Mime Type
text/x-c
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
757402
Default Alt Text
D9851 arc patch fail.txt (141 KB)
Attached To
Mode
D9851: ixgbe(4): Update HEAD to 3.2.12-k
Attached
Detach File
Event Timeline
Log In to Comment