svn commit: r277896 - in projects/clang360-import: contrib/amd/amd contrib/amd/hlfsd lib/libc/gen lib/libc/mips/gen share/man/man4 sys/arm/ti/am335x sys/arm/xilinx sys/arm/xscale/ixp425 sys/dev/sfx...
Dimitry Andric
dim at FreeBSD.org
Thu Jan 29 19:21:29 UTC 2015
Author: dim
Date: Thu Jan 29 19:21:21 2015
New Revision: 277896
URL: https://svnweb.freebsd.org/changeset/base/277896
Log:
Merge ^/head r277861 through r277895.
Modified:
projects/clang360-import/contrib/amd/amd/amfs_program.c
projects/clang360-import/contrib/amd/amd/readdir.c
projects/clang360-import/contrib/amd/hlfsd/homedir.c
projects/clang360-import/contrib/amd/hlfsd/stubs.c
projects/clang360-import/lib/libc/gen/sem_new.c
projects/clang360-import/lib/libc/gen/sem_post.3
projects/clang360-import/lib/libc/mips/gen/sigsetjmp.S
projects/clang360-import/share/man/man4/sfxge.4
projects/clang360-import/sys/arm/ti/am335x/am335x_prcm.c
projects/clang360-import/sys/arm/xilinx/zy7_gpio.c
projects/clang360-import/sys/arm/xscale/ixp425/avila_gpio.c
projects/clang360-import/sys/arm/xscale/ixp425/cambria_gpio.c
projects/clang360-import/sys/dev/sfxge/common/efsys.h
projects/clang360-import/sys/dev/sfxge/common/efx_ev.c
projects/clang360-import/sys/dev/sfxge/common/efx_tx.c
projects/clang360-import/sys/dev/sfxge/sfxge.c
projects/clang360-import/sys/dev/sfxge/sfxge.h
projects/clang360-import/sys/dev/sfxge/sfxge_dma.c
projects/clang360-import/sys/dev/sfxge/sfxge_ev.c
projects/clang360-import/sys/dev/sfxge/sfxge_intr.c
projects/clang360-import/sys/dev/sfxge/sfxge_port.c
projects/clang360-import/sys/dev/sfxge/sfxge_tx.c
projects/clang360-import/sys/dev/sfxge/sfxge_tx.h
projects/clang360-import/sys/sys/cdefs.h
Directory Properties:
projects/clang360-import/ (props changed)
projects/clang360-import/contrib/amd/ (props changed)
projects/clang360-import/lib/libc/ (props changed)
projects/clang360-import/share/ (props changed)
projects/clang360-import/share/man/man4/ (props changed)
projects/clang360-import/sys/ (props changed)
Modified: projects/clang360-import/contrib/amd/amd/amfs_program.c
==============================================================================
--- projects/clang360-import/contrib/amd/amd/amfs_program.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/contrib/amd/amd/amfs_program.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -147,10 +147,12 @@ amfs_program_exec(char *info)
(void) fclose(stdout);
if (!logfp)
logfp = stderr; /* initialize before possible first use */
- (void) dup(fileno(logfp));
+ if (dup(fileno(logfp)) == -1)
+ return errno;
if (fileno(logfp) != fileno(stderr)) {
(void) fclose(stderr);
- (void) dup(fileno(logfp));
+ if (dup(fileno(logfp)) == -1)
+ return errno;
}
/*
Modified: projects/clang360-import/contrib/amd/amd/readdir.c
==============================================================================
--- projects/clang360-import/contrib/amd/amd/readdir.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/contrib/amd/amd/readdir.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -63,6 +63,7 @@ static int key_already_in_chain(char *ke
static nfsentry *make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable);
static int amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count, int fully_browsable);
+static const u_int dotdotcookie = DOT_DOT_COOKIE;
/****************************************************************************
*** FUNCTIONS ***
@@ -178,8 +179,9 @@ make_entry_chain(am_node *mp, const nfse
/* we have space. put entry in next cell */
++last_cookie;
- chain[num_entries].ne_fileid = (u_int) last_cookie;
- *(u_int *) chain[num_entries].ne_cookie = (u_int) last_cookie;
+ chain[num_entries].ne_fileid = last_cookie;
+ (void)memcpy(chain[num_entries].ne_cookie, &last_cookie,
+ sizeof(last_cookie));
chain[num_entries].ne_name = key;
if (num_entries < max_entries - 1) { /* link to next one */
chain[num_entries].ne_nextentry = &chain[num_entries + 1];
@@ -253,7 +255,7 @@ amfs_readdir_browsable(am_node *mp, nfsc
ep[0].ne_fileid = mp->am_gen;
ep[0].ne_name = ".";
ep[0].ne_nextentry = &ep[1];
- *(u_int *) ep[0].ne_cookie = 0;
+ (void)memset(ep[0].ne_cookie, 0, sizeof(u_int));
/* construct ".." */
if (mp->am_parent)
@@ -300,9 +302,12 @@ amfs_readdir_browsable(am_node *mp, nfsc
nfsentry *ne;
for (j = 0, ne = te; ne; ne = ne->ne_nextentry)
plog(XLOG_DEBUG, "gen2 key %4d \"%s\"", j++, ne->ne_name);
- for (j = 0, ne = ep; ne; ne = ne->ne_nextentry)
+ for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) {
+ u_int cookie;
+ (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie));
plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%d ck=%d",
- j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
+ j++, ne->ne_name, ne->ne_fileid, cookie);
+ }
plog(XLOG_DEBUG, "EOF is %d", dp->dl_eof);
}
return 0;
@@ -412,7 +417,7 @@ amfs_generic_readdir(am_node *mp, nfscoo
ep[0].ne_fileid = mp->am_gen;
ep[0].ne_name = ".";
ep[0].ne_nextentry = &ep[1];
- *(u_int *) ep[0].ne_cookie = 0;
+ (void)memset(ep[0].ne_cookie, 0, sizeof(u_int));
/* construct ".." */
if (mp->am_parent)
@@ -429,9 +434,12 @@ amfs_generic_readdir(am_node *mp, nfscoo
if (amuDebug(D_READDIR)) {
nfsentry *ne;
int j;
- for (j = 0, ne = ep; ne; ne = ne->ne_nextentry)
+ for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) {
+ u_int cookie;
+ (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie));
plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%d ck=%d",
- j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
+ j++, ne->ne_name, ne->ne_fileid, cookie);
+ }
}
return 0;
}
@@ -460,9 +468,9 @@ amfs_generic_readdir(am_node *mp, nfscoo
am_node *xp_next = next_nonerror_node(xp->am_osib);
if (xp_next) {
- *(u_int *) ep->ne_cookie = xp_next->am_gen;
+ (void)memcpy(ep->ne_cookie, &xp_next->am_gen, sizeof(xp_next->am_gen));
} else {
- *(u_int *) ep->ne_cookie = DOT_DOT_COOKIE;
+ (void)memcpy(ep->ne_cookie, &dotdotcookie, sizeof(dotdotcookie));
dp->dl_eof = TRUE;
}
@@ -488,9 +496,12 @@ amfs_generic_readdir(am_node *mp, nfscoo
if (amuDebug(D_READDIR)) {
nfsentry *ne;
int j;
- for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
+ for (j=0,ne=ep; ne; ne=ne->ne_nextentry) {
+ u_int cookie;
+ (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie));
plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%d ck=%d",
- j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
+ j++, ne->ne_name, ne->ne_fileid, cookie);
+ }
}
return 0;
}
Modified: projects/clang360-import/contrib/amd/hlfsd/homedir.c
==============================================================================
--- projects/clang360-import/contrib/amd/hlfsd/homedir.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/contrib/amd/hlfsd/homedir.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -492,7 +492,8 @@ readent:
/* read records */
buf[0] = '\0';
- fgets(buf, 256, passwd_fp);
+ if (fgets(buf, 256, passwd_fp) == NULL)
+ return NULL;
passwd_line++;
if (buf[0] == '\0')
goto readent;
Modified: projects/clang360-import/contrib/amd/hlfsd/stubs.c
==============================================================================
--- projects/clang360-import/contrib/amd/hlfsd/stubs.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/contrib/amd/hlfsd/stubs.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -164,8 +164,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, s
if (gid != hlfs_gid) {
res.ns_status = NFSERR_STALE;
} else {
- memset((char *) &uid, 0, sizeof(int));
- uid = *(u_int *) argp->fh_data;
+ (void)memcpy(&uid, argp->fh_data, sizeof(uid));
if (plt_search(uid) != (uid2home_t *) NULL) {
res.ns_status = NFS_OK;
un_fattr.na_fileid = uid;
@@ -282,8 +281,8 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp,
} else { /* entry found and gid is permitted */
un_fattr.na_fileid = untab[idx].uid;
res.dr_u.dr_drok_u.drok_attributes = un_fattr;
- memset((char *) &un_fhandle, 0, sizeof(am_nfs_fh));
- *(u_int *) un_fhandle.fh_data = (u_int) untab[idx].uid;
+ memset(&un_fhandle, 0, sizeof(un_fhandle));
+ memcpy(un_fhandle.fh_data, &untab[idx].uid, sizeof(untab[idx].uid));
xstrlcpy((char *) &un_fhandle.fh_data[sizeof(int)],
untab[idx].username,
sizeof(am_nfs_fh) - sizeof(int));
@@ -338,8 +337,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp,
}
if (groupid == hlfs_gid) {
- memset((char *) &userid, 0, sizeof(int));
- userid = *(u_int *) argp->fh_data;
+ memcpy(&userid, argp->fh_data, sizeof(userid));
username = (char *) &argp->fh_data[sizeof(int)];
if (!(res.rlr_u.rlr_data_u = mailbox(userid, username)))
return (nfsreadlinkres *) NULL;
Modified: projects/clang360-import/lib/libc/gen/sem_new.c
==============================================================================
--- projects/clang360-import/lib/libc/gen/sem_new.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/lib/libc/gen/sem_new.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -439,8 +439,10 @@ _sem_post(sem_t *sem)
do {
count = sem->_kern._count;
- if (USEM_COUNT(count) + 1 > SEM_VALUE_MAX)
- return (EOVERFLOW);
+ if (USEM_COUNT(count) + 1 > SEM_VALUE_MAX) {
+ errno = EOVERFLOW;
+ return (-1);
+ }
} while (!atomic_cmpset_rel_int(&sem->_kern._count, count, count + 1));
if (count & USEM_HAS_WAITERS)
usem_wake(&sem->_kern);
Modified: projects/clang360-import/lib/libc/gen/sem_post.3
==============================================================================
--- projects/clang360-import/lib/libc/gen/sem_post.3 Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/lib/libc/gen/sem_post.3 Thu Jan 29 19:21:21 2015 (r277896)
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 15, 2000
+.Dd January 28, 2015
.Dt SEM_POST 3
.Os
.Sh NAME
@@ -65,6 +65,9 @@ The
.Fa sem
argument
points to an invalid semaphore.
+.It Bq Er EOVERFLOW
+The semaphore value would exceed
+.Dv SEM_VALUE_MAX .
.El
.Sh SEE ALSO
.Xr sem_getvalue 3 ,
Modified: projects/clang360-import/lib/libc/mips/gen/sigsetjmp.S
==============================================================================
--- projects/clang360-import/lib/libc/mips/gen/sigsetjmp.S Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/lib/libc/mips/gen/sigsetjmp.S Thu Jan 29 19:21:21 2015 (r277896)
@@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$");
LEAF(sigsetjmp)
PIC_PROLOGUE(sigsetjmp)
- bne a1, 0x0, 1f # do saving of signal mask?
+ bne a1, zero, 1f # do saving of signal mask?
PIC_TAILCALL(_setjmp)
1: PIC_TAILCALL(setjmp)
Modified: projects/clang360-import/share/man/man4/sfxge.4
==============================================================================
--- projects/clang360-import/share/man/man4/sfxge.4 Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/share/man/man4/sfxge.4 Thu Jan 29 19:21:21 2015 (r277896)
@@ -93,10 +93,18 @@ Supported values are: 512, 1024, 2048 an
.It Va hw.sfxge.tx_dpl_get_max
The maximum length of the deferred packet
.Dq get-list
-for queued transmit
-packets, used only if the transmit queue lock can be acquired.
+for queued transmit packets (TCP and non-TCP), used only if the transmit
+queue lock can be acquired.
If a packet is dropped, the
-.Va tx_early_drops
+.Va tx_get_overflow
+counter is incremented and the local sender receives ENOBUFS.
+The value must be greater than 0.
+.It Va hw.sfxge.tx_dpl_get_non_tcp_max
+The maximum number of non-TCP packets in the deferred packet
+.Dq get-list
+, used only if the transmit queue lock can be acquired.
+If packet is dropped, the
+.Va tx_get_non_tcp_overflow
counter is incremented and the local sender receives ENOBUFS.
The value must be greater than 0.
.It Va hw.sfxge.tx_dpl_put_max
@@ -105,9 +113,13 @@ The maximum length of the deferred packe
for queued transmit
packets, used if the transmit queue lock cannot be acquired.
If a packet is dropped, the
-.Va tx_early_drops
+.Va tx_put_overflow
counter is incremented and the local sender receives ENOBUFS.
The value must be greater than or equal to 0.
+.It Va hw.sfxge.N.max_rss_channels
+The maximum number of allocated RSS channels for the Nth adapter.
+If set to 0 or unset, the number of channels is determined by the number
+of CPU cores.
.El
.Sh SUPPORT
For general information and support,
Modified: projects/clang360-import/sys/arm/ti/am335x/am335x_prcm.c
==============================================================================
--- projects/clang360-import/sys/arm/ti/am335x/am335x_prcm.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/arm/ti/am335x/am335x_prcm.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -729,10 +729,10 @@ am335x_clk_lcdc_activate(struct ti_clock
DELAY(10);
/*
- * For now set frequency to 5xSYSFREQ
- * More flexible control might be required
+ * For now set frequency to 99*SYSFREQ/8 which is twice as
+ * HDMI 1080p pixel clock (minimum LCDC freq divisor is 2)
*/
- prcm_write_4(CM_WKUP_CM_CLKSEL_DPLL_DISP, (5 << 8) | 0);
+ prcm_write_4(CM_WKUP_CM_CLKSEL_DPLL_DISP, (99 << 8) | 8);
/* Locked mode */
prcm_write_4(CM_WKUP_CM_CLKMODE_DPLL_DISP, 0x7);
Modified: projects/clang360-import/sys/arm/xilinx/zy7_gpio.c
==============================================================================
--- projects/clang360-import/sys/arm/xilinx/zy7_gpio.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/arm/xilinx/zy7_gpio.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -373,16 +373,11 @@ static device_method_t zy7_gpio_methods[
};
static driver_t zy7_gpio_driver = {
- "zy7_gpio",
+ "gpio",
zy7_gpio_methods,
sizeof(struct zy7_gpio_softc),
};
static devclass_t zy7_gpio_devclass;
-extern devclass_t gpiobus_devclass, gpioc_devclass;
-extern driver_t gpiobus_driver, gpioc_driver;
-
DRIVER_MODULE(zy7_gpio, simplebus, zy7_gpio_driver, zy7_gpio_devclass, \
NULL, NULL);
-DRIVER_MODULE(gpiobus, zy7_gpio, gpiobus_driver, gpiobus_devclass, 0, 0);
-DRIVER_MODULE(gpioc, zy7_gpio, gpioc_driver, gpioc_devclass, 0, 0);
Modified: projects/clang360-import/sys/arm/xscale/ixp425/avila_gpio.c
==============================================================================
--- projects/clang360-import/sys/arm/xscale/ixp425/avila_gpio.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/arm/xscale/ixp425/avila_gpio.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -344,15 +344,11 @@ static device_method_t gpio_avila_method
};
static driver_t gpio_avila_driver = {
- "gpio_avila",
+ "gpio",
gpio_avila_methods,
sizeof(struct avila_gpio_softc),
};
static devclass_t gpio_avila_devclass;
-extern devclass_t gpiobus_devclass, gpioc_devclass;
-extern driver_t gpiobus_driver, gpioc_driver;
DRIVER_MODULE(gpio_avila, ixp, gpio_avila_driver, gpio_avila_devclass, 0, 0);
-DRIVER_MODULE(gpiobus, gpio_avila, gpiobus_driver, gpiobus_devclass, 0, 0);
-DRIVER_MODULE(gpioc, gpio_avila, gpioc_driver, gpioc_devclass, 0, 0);
MODULE_VERSION(gpio_avila, 1);
Modified: projects/clang360-import/sys/arm/xscale/ixp425/cambria_gpio.c
==============================================================================
--- projects/clang360-import/sys/arm/xscale/ixp425/cambria_gpio.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/arm/xscale/ixp425/cambria_gpio.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -476,16 +476,12 @@ static device_method_t cambria_gpio_meth
};
static driver_t cambria_gpio_driver = {
- "gpio_cambria",
+ "gpio",
cambria_gpio_methods,
sizeof(struct cambria_gpio_softc),
};
static devclass_t cambria_gpio_devclass;
-extern devclass_t gpiobus_devclass, gpioc_devclass;
-extern driver_t gpiobus_driver, gpioc_driver;
DRIVER_MODULE(gpio_cambria, iicbus, cambria_gpio_driver, cambria_gpio_devclass, 0, 0);
-DRIVER_MODULE(gpiobus, gpio_cambria, gpiobus_driver, gpiobus_devclass, 0, 0);
-DRIVER_MODULE(gpioc, gpio_cambria, gpioc_driver, gpioc_devclass, 0, 0);
MODULE_VERSION(gpio_cambria, 1);
MODULE_DEPEND(gpio_cambria, iicbus, 1, 1, 1);
Modified: projects/clang360-import/sys/dev/sfxge/common/efsys.h
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/common/efsys.h Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/common/efsys.h Thu Jan 29 19:21:21 2015 (r277896)
@@ -370,7 +370,6 @@ typedef struct efsys_mem_s {
bus_dmamap_t esm_map;
caddr_t esm_base;
efsys_dma_addr_t esm_addr;
- size_t esm_size;
} efsys_mem_t;
Modified: projects/clang360-import/sys/dev/sfxge/common/efx_ev.c
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/common/efx_ev.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/common/efx_ev.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -995,6 +995,7 @@ fail1:
return (rc);
}
+#if EFSYS_OPT_QSTATS
#if EFSYS_OPT_NAMES
/* START MKCONFIG GENERATED EfxEventQueueStatNamesBlock 67e9bdcd920059bd */
static const char __cs * __cs __efx_ev_qstat_name[] = {
@@ -1052,6 +1053,7 @@ efx_ev_qstat_name(
return (__efx_ev_qstat_name[id]);
}
#endif /* EFSYS_OPT_NAMES */
+#endif /* EFSYS_OPT_QSTATS */
#if EFSYS_OPT_QSTATS
void
Modified: projects/clang360-import/sys/dev/sfxge/common/efx_tx.c
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/common/efx_tx.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/common/efx_tx.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -358,6 +358,7 @@ fail1:
return (rc);
}
+#if EFSYS_OPT_QSTATS
#if EFSYS_OPT_NAMES
/* START MKCONFIG GENERATED EfxTransmitQueueStatNamesBlock 78ca9ab00287fffb */
static const char __cs * __cs __efx_tx_qstat_name[] = {
@@ -378,6 +379,7 @@ efx_tx_qstat_name(
return (__efx_tx_qstat_name[id]);
}
#endif /* EFSYS_OPT_NAMES */
+#endif /* EFSYS_OPT_QSTATS */
#if EFSYS_OPT_QSTATS
void
Modified: projects/clang360-import/sys/dev/sfxge/sfxge.c
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/sfxge.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/sfxge.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -397,11 +397,18 @@ sfxge_create(struct sfxge_softc *sc)
device_t dev;
efx_nic_t *enp;
int error;
+ char rss_param_name[sizeof(SFXGE_PARAM(%d.max_rss_channels))];
dev = sc->dev;
sx_init(&sc->softc_lock, "sfxge_softc");
+ sc->max_rss_channels = 0;
+ snprintf(rss_param_name, sizeof(rss_param_name),
+ SFXGE_PARAM(%d.max_rss_channels),
+ (int)device_get_unit(dev));
+ TUNABLE_INT_FETCH(rss_param_name, &sc->max_rss_channels);
+
sc->stats_node = SYSCTL_ADD_NODE(
device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
Modified: projects/clang360-import/sys/dev/sfxge/sfxge.h
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/sfxge.h Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/sfxge.h Thu Jan 29 19:21:21 2015 (r277896)
@@ -103,26 +103,26 @@ enum sfxge_evq_state {
#define SFXGE_EV_BATCH 16384
struct sfxge_evq {
- struct sfxge_softc *sc __aligned(CACHE_LINE_SIZE);
- struct mtx lock __aligned(CACHE_LINE_SIZE);
-
- enum sfxge_evq_state init_state;
+ /* Structure members below are sorted by usage order */
+ struct sfxge_softc *sc;
+ struct mtx lock;
unsigned int index;
- unsigned int entries;
+ enum sfxge_evq_state init_state;
efsys_mem_t mem;
- unsigned int buf_base_id;
-
- boolean_t exception;
-
efx_evq_t *common;
unsigned int read_ptr;
+ boolean_t exception;
unsigned int rx_done;
unsigned int tx_done;
/* Linked list of TX queues with completions to process */
struct sfxge_txq *txq;
struct sfxge_txq **txqs;
-};
+
+ /* Structure members not used on event processing path */
+ unsigned int buf_base_id;
+ unsigned int entries;
+} __aligned(CACHE_LINE_SIZE);
#define SFXGE_NDESCS 1024
#define SFXGE_MODERATION 30
@@ -225,9 +225,12 @@ struct sfxge_softc {
struct sfxge_evq *evq[SFXGE_RX_SCALE_MAX];
unsigned int ev_moderation;
+#if EFSYS_OPT_QSTATS
clock_t ev_stats_update_time;
uint64_t ev_stats[EV_NQSTATS];
+#endif
+ unsigned int max_rss_channels;
uma_zone_t rxq_cache;
struct sfxge_rxq *rxq[SFXGE_RX_SCALE_MAX];
unsigned int rx_indir_table[SFXGE_RX_SCALE_MAX];
@@ -281,7 +284,7 @@ extern int sfxge_ev_init(struct sfxge_so
extern void sfxge_ev_fini(struct sfxge_softc *sc);
extern int sfxge_ev_start(struct sfxge_softc *sc);
extern void sfxge_ev_stop(struct sfxge_softc *sc);
-extern int sfxge_ev_qpoll(struct sfxge_softc *sc, unsigned int index);
+extern int sfxge_ev_qpoll(struct sfxge_evq *evq);
/*
* From sfxge_intr.c.
Modified: projects/clang360-import/sys/dev/sfxge/sfxge_dma.c
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/sfxge_dma.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/sfxge_dma.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -157,7 +157,7 @@ sfxge_dma_alloc(struct sfxge_softc *sc,
if (bus_dmamap_load(esmp->esm_tag, esmp->esm_map, vaddr, len,
sfxge_dma_cb, &esmp->esm_addr, 0) != 0) {
device_printf(sc->dev, "Couldn't load DMA mapping\n");
- bus_dmamem_free(esmp->esm_tag, esmp->esm_base, esmp->esm_map);
+ bus_dmamem_free(esmp->esm_tag, vaddr, esmp->esm_map);
bus_dma_tag_destroy(esmp->esm_tag);
return (ENOMEM);
}
Modified: projects/clang360-import/sys/dev/sfxge/sfxge_ev.c
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -68,7 +68,7 @@ sfxge_ev_qcomplete(struct sfxge_evq *evq
("txq->evq_index != index"));
if (txq->pending != txq->completed)
- sfxge_tx_qcomplete(txq);
+ sfxge_tx_qcomplete(txq, evq);
txq = next;
} while (txq != NULL);
@@ -262,7 +262,7 @@ sfxge_ev_tx(void *arg, uint32_t label, u
}
if (txq->pending - txq->completed >= SFXGE_TX_BATCH)
- sfxge_tx_qcomplete(txq);
+ sfxge_tx_qcomplete(txq, evq);
done:
return (evq->tx_done >= SFXGE_EV_BATCH);
@@ -406,6 +406,8 @@ sfxge_ev_wake_up(void *arg, uint32_t ind
return (B_FALSE);
}
+#if EFSYS_OPT_QSTATS
+
static void
sfxge_ev_stat_update(struct sfxge_softc *sc)
{
@@ -467,6 +469,8 @@ sfxge_ev_stat_init(struct sfxge_softc *s
}
}
+#endif /* EFSYS_OPT_QSTATS */
+
static void
sfxge_ev_qmoderate(struct sfxge_softc *sc, unsigned int idx, unsigned int us)
{
@@ -569,13 +573,10 @@ static const efx_ev_callbacks_t sfxge_ev
int
-sfxge_ev_qpoll(struct sfxge_softc *sc, unsigned int index)
+sfxge_ev_qpoll(struct sfxge_evq *evq)
{
- struct sfxge_evq *evq;
int rc;
- evq = sc->evq[index];
-
mtx_lock(&evq->lock);
if (evq->init_state != SFXGE_EVQ_STARTING &&
@@ -630,8 +631,10 @@ sfxge_ev_qstop(struct sfxge_softc *sc, u
evq->read_ptr = 0;
evq->exception = B_FALSE;
+#if EFSYS_OPT_QSTATS
/* Add event counts before discarding the common evq state */
efx_ev_qstats_update(evq->common, sc->ev_stats);
+#endif
efx_ev_qdestroy(evq->common);
efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id,
@@ -872,7 +875,7 @@ sfxge_ev_init(struct sfxge_softc *sc)
/* Set default interrupt moderation; add a sysctl to
* read and change it.
*/
- sc->ev_moderation = 30;
+ sc->ev_moderation = SFXGE_MODERATION;
SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
OID_AUTO, "int_mod", CTLTYPE_UINT|CTLFLAG_RW,
sc, 0, sfxge_int_mod_handler, "IU",
@@ -886,7 +889,9 @@ sfxge_ev_init(struct sfxge_softc *sc)
goto fail;
}
+#if EFSYS_OPT_QSTATS
sfxge_ev_stat_init(sc);
+#endif
return (0);
Modified: projects/clang360-import/sys/dev/sfxge/sfxge_intr.c
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/sfxge_intr.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/sfxge_intr.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -110,9 +110,8 @@ static void
sfxge_intr_line(void *arg)
{
struct sfxge_evq *evq = arg;
- struct sfxge_softc *sc = evq->sc;
- (void)sfxge_ev_qpoll(sc, 0);
+ (void)sfxge_ev_qpoll(evq);
}
static void
@@ -146,7 +145,7 @@ sfxge_intr_message(void *arg)
return;
}
- (void)sfxge_ev_qpoll(sc, index);
+ (void)sfxge_ev_qpoll(evq);
}
static int
@@ -303,6 +302,9 @@ sfxge_intr_setup_msix(struct sfxge_softc
if (count > EFX_MAXRSS)
count = EFX_MAXRSS;
+ if (sc->max_rss_channels > 0 && count > sc->max_rss_channels)
+ count = sc->max_rss_channels;
+
rid = PCIR_BAR(4);
resp = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
if (resp == NULL)
Modified: projects/clang360-import/sys/dev/sfxge/sfxge_port.c
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/sfxge_port.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/sfxge_port.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -583,7 +583,6 @@ sfxge_port_init(struct sfxge_softc *sc)
M_SFXGE, M_WAITOK | M_ZERO);
if ((rc = sfxge_dma_alloc(sc, EFX_PHY_STATS_SIZE, phy_stats_buf)) != 0)
goto fail;
- bzero(phy_stats_buf->esm_base, phy_stats_buf->esm_size);
sfxge_phy_stat_init(sc);
sysctl_ctx = device_get_sysctl_ctx(sc->dev);
@@ -605,7 +604,6 @@ sfxge_port_init(struct sfxge_softc *sc)
M_SFXGE, M_WAITOK | M_ZERO);
if ((rc = sfxge_dma_alloc(sc, EFX_MAC_STATS_SIZE, mac_stats_buf)) != 0)
goto fail2;
- bzero(mac_stats_buf->esm_base, mac_stats_buf->esm_size);
sfxge_mac_stat_init(sc);
port->init_state = SFXGE_PORT_INITIALIZED;
Modified: projects/clang360-import/sys/dev/sfxge/sfxge_tx.c
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/sfxge_tx.c Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/sfxge_tx.c Thu Jan 29 19:21:21 2015 (r277896)
@@ -85,14 +85,23 @@ static int sfxge_tx_dpl_get_max = SFXGE_
TUNABLE_INT(SFXGE_PARAM_TX_DPL_GET_MAX, &sfxge_tx_dpl_get_max);
SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_get_max, CTLFLAG_RDTUN,
&sfxge_tx_dpl_get_max, 0,
- "Maximum number of packets in deferred packet get-list");
+ "Maximum number of any packets in deferred packet get-list");
+
+#define SFXGE_PARAM_TX_DPL_GET_NON_TCP_MAX \
+ SFXGE_PARAM(tx_dpl_get_non_tcp_max)
+static int sfxge_tx_dpl_get_non_tcp_max =
+ SFXGE_TX_DPL_GET_NON_TCP_PKT_LIMIT_DEFAULT;
+TUNABLE_INT(SFXGE_PARAM_TX_DPL_GET_NON_TCP_MAX, &sfxge_tx_dpl_get_non_tcp_max);
+SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_get_non_tcp_max, CTLFLAG_RDTUN,
+ &sfxge_tx_dpl_get_non_tcp_max, 0,
+ "Maximum number of non-TCP packets in deferred packet get-list");
#define SFXGE_PARAM_TX_DPL_PUT_MAX SFXGE_PARAM(tx_dpl_put_max)
static int sfxge_tx_dpl_put_max = SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT;
TUNABLE_INT(SFXGE_PARAM_TX_DPL_PUT_MAX, &sfxge_tx_dpl_put_max);
SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_put_max, CTLFLAG_RDTUN,
&sfxge_tx_dpl_put_max, 0,
- "Maximum number of packets in deferred packet put-list");
+ "Maximum number of any packets in deferred packet put-list");
#endif
@@ -105,15 +114,10 @@ static int sfxge_tx_queue_tso(struct sfx
const bus_dma_segment_t *dma_seg, int n_dma_seg);
void
-sfxge_tx_qcomplete(struct sfxge_txq *txq)
+sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq)
{
- struct sfxge_softc *sc;
- struct sfxge_evq *evq;
unsigned int completed;
- sc = txq->sc;
- evq = sc->evq[txq->evq_index];
-
mtx_assert(&evq->lock, MA_OWNED);
completed = txq->completed;
@@ -152,6 +156,15 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq
#ifdef SFXGE_HAVE_MQ
+static inline unsigned int
+sfxge_is_mbuf_non_tcp(struct mbuf *mbuf)
+{
+ /* Absense of TCP checksum flags does not mean that it is non-TCP
+ * but it should be true if user wants to achieve high throughput.
+ */
+ return (!(mbuf->m_pkthdr.csum_flags & (CSUM_IP_TCP | CSUM_IP6_TCP)));
+}
+
/*
* Reorder the put list and append it to the get list.
*/
@@ -163,6 +176,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *
volatile uintptr_t *putp;
uintptr_t put;
unsigned int count;
+ unsigned int non_tcp_count;
mtx_assert(&txq->lock, MA_OWNED);
@@ -181,9 +195,11 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *
get_next = NULL;
count = 0;
+ non_tcp_count = 0;
do {
struct mbuf *put_next;
+ non_tcp_count += sfxge_is_mbuf_non_tcp(mbuf);
put_next = mbuf->m_nextpkt;
mbuf->m_nextpkt = get_next;
get_next = mbuf;
@@ -197,6 +213,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *
*stdp->std_getp = get_next;
stdp->std_getp = get_tailp;
stdp->std_get_count += count;
+ stdp->std_get_non_tcp_count += non_tcp_count;
}
#endif /* SFXGE_HAVE_MQ */
@@ -387,6 +404,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx
struct sfxge_tx_dpl *stdp;
struct mbuf *mbuf, *next;
unsigned int count;
+ unsigned int non_tcp_count;
unsigned int pushed;
int rc;
@@ -401,6 +419,10 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx
mbuf = stdp->std_get;
count = stdp->std_get_count;
+ non_tcp_count = stdp->std_get_non_tcp_count;
+
+ if (count > stdp->std_get_hiwat)
+ stdp->std_get_hiwat = count;
while (count != 0) {
KASSERT(mbuf != NULL, ("mbuf == NULL"));
@@ -415,6 +437,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx
rc = sfxge_tx_queue_mbuf(txq, mbuf);
--count;
+ non_tcp_count -= sfxge_is_mbuf_non_tcp(mbuf);
mbuf = next;
if (rc != 0)
continue;
@@ -431,12 +454,16 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx
if (count == 0) {
KASSERT(mbuf == NULL, ("mbuf != NULL"));
+ KASSERT(non_tcp_count == 0,
+ ("inconsistent TCP/non-TCP detection"));
stdp->std_get = NULL;
stdp->std_get_count = 0;
+ stdp->std_get_non_tcp_count = 0;
stdp->std_getp = &stdp->std_get;
} else {
stdp->std_get = mbuf;
stdp->std_get_count = count;
+ stdp->std_get_non_tcp_count = non_tcp_count;
}
if (txq->added != pushed)
@@ -496,8 +523,18 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq,
sfxge_tx_qdpl_swizzle(txq);
- if (stdp->std_get_count >= stdp->std_get_max)
+ if (stdp->std_get_count >= stdp->std_get_max) {
+ txq->get_overflow++;
return (ENOBUFS);
+ }
+ if (sfxge_is_mbuf_non_tcp(mbuf)) {
+ if (stdp->std_get_non_tcp_count >=
+ stdp->std_get_non_tcp_max) {
+ txq->get_non_tcp_overflow++;
+ return (ENOBUFS);
+ }
+ stdp->std_get_non_tcp_count++;
+ }
*(stdp->std_getp) = mbuf;
stdp->std_getp = &mbuf->m_nextpkt;
@@ -518,8 +555,10 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq,
old_len = mp->m_pkthdr.csum_data;
} else
old_len = 0;
- if (old_len >= stdp->std_put_max)
+ if (old_len >= stdp->std_put_max) {
+ atomic_add_long(&txq->put_overflow, 1);
return (ENOBUFS);
+ }
mbuf->m_pkthdr.csum_data = old_len + 1;
mbuf->m_nextpkt = (void *)old;
} while (atomic_cmpset_ptr(putp, old, new) == 0);
@@ -540,6 +579,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx
if (!SFXGE_LINK_UP(txq->sc)) {
rc = ENETDOWN;
+ atomic_add_long(&txq->netdown_drops, 1);
goto fail;
}
@@ -577,7 +617,6 @@ sfxge_tx_packet_add(struct sfxge_txq *tx
fail:
m_freem(m);
- atomic_add_long(&txq->early_drops, 1);
return (rc);
}
@@ -596,6 +635,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx
}
stdp->std_get = NULL;
stdp->std_get_count = 0;
+ stdp->std_get_non_tcp_count = 0;
stdp->std_getp = &stdp->std_get;
mtx_unlock(&txq->lock);
@@ -855,9 +895,7 @@ static void tso_start(struct sfxge_tso_s
tso->tcph_off = tso->nh_off + sizeof(struct ip6_hdr);
}
- /* We assume all headers are linear in the head mbuf */
tso->header_len = tso->tcph_off + 4 * tso_tcph(tso)->th_off;
- KASSERT(tso->header_len <= mbuf->m_len, ("packet headers fragmented"));
tso->full_packet_size = tso->header_len + mbuf->m_pkthdr.tso_segsz;
tso->seqnum = ntohl(tso_tcph(tso)->th_seq);
@@ -972,7 +1010,7 @@ static int tso_start_new_packet(struct s
tsoh_th = (struct tcphdr *)(header + tso->tcph_off);
/* Copy and update the headers. */
- memcpy(header, tso->mbuf->m_data, tso->header_len);
+ m_copydata(tso->mbuf, 0, tso->header_len, header);
tsoh_th->th_seq = htonl(tso->seqnum);
tso->seqnum += tso->mbuf->m_pkthdr.tso_segsz;
@@ -1018,20 +1056,18 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq
{
struct sfxge_tso_state tso;
unsigned int id, next_id;
+ unsigned skipped = 0;
tso_start(&tso, mbuf);
- /* Grab the first payload fragment. */
- if (dma_seg->ds_len == tso.header_len) {
+ while (dma_seg->ds_len + skipped <= tso.header_len) {
+ skipped += dma_seg->ds_len;
--n_dma_seg;
KASSERT(n_dma_seg, ("no payload found in TSO packet"));
++dma_seg;
- tso.in_len = dma_seg->ds_len;
- tso.dma_addr = dma_seg->ds_addr;
- } else {
- tso.in_len = dma_seg->ds_len - tso.header_len;
- tso.dma_addr = dma_seg->ds_addr + tso.header_len;
}
+ tso.in_len = dma_seg->ds_len + (tso.header_len - skipped);
+ tso.dma_addr = dma_seg->ds_addr + (tso.header_len - skipped);
id = txq->added & txq->ptr_mask;
if (__predict_false(tso_start_new_packet(txq, &tso, id)))
@@ -1151,7 +1187,7 @@ sfxge_tx_qstop(struct sfxge_softc *sc, u
txq->blocked = 0;
txq->pending = txq->added;
- sfxge_tx_qcomplete(txq);
+ sfxge_tx_qcomplete(txq, evq);
KASSERT(txq->completed == txq->added,
("txq->completed != txq->added"));
@@ -1411,6 +1447,13 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u
rc = EINVAL;
goto fail_tx_dpl_get_max;
}
+ if (sfxge_tx_dpl_get_non_tcp_max <= 0) {
+ log(LOG_ERR, "%s=%d must be greater than 0",
+ SFXGE_PARAM_TX_DPL_GET_NON_TCP_MAX,
+ sfxge_tx_dpl_get_non_tcp_max);
+ rc = EINVAL;
+ goto fail_tx_dpl_get_max;
+ }
if (sfxge_tx_dpl_put_max < 0) {
log(LOG_ERR, "%s=%d must be greater or equal to 0",
SFXGE_PARAM_TX_DPL_PUT_MAX, sfxge_tx_dpl_put_max);
@@ -1422,6 +1465,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u
stdp = &txq->dpl;
stdp->std_put_max = sfxge_tx_dpl_put_max;
stdp->std_get_max = sfxge_tx_dpl_get_max;
+ stdp->std_get_non_tcp_max = sfxge_tx_dpl_get_non_tcp_max;
stdp->std_getp = &stdp->std_get;
mtx_init(&txq->lock, "txq", NULL, MTX_DEF);
@@ -1430,6 +1474,14 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u
SYSCTL_CHILDREN(txq_node), OID_AUTO,
"dpl_get_count", CTLFLAG_RD | CTLFLAG_STATS,
&stdp->std_get_count, 0, "");
+ SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev),
+ SYSCTL_CHILDREN(txq_node), OID_AUTO,
+ "dpl_get_non_tcp_count", CTLFLAG_RD | CTLFLAG_STATS,
+ &stdp->std_get_non_tcp_count, 0, "");
+ SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev),
+ SYSCTL_CHILDREN(txq_node), OID_AUTO,
+ "dpl_get_hiwat", CTLFLAG_RD | CTLFLAG_STATS,
+ &stdp->std_get_hiwat, 0, "");
#endif
txq->type = type;
@@ -1467,7 +1519,10 @@ static const struct {
SFXGE_TX_STAT(tso_long_headers, tso_long_headers),
SFXGE_TX_STAT(tx_collapses, collapses),
SFXGE_TX_STAT(tx_drops, drops),
- SFXGE_TX_STAT(tx_early_drops, early_drops),
+ SFXGE_TX_STAT(tx_get_overflow, get_overflow),
+ SFXGE_TX_STAT(tx_get_non_tcp_overflow, get_non_tcp_overflow),
+ SFXGE_TX_STAT(tx_put_overflow, put_overflow),
+ SFXGE_TX_STAT(tx_netdown_drops, netdown_drops),
};
static int
Modified: projects/clang360-import/sys/dev/sfxge/sfxge_tx.h
==============================================================================
--- projects/clang360-import/sys/dev/sfxge/sfxge_tx.h Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/dev/sfxge/sfxge_tx.h Thu Jan 29 19:21:21 2015 (r277896)
@@ -75,21 +75,29 @@ struct sfxge_tx_mapping {
enum sfxge_tx_buf_flags flags;
};
-#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 1024
-#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64
+#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT (64 * 1024)
+#define SFXGE_TX_DPL_GET_NON_TCP_PKT_LIMIT_DEFAULT 1024
+#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64
/*
* Deferred packet list.
*/
struct sfxge_tx_dpl {
- unsigned int std_get_max; /* Maximum number of packets
+ unsigned int std_get_max; /* Maximum number of packets
* in get list */
- unsigned int std_put_max; /* Maximum number of packets
+ unsigned int std_get_non_tcp_max; /* Maximum number
+ * of non-TCP packets
+ * in get list */
+ unsigned int std_put_max; /* Maximum number of packets
* in put list */
- uintptr_t std_put; /* Head of put list. */
- struct mbuf *std_get; /* Head of get list. */
- struct mbuf **std_getp; /* Tail of get list. */
- unsigned int std_get_count; /* Packets in get list. */
+ uintptr_t std_put; /* Head of put list. */
+ struct mbuf *std_get; /* Head of get list. */
+ struct mbuf **std_getp; /* Tail of get list. */
+ unsigned int std_get_count; /* Packets in get list. */
+ unsigned int std_get_non_tcp_count; /* Non-TCP packets
+ * in get list */
+ unsigned int std_get_hiwat; /* Packets in get list
+ * high watermark */
};
@@ -139,7 +147,6 @@ struct sfxge_txq {
bus_dma_tag_t packet_dma_tag;
efx_buffer_t *pend_desc;
efx_txq_t *common;
- struct sfxge_txq *next;
efsys_mem_t *tsoh_buffer;
@@ -166,22 +173,28 @@ struct sfxge_txq {
unsigned long tso_long_headers;
unsigned long collapses;
unsigned long drops;
- unsigned long early_drops;
+ unsigned long get_overflow;
+ unsigned long get_non_tcp_overflow;
+ unsigned long put_overflow;
+ unsigned long netdown_drops;
/* The following fields change more often, and are used mostly
* on the completion path
*/
unsigned int pending __aligned(CACHE_LINE_SIZE);
unsigned int completed;
+ struct sfxge_txq *next;
};
+struct sfxge_evq;
+
extern int sfxge_tx_packet_add(struct sfxge_txq *, struct mbuf *);
extern int sfxge_tx_init(struct sfxge_softc *sc);
extern void sfxge_tx_fini(struct sfxge_softc *sc);
extern int sfxge_tx_start(struct sfxge_softc *sc);
extern void sfxge_tx_stop(struct sfxge_softc *sc);
-extern void sfxge_tx_qcomplete(struct sfxge_txq *txq);
+extern void sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq);
extern void sfxge_tx_qflush_done(struct sfxge_txq *txq);
#ifdef SFXGE_HAVE_MQ
extern void sfxge_if_qflush(struct ifnet *ifp);
Modified: projects/clang360-import/sys/sys/cdefs.h
==============================================================================
--- projects/clang360-import/sys/sys/cdefs.h Thu Jan 29 19:11:37 2015 (r277895)
+++ projects/clang360-import/sys/sys/cdefs.h Thu Jan 29 19:21:21 2015 (r277896)
@@ -252,7 +252,7 @@
* Keywords added in C11.
*/
-#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint)
#if !__has_extension(c_alignas)
#if (defined(__cplusplus) && __cplusplus >= 201103L) || \
More information about the svn-src-projects
mailing list