svn commit: r280494 - stable/10/tools/regression/sysvshm
Author: kib Date: Wed Mar 25 08:23:08 2015 New Revision: 280494 URL: https://svnweb.freebsd.org/changeset/base/280494 Log: MFC r280232: Cosmetics. Modified: stable/10/tools/regression/sysvshm/shmtest.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/sysvshm/shmtest.c == --- stable/10/tools/regression/sysvshm/shmtest.cWed Mar 25 06:41:08 2015(r280493) +++ stable/10/tools/regression/sysvshm/shmtest.cWed Mar 25 08:23:08 2015(r280494) @@ -49,27 +49,22 @@ #include time.h #include unistd.h -intmain __P((int, char *[])); -void print_shmid_ds __P((struct shmid_ds *, mode_t)); -void sigsys_handler __P((int)); -void sigchld_handler __P((int)); -void cleanup __P((void)); -void receiver __P((void)); -void usage __P((void)); - -const char *m_str = The quick brown fox jumped over the lazy dog.; - -intsender_shmid = -1; -pid_t child_pid; - -key_t shmkey; - -size_t pgsize; +static void print_shmid_ds(struct shmid_ds *, mode_t); +static void sigsys_handler(int); +static void sigchld_handler(int); +static void cleanup(void); +static void receiver(void); +static void usage(void); + +static const char *m_str = The quick brown fox jumped over the lazy dog.; + +static int sender_shmid = -1; +static pid_t child_pid; +static key_t shmkey; +static size_t pgsize; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct sigaction sa; struct shmid_ds s_ds; @@ -172,17 +167,15 @@ main(argc, argv) errx(1, sender: received unexpected signal); } -void -sigsys_handler(signo) - int signo; +static void +sigsys_handler(int signo __unused) { errx(1, System V Shared Memory support is not present in the kernel); } -void -sigchld_handler(signo) - int signo; +static void +sigchld_handler(int signo __unused) { struct shmid_ds s_ds; int cstatus; @@ -214,8 +207,8 @@ sigchld_handler(signo) exit(0); } -void -cleanup() +static void +cleanup(void) { /* @@ -227,10 +220,8 @@ cleanup() } } -void -print_shmid_ds(sp, mode) - struct shmid_ds *sp; - mode_t mode; +static void +print_shmid_ds(struct shmid_ds *sp, mode_t mode) { uid_t uid = geteuid(); gid_t gid = getegid(); @@ -262,16 +253,16 @@ print_shmid_ds(sp, mode) errx(1, mode mismatch); } -void -usage() +static void +usage(void) { fprintf(stderr, usage: %s keypath\n, getprogname()); exit(1); } -void -receiver() +static void +receiver(void) { int shmid; void *shm_buf; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280495 - head/sys/kern
Author: hselasky Date: Wed Mar 25 08:55:34 2015 New Revision: 280495 URL: https://svnweb.freebsd.org/changeset/base/280495 Log: Implement a simple OID number garbage collector. Given the increasing number of dynamically created and destroyed SYSCTLs during runtime it is very likely that the current new OID number limit of 0x7fff can be reached. Especially if dynamic OID creation and destruction results from automatic tests. Additional changes: - Optimize the typical use case by decrementing the next automatic OID sequence number instead of incrementing it. This saves searching time when inserting new OIDs into a fresh parent OID node. - Add simple check for duplicate non-automatic OID numbers. MFC after: 1 week Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c == --- head/sys/kern/kern_sysctl.c Wed Mar 25 08:23:08 2015(r280494) +++ head/sys/kern/kern_sysctl.c Wed Mar 25 08:55:34 2015(r280495) @@ -296,6 +296,8 @@ sysctl_register_oid(struct sysctl_oid *o struct sysctl_oid_list *parent = oidp-oid_parent; struct sysctl_oid *p; struct sysctl_oid *q; + int oid_number; + int timeout = 2; /* * First check if another oid with the same name already @@ -312,37 +314,66 @@ sysctl_register_oid(struct sysctl_oid *o return; } } + /* get current OID number */ + oid_number = oidp-oid_number; + +#if (OID_AUTO = 0) +#error OID_AUTO is expected to be a negative value +#endif /* -* If this oid has a number OID_AUTO, give it a number which -* is greater than any current oid. +* Any negative OID number qualifies as OID_AUTO. Valid OID +* numbers should always be positive. +* * NOTE: DO NOT change the starting value here, change it in * sys/sysctl.h, and make sure it is at least 256 to * accomodate e.g. net.inet.raw as a static sysctl node. */ - if (oidp-oid_number == OID_AUTO) { - static int newoid = CTL_AUTO_START; + if (oid_number 0) { + static int newoid; + + /* +* By decrementing the next OID number we spend less +* time inserting the OIDs into a sorted list. +*/ + if (--newoid CTL_AUTO_START) + newoid = 0x7fff; - oidp-oid_number = newoid++; - if (newoid == 0x7fff) - panic(out of oids); - } -#if 0 - else if (oidp-oid_number = CTL_AUTO_START) { - /* do not panic; this happens when unregistering sysctl sets */ - printf(static sysctl oid too high: %d, oidp-oid_number); + oid_number = newoid; } -#endif /* -* Insert the oid into the parent's list in order. +* Insert the OID into the parent's list sorted by OID number. */ +retry: q = NULL; SLIST_FOREACH(p, parent, oid_link) { - if (oidp-oid_number p-oid_number) + /* check if the current OID number is in use */ + if (oid_number == p-oid_number) { + /* get the next valid OID number */ + if (oid_number CTL_AUTO_START || + oid_number == 0x7fff) { + /* wraparound - restart */ + oid_number = CTL_AUTO_START; + /* don't loop forever */ + if (!timeout--) + panic(sysctl: Out of OID numbers\n); + goto retry; + } else { + oid_number++; + } + } else if (oid_number p-oid_number) break; q = p; } - if (q) + /* check for non-auto OID number collision */ + if (oidp-oid_number = 0 oidp-oid_number CTL_AUTO_START + oid_number = CTL_AUTO_START) { + printf(sysctl: OID number(%d) is already in use for '%s'\n, + oidp-oid_number, oidp-oid_name); + } + /* update the OID number, if any */ + oidp-oid_number = oid_number; + if (q != NULL) SLIST_INSERT_AFTER(q, oidp, oid_link); else SLIST_INSERT_HEAD(parent, oidp, oid_link); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280496 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 09:40:48 2015 New Revision: 280496 URL: https://svnweb.freebsd.org/changeset/base/280496 Log: MFC: 263297 Return error when packet is dropped because of link down. Submitted by: Boris Misenov Boris.Misenov at oktetlabs.ru Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 08:55:34 2015 (r280495) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:40:48 2015 (r280496) @@ -604,7 +604,7 @@ sfxge_if_transmit(struct ifnet *ifp, str if (!SFXGE_LINK_UP(sc)) { m_freem(m); - return (0); + return (ENETDOWN); } /* Pick the desired transmit queue. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280497 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 09:45:07 2015 New Revision: 280497 URL: https://svnweb.freebsd.org/changeset/base/280497 Log: MFC: 263332 Add counter for Tx errors returned from if_transmit. Submitted by: Boris Misenov Boris.Misenov at oktetlabs.ru Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:40:48 2015 (r280496) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:45:07 2015 (r280497) @@ -515,6 +515,11 @@ sfxge_tx_packet_add(struct sfxge_txq *tx int locked; int rc; + if (!SFXGE_LINK_UP(txq-sc)) { + rc = ENETDOWN; + goto fail; + } + /* * Try to grab the txq lock. If we are able to get the lock, * the packet will be appended to the get list of the deferred @@ -552,6 +557,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx fail: m_freem(m); + atomic_add_long(txq-early_drops, 1); return (rc); } @@ -602,11 +608,6 @@ sfxge_if_transmit(struct ifnet *ifp, str KASSERT(ifp-if_flags IFF_UP, (interface not up)); - if (!SFXGE_LINK_UP(sc)) { - m_freem(m); - return (ENETDOWN); - } - /* Pick the desired transmit queue. */ if (m-m_pkthdr.csum_flags (CSUM_DELAY_DATA | CSUM_TSO)) { int index = 0; @@ -1406,6 +1407,7 @@ 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), }; static int Modified: stable/10/sys/dev/sfxge/sfxge_tx.h == --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 09:40:48 2015 (r280496) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 09:45:07 2015 (r280497) @@ -159,6 +159,7 @@ struct sfxge_txq { unsigned long tso_long_headers; unsigned long collapses; unsigned long drops; + unsigned long early_drops; /* The following fields change more often, and are used mostly * on the completion path ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280498 - stable/10/share/man/man9
Author: dchagin Date: Wed Mar 25 09:54:07 2015 New Revision: 280498 URL: https://svnweb.freebsd.org/changeset/base/280498 Log: MFC r279776: Add a cred parameter to the VOP_VPTOCNP(9) manpage. While here fix igor warning about new line. Modified: stable/10/share/man/man9/VOP_VPTOCNP.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/VOP_VPTOCNP.9 == --- stable/10/share/man/man9/VOP_VPTOCNP.9 Wed Mar 25 09:45:07 2015 (r280497) +++ stable/10/share/man/man9/VOP_VPTOCNP.9 Wed Mar 25 09:54:07 2015 (r280498) @@ -28,7 +28,7 @@ .\ .\ $FreeBSD$ .\ -.Dd November 19, 2011 +.Dd March 8, 2015 .Dt VOP_VPTOCNP 9 .Os .Sh NAME @@ -36,9 +36,10 @@ .Nd translate a vnode to its component name .Sh SYNOPSIS .In sys/param.h +.In sys/ucred.h .In sys/vnode.h .Ft int -.Fn VOP_VPTOCNP struct vnode *vp struct vnode **dvp char *buf int *buflen +.Fn VOP_VPTOCNP struct vnode *vp struct vnode **dvp struct ucred *cred char *buf int *buflen .Sh DESCRIPTION This translates a vnode into its component name, and writes that name to the head of the buffer specified by @@ -49,6 +50,8 @@ The vnode to translate. .It Fa dvp The vnode of the parent directory of .Fa vp . +.It Fa cred +The caller credentials. .It Fa buf The buffer into which to prepend the component name. .It Fa buflen @@ -59,7 +62,8 @@ The default implementation of .Nm scans through .Fa vp Ns 's -parent directory looking for a dirent with a matching file number. If +parent directory looking for a dirent with a matching file number. +If .Fa vp is not a directory, then .Nm ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280503 - stable/10/share/man/man4
Author: arybchik Date: Wed Mar 25 10:02:14 2015 New Revision: 280503 URL: https://svnweb.freebsd.org/changeset/base/280503 Log: MFC: 272329 Update SolarFlare driver manual page with new tunables. Submitted by: Andrew Rybchenko arybchenko at solarflare.com Sponsored by: Solarflare Communications, Inc. Modified: stable/10/share/man/man4/sfxge.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 == --- stable/10/share/man/man4/sfxge.4Wed Mar 25 10:01:07 2015 (r280502) +++ stable/10/share/man/man4/sfxge.4Wed Mar 25 10:02:14 2015 (r280503) @@ -76,6 +76,32 @@ The .Nm driver supports all 10Gb Ethernet adapters based on Solarflare SFC9000 family controllers. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +Actual values can be obtained using +.Xr sysctl 8 . +.Bl -tag -width indent +.It Va hw.sfxge.rx_ring +Maximum number of descriptors in a receive queue ring. +Supported values are: 512, 1024, 2048 and 4096. +.It Va hw.sfxge.tx_ring +Maximum number of descriptors in a transmit queue ring. +Supported values are: 512, 1024, 2048 and 4096. +.It Va hw.sfxge.tx_dpl_get_max +The maximum length of the deferred packet 'get-list' for queued transmit +packets, used only if the transmit queue lock can be acquired. +If packet is dropped, \fItx_early_drops\fR counter grows and local sender +gets ENOBUFS error. +Value must be greater than 0. +.It Va hw.sfxge.tx_dpl_put_max +The maximum length of the deferred packet 'put-list' for queued transmit +packets, used if the transmit queue lock cannot be acquired. +If packet is dropped, \fItx_early_drops\fR counter grows and local sender +gets ENOBUFS error. +Value must be greater or equal to 0. .Sh SUPPORT For general information and support, go to the Solarflare support website at: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280506 - stable/10/share/man/man4
Author: arybchik Date: Wed Mar 25 10:06:26 2015 New Revision: 280506 URL: https://svnweb.freebsd.org/changeset/base/280506 Log: MFC: 272377 Some cleanup for sfxge.4 Use standard mdoc macros instead of pure roff, fix some other mdoc usage, make the style consistent, and fix some grammar issues. Approved by:hrs (mentor) Modified: stable/10/share/man/man4/sfxge.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 == --- stable/10/share/man/man4/sfxge.4Wed Mar 25 10:05:19 2015 (r280505) +++ stable/10/share/man/man4/sfxge.4Wed Mar 25 10:06:26 2015 (r280506) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd February 8, 2012 +.Dd September 30, 2014 .Dt SFXGE 4 .Os .Sh NAME @@ -85,23 +85,30 @@ Actual values can be obtained using .Xr sysctl 8 . .Bl -tag -width indent .It Va hw.sfxge.rx_ring -Maximum number of descriptors in a receive queue ring. +The maximum number of descriptors in a receive queue ring. Supported values are: 512, 1024, 2048 and 4096. .It Va hw.sfxge.tx_ring -Maximum number of descriptors in a transmit queue ring. +The maximum number of descriptors in a transmit queue ring. Supported values are: 512, 1024, 2048 and 4096. .It Va hw.sfxge.tx_dpl_get_max -The maximum length of the deferred packet 'get-list' for queued transmit +The maximum length of the deferred packet +.Dq get-list +for queued transmit packets, used only if the transmit queue lock can be acquired. -If packet is dropped, \fItx_early_drops\fR counter grows and local sender -gets ENOBUFS error. -Value must be greater than 0. +If a packet is dropped, the +.Va tx_early_drops +counter is incremented and the local sender receives ENOBUFS. +The value must be greater than 0. .It Va hw.sfxge.tx_dpl_put_max -The maximum length of the deferred packet 'put-list' for queued transmit +The maximum length of the deferred packet +.Dq put-list +for queued transmit packets, used if the transmit queue lock cannot be acquired. -If packet is dropped, \fItx_early_drops\fR counter grows and local sender -gets ENOBUFS error. -Value must be greater or equal to 0. +If a packet is dropped, the +.Va tx_early_drops +counter is incremented and the local sender receives ENOBUFS. +The value must be greater than or equal to 0. +.El .Sh SUPPORT For general information and support, go to the Solarflare support website at: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280508 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:11:17 2015 New Revision: 280508 URL: https://svnweb.freebsd.org/changeset/base/280508 Log: MFC: 277884 sfxge: Change sfxge_ev_qpoll() proto to avoid EVQ pointers array access It was the only place on data path where sc-evq array is accessed. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_intr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h == --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:08:28 2015 (r280507) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:11:17 2015 (r280508) @@ -280,7 +280,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: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:08:28 2015 (r280507) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:11:17 2015 (r280508) @@ -564,13 +564,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 Modified: stable/10/sys/dev/sfxge/sfxge_intr.c == --- stable/10/sys/dev/sfxge/sfxge_intr.cWed Mar 25 10:08:28 2015 (r280507) +++ stable/10/sys/dev/sfxge/sfxge_intr.cWed Mar 25 10:11:17 2015 (r280508) @@ -106,9 +106,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 @@ -142,7 +141,7 @@ sfxge_intr_message(void *arg) return; } - (void)sfxge_ev_qpoll(sc, index); + (void)sfxge_ev_qpoll(evq); } static int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280513 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:17:24 2015 New Revision: 280513 URL: https://svnweb.freebsd.org/changeset/base/280513 Log: MFC: 277889 sfxge: Add evq argument to sfxge_tx_qcomplete() It removes necessity to get evq pointer by its index in soft context. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:16:33 2015 (r280512) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:17:24 2015 (r280513) @@ -63,7 +63,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); @@ -257,7 +257,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); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:16:33 2015 (r280512) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:17:24 2015 (r280513) @@ -105,15 +105,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; @@ -1146,7 +1141,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)); Modified: stable/10/sys/dev/sfxge/sfxge_tx.h == --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:16:33 2015 (r280512) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:17:24 2015 (r280513) @@ -175,13 +175,15 @@ struct sfxge_txq { 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); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280512 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:16:33 2015 New Revision: 280512 URL: https://svnweb.freebsd.org/changeset/base/280512 Log: MFC: 277888 sfxge: fixed TSO code to cope with VLAN headers Submitted by: Artem V. Andreev Artem.Andreev at oktetlabs.ru Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:14:30 2015 (r280511) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:16:33 2015 (r280512) @@ -854,9 +854,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); @@ -971,7 +969,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; @@ -1017,20 +1015,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))) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280514 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:18:23 2015 New Revision: 280514 URL: https://svnweb.freebsd.org/changeset/base/280514 Log: MFC: 277890 sfxge: Do not bzero() DMA allocated memory once again sfxge_dma_alloc() calls bus_dmamem_alloc() with BUS_DMA_ZERO flag, so allocated memory is already filled in by zeros Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c == --- stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 10:17:24 2015 (r280513) +++ stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 10:18:23 2015 (r280514) @@ -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; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280519 - in stable/10: share/man/man4 sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:25:45 2015 New Revision: 280519 URL: https://svnweb.freebsd.org/changeset/base/280519 Log: MFC: 277895 sfxge: Separate software Tx queue limit for non-TCP traffic Add separate software Tx queue limit for non-TCP traffic to make total limit higher and avoid local drops of TCP packets because of no backpressure. There is no point to make non-TCP limit high since without backpressure UDP stream easily overflows any sensible limit. Split early drops statistics since it is better to have separate counter for each drop reason to make it unabmiguous. Add software Tx queue high watermark. The information is very useful to understand how big queues grow under traffic load. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/share/man/man4/sfxge.4 stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 == --- stable/10/share/man/man4/sfxge.4Wed Mar 25 10:23:00 2015 (r280518) +++ stable/10/share/man/man4/sfxge.4Wed Mar 25 10:25:45 2015 (r280519) @@ -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,7 +113,7 @@ 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 Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:23:00 2015 (r280518) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:25:45 2015 (r280519) @@ -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); + +#defineSFXGE_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); #defineSFXGE_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 @@ -147,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. */ @@ -158,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); @@ -176,9 +195,11 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * get_next = NULL; count = 0; + non_tcp_count = 0; do { struct mbuf *put_next; +
svn commit: r280523 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:29:08 2015 New Revision: 280523 URL: https://svnweb.freebsd.org/changeset/base/280523 Log: MFC: 278248 sfxge: access statistics buffers under port lock Allow access to statistics data not only from sysctl handlers. Submitted by: Boris Misenov Boris.Misenov at oktetlabs.ru Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c == --- stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 10:27:54 2015 (r280522) +++ stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 10:29:08 2015 (r280523) @@ -48,7 +48,7 @@ sfxge_mac_stat_update(struct sfxge_softc unsigned int count; int rc; - SFXGE_PORT_LOCK(port); + SFXGE_PORT_LOCK_ASSERT_OWNED(port); if (port-init_state != SFXGE_PORT_STARTED) { rc = 0; @@ -82,7 +82,6 @@ sfxge_mac_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: - SFXGE_PORT_UNLOCK(port); return (rc); } @@ -93,12 +92,16 @@ sfxge_mac_stat_handler(SYSCTL_HANDLER_AR unsigned int id = arg2; int rc; + SFXGE_PORT_LOCK(sc-port); if ((rc = sfxge_mac_stat_update(sc)) != 0) - return (rc); + goto out; - return (SYSCTL_OUT(req, - (uint64_t *)sc-port.mac_stats.decode_buf + id, - sizeof(uint64_t))); + rc = SYSCTL_OUT(req, + (uint64_t *)sc-port.mac_stats.decode_buf + id, + sizeof(uint64_t)); +out: + SFXGE_PORT_UNLOCK(sc-port); + return (rc); } static void @@ -453,7 +456,7 @@ sfxge_phy_stat_update(struct sfxge_softc unsigned int count; int rc; - SFXGE_PORT_LOCK(port); + SFXGE_PORT_LOCK_ASSERT_OWNED(port); if (port-init_state != SFXGE_PORT_STARTED) { rc = 0; @@ -487,7 +490,6 @@ sfxge_phy_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: - SFXGE_PORT_UNLOCK(port); return (rc); } @@ -498,12 +500,16 @@ sfxge_phy_stat_handler(SYSCTL_HANDLER_AR unsigned int id = arg2; int rc; + SFXGE_PORT_LOCK(sc-port); if ((rc = sfxge_phy_stat_update(sc)) != 0) - return (rc); + goto out; - return (SYSCTL_OUT(req, - (uint32_t *)sc-port.phy_stats.decode_buf + id, - sizeof(uint32_t))); + rc = SYSCTL_OUT(req, + (uint32_t *)sc-port.phy_stats.decode_buf + id, + sizeof(uint32_t)); +out: + SFXGE_PORT_UNLOCK(sc-port); + return (rc); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280525 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 10:31:43 2015 New Revision: 280525 URL: https://svnweb.freebsd.org/changeset/base/280525 Log: MFC: 278254 sfxge: using 64-bit access for x86-64 Submitted by: Artem V. Andreev Artem.Andreev at oktetlabs.ru Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h == --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:30:45 2015 (r280524) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:31:43 2015 (r280525) @@ -51,7 +51,11 @@ extern C { #include machine/endian.h #defineEFSYS_HAS_UINT64 1 +#if defined(__x86_64__) +#defineEFSYS_USE_UINT64 1 +#else #defineEFSYS_USE_UINT64 0 +#endif #if _BYTE_ORDER == _BIG_ENDIAN #defineEFSYS_IS_BIG_ENDIAN 1 #defineEFSYS_IS_LITTLE_ENDIAN 0 @@ -398,6 +402,26 @@ typedef struct efsys_mem_s { _NOTE(CONSTANTCONDITION)\ } while (B_FALSE) +#if defined(__x86_64__) +#defineEFSYS_MEM_READQ(_esmp, _offset, _eqp) \ + do {\ + uint64_t *addr; \ + \ + _NOTE(CONSTANTCONDITION)\ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)),\ + (not power of 2 aligned));\ + \ + addr = (void *)((_esmp)-esm_base + (_offset)); \ + \ + (_eqp)-eq_u64[0] = *addr; \ + \ + EFSYS_PROBE3(mem_readq, unsigned int, (_offset),\ + uint32_t, (_eqp)-eq_u32[1],\ + uint32_t, (_eqp)-eq_u32[0]); \ + \ + _NOTE(CONSTANTCONDITION)\ + } while (B_FALSE) +#else #defineEFSYS_MEM_READQ(_esmp, _offset, _eqp) \ do {\ uint32_t *addr; \ @@ -417,7 +441,31 @@ typedef struct efsys_mem_s { \ _NOTE(CONSTANTCONDITION)\ } while (B_FALSE) +#endif +#if defined(__x86_64__) +#defineEFSYS_MEM_READO(_esmp, _offset, _eop) \ + do {\ + uint64_t *addr; \ + \ + _NOTE(CONSTANTCONDITION)\ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_oword_t)),\ + (not power of 2 aligned));\ + \ + addr = (void *)((_esmp)-esm_base + (_offset)); \ + \ + (_eop)-eo_u64[0] = *addr++;\ + (_eop)-eo_u64[1] = *addr; \ + \ + EFSYS_PROBE5(mem_reado, unsigned int, (_offset),\ + uint32_t, (_eop)-eo_u32[3],\ + uint32_t, (_eop)-eo_u32[2],\ + uint32_t, (_eop)-eo_u32[1],\ + uint32_t, (_eop)-eo_u32[0]); \ + \ + _NOTE(CONSTANTCONDITION)\ + } while (B_FALSE) +#else #defineEFSYS_MEM_READO(_esmp, _offset, _eop) \ do {\ uint32_t *addr; \ @@ -441,6 +489,7 @@ typedef struct efsys_mem_s { \ _NOTE(CONSTANTCONDITION)\ } while (B_FALSE)
svn commit: r280530 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:36:37 2015 New Revision: 280530 URL: https://svnweb.freebsd.org/changeset/base/280530 Log: MFC: 278836 sfxge: remove used sfxge_tso_state member dma_seg_i Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:35:54 2015 (r280529) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:36:37 2015 (r280530) @@ -782,7 +782,6 @@ struct sfxge_tso_state { unsigned packet_space; /* Remaining space in current packet */ /* Input position */ - unsigned dma_seg_i; /* Current DMA segment number */ uint64_t dma_addr; /* DMA address of current position */ unsigned in_len;/* Remaining length in current mbuf */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280499 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 09:56:48 2015 New Revision: 280499 URL: https://svnweb.freebsd.org/changeset/base/280499 Log: MFC: 263649 sfxge: limit software Tx queue size. Previous implementation limits put queue size only (when Tx lock can't be acquired), but get queue may grow unboundedly which results in mbuf pools exhaustion and latency growth. Submitted by: Andrew Rybchenko Andrew.Rybchenko at oktetlabs.ru Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:54:07 2015 (r280498) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:56:48 2015 (r280499) @@ -476,6 +476,9 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); + if (stdp-std_count = SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) + return (ENOBUFS); + *(stdp-std_getp) = mbuf; stdp-std_getp = mbuf-m_nextpkt; stdp-std_count++; @@ -495,8 +498,8 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, old_len = mp-m_pkthdr.csum_data; } else old_len = 0; - if (old_len = SFXGE_TX_MAX_DEFERRED) - return ENOBUFS; + if (old_len = SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT) + return (ENOBUFS); mbuf-m_pkthdr.csum_data = old_len + 1; mbuf-m_nextpkt = (void *)old; } while (atomic_cmpset_ptr(putp, old, new) == 0); @@ -527,12 +530,9 @@ sfxge_tx_packet_add(struct sfxge_txq *tx */ locked = mtx_trylock(txq-lock); - /* -* Can only fail if we weren't able to get the lock. -*/ if (sfxge_tx_qdpl_put(txq, m, locked) != 0) { - KASSERT(!locked, - (sfxge_tx_qdpl_put() failed locked)); + if (locked) + mtx_unlock(txq-lock); rc = ENOBUFS; goto fail; } Modified: stable/10/sys/dev/sfxge/sfxge_tx.h == --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 09:54:07 2015 (r280498) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 09:56:48 2015 (r280499) @@ -75,7 +75,8 @@ struct sfxge_tx_mapping { enum sfxge_tx_buf_flags flags; }; -#define SFXGE_TX_MAX_DEFERRED 64 +#defineSFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 64 +#defineSFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 /* * Deferred packet list. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280500 - stable/9/share/man/man9
Author: dchagin Date: Wed Mar 25 09:58:02 2015 New Revision: 280500 URL: https://svnweb.freebsd.org/changeset/base/280500 Log: MFC r279776: Add a cred parameter to the VOP_VPTOCNP(9) manpage. While here fix igor warning about new line. Modified: stable/9/share/man/man9/VOP_VPTOCNP.9 Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/VOP_VPTOCNP.9 == --- stable/9/share/man/man9/VOP_VPTOCNP.9 Wed Mar 25 09:56:48 2015 (r280499) +++ stable/9/share/man/man9/VOP_VPTOCNP.9 Wed Mar 25 09:58:02 2015 (r280500) @@ -28,7 +28,7 @@ .\ .\ $FreeBSD$ .\ -.Dd November 19, 2011 +.Dd March 8, 2015 .Dt VOP_VPTOCNP 9 .Os .Sh NAME @@ -36,9 +36,10 @@ .Nd translate a vnode to its component name .Sh SYNOPSIS .In sys/param.h +.In sys/ucred.h .In sys/vnode.h .Ft int -.Fn VOP_VPTOCNP struct vnode *vp struct vnode **dvp char *buf int *buflen +.Fn VOP_VPTOCNP struct vnode *vp struct vnode **dvp struct ucred *cred char *buf int *buflen .Sh DESCRIPTION This translates a vnode into its component name, and writes that name to the head of the buffer specified by @@ -49,6 +50,8 @@ The vnode to translate. .It Fa dvp The vnode of the parent directory of .Fa vp . +.It Fa cred +The caller credentials. .It Fa buf The buffer into which to prepend the component name. .It Fa buflen @@ -59,7 +62,8 @@ The default implementation of .Nm scans through .Fa vp Ns 's -parent directory looking for a dirent with a matching file number. If +parent directory looking for a dirent with a matching file number. +If .Fa vp is not a directory, then .Nm ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280501 - in stable/10/sys/dev/sfxge: . common
Author: arybchik Date: Wed Mar 25 09:59:38 2015 New Revision: 280501 URL: https://svnweb.freebsd.org/changeset/base/280501 Log: MFC: 272325 cleanup: code style fixes Remove trailing whitespaces and tabs. Enclose value in return statements in parentheses. Use tabs after #define. Do not skip comparison with 0/NULL in boolean expressions. Submitted by: Andrew Rybchenko arybchenko at solarflare.com Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efsys.h stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_dma.c stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_intr.c stable/10/sys/dev/sfxge/sfxge_port.c stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_rx.h stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h == --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 09:59:38 2015 (r280501) @@ -53,44 +53,44 @@ extern C { #defineEFSYS_HAS_UINT64 1 #defineEFSYS_USE_UINT64 0 #if _BYTE_ORDER == _BIG_ENDIAN -#define EFSYS_IS_BIG_ENDIAN 1 -#define EFSYS_IS_LITTLE_ENDIAN 0 +#defineEFSYS_IS_BIG_ENDIAN 1 +#defineEFSYS_IS_LITTLE_ENDIAN 0 #elif _BYTE_ORDER == _LITTLE_ENDIAN -#define EFSYS_IS_BIG_ENDIAN 0 -#define EFSYS_IS_LITTLE_ENDIAN 1 +#defineEFSYS_IS_BIG_ENDIAN 0 +#defineEFSYS_IS_LITTLE_ENDIAN 1 #endif #include efx_types.h /* Common code requires this */ #if __FreeBSD_version 800068 -#define memmove(d, s, l) bcopy(s, d, l) +#definememmove(d, s, l) bcopy(s, d, l) #endif - + /* FreeBSD equivalents of Solaris things */ #ifndef _NOTE -#define _NOTE(s) +#define_NOTE(s) #endif #ifndef B_FALSE -#define B_FALSE FALSE +#defineB_FALSE FALSE #endif #ifndef B_TRUE -#define B_TRUE TRUE +#defineB_TRUE TRUE #endif #ifndef IS_P2ALIGNED -#defineIS_P2ALIGNED(v, a) uintptr_t)(v)) ((uintptr_t)(a) - 1)) == 0) +#defineIS_P2ALIGNED(v, a) uintptr_t)(v)) ((uintptr_t)(a) - 1)) == 0) #endif #ifndef P2ROUNDUP -#define P2ROUNDUP(x, align) (-(-(x) -(align))) +#defineP2ROUNDUP(x, align) (-(-(x) -(align))) #endif #ifndef IS2P -#define ISP2(x) (((x) ((x) - 1)) == 0) +#defineISP2(x) (((x) ((x) - 1)) == 0) #endif -#define ENOTACTIVE EINVAL +#defineENOTACTIVE EINVAL /* Memory type to use on FreeBSD */ MALLOC_DECLARE(M_SFXGE); @@ -242,7 +242,7 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b #defineEFSYS_OPT_PHY_PROPS 0 #defineEFSYS_OPT_PHY_BIST 1 #defineEFSYS_OPT_PHY_LED_CONTROL 1 -#define EFSYS_OPT_PHY_FLAGS 0 +#defineEFSYS_OPT_PHY_FLAGS 0 #defineEFSYS_OPT_VPD 1 #defineEFSYS_OPT_NVRAM 1 @@ -256,8 +256,8 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b #defineEFSYS_OPT_WOL 1 #defineEFSYS_OPT_RX_SCALE 1 #defineEFSYS_OPT_QSTATS 1 -#define EFSYS_OPT_FILTER 0 -#define EFSYS_OPT_RX_SCATTER 0 +#defineEFSYS_OPT_FILTER 0 +#defineEFSYS_OPT_RX_SCATTER 0 #defineEFSYS_OPT_RX_HDR_SPLIT 0 #defineEFSYS_OPT_EV_PREFETCH 0 @@ -272,7 +272,7 @@ typedef struct __efsys_identifier_s efsy #ifndef KDTRACE_HOOKS -#define EFSYS_PROBE(_name) +#defineEFSYS_PROBE(_name) #defineEFSYS_PROBE1(_name, _type1, _arg1) @@ -815,16 +815,16 @@ extern void sfxge_err(efsys_identifier_t panic(#_exp); \ } while (0) -#define EFSYS_ASSERT3(_x, _op, _y, _t) do {\ +#defineEFSYS_ASSERT3(_x, _op, _y, _t) do { \ const _t __x = (_t)(_x);\ const _t __y = (_t)(_y);\ if (!(__x _op __y)) \ - panic(assertion failed at %s:%u, __FILE__, __LINE__); \ + panic(assertion failed at %s:%u, __FILE__, __LINE__); \ } while(0) -#define EFSYS_ASSERT3U(_x, _op, _y)EFSYS_ASSERT3(_x, _op, _y, uint64_t) -#define EFSYS_ASSERT3S(_x, _op, _y)EFSYS_ASSERT3(_x, _op, _y, int64_t) -#define EFSYS_ASSERT3P(_x, _op, _y)EFSYS_ASSERT3(_x, _op, _y, uintptr_t) +#defineEFSYS_ASSERT3U(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uint64_t) +#defineEFSYS_ASSERT3S(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, int64_t) +#defineEFSYS_ASSERT3P(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uintptr_t) #ifdef __cplusplus } Modified: stable/10/sys/dev/sfxge/sfxge.c
svn commit: r280504 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:03:41 2015 New Revision: 280504 URL: https://svnweb.freebsd.org/changeset/base/280504 Log: MFC: 272330 The patch allows to check state of the software Tx queues at run time. Submitted by: Andrew Rybchenko arybchenko at solarflare.com Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h == --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:02:14 2015 (r280503) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:03:41 2015 (r280504) @@ -201,6 +201,7 @@ struct sfxge_softc { struct ifnet*ifnet; unsigned intif_flags; struct sysctl_oid *stats_node; + struct sysctl_oid *txqs_node; struct task task_reset; Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:02:14 2015 (r280503) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:03:41 2015 (r280504) @@ -176,7 +176,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * KASSERT(*get_tailp == NULL, (*get_tailp != NULL)); *stdp-std_getp = get_next; stdp-std_getp = get_tailp; - stdp-std_count += count; + stdp-std_get_count += count; } #endif /* SFXGE_HAVE_MQ */ @@ -380,7 +380,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx prefetch_read_many(txq-common); mbuf = stdp-std_get; - count = stdp-std_count; + count = stdp-std_get_count; while (count != 0) { KASSERT(mbuf != NULL, (mbuf == NULL)); @@ -412,17 +412,17 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx if (count == 0) { KASSERT(mbuf == NULL, (mbuf != NULL)); stdp-std_get = NULL; - stdp-std_count = 0; + stdp-std_get_count = 0; stdp-std_getp = stdp-std_get; } else { stdp-std_get = mbuf; - stdp-std_count = count; + stdp-std_get_count = count; } if (txq-added != pushed) efx_tx_qpush(txq-common, txq-added); - KASSERT(txq-blocked || stdp-std_count == 0, + KASSERT(txq-blocked || stdp-std_get_count == 0, (queue unblocked but count is non-zero)); } @@ -476,12 +476,12 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); - if (stdp-std_count = SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) + if (stdp-std_get_count = SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) return (ENOBUFS); *(stdp-std_getp) = mbuf; stdp-std_getp = mbuf-m_nextpkt; - stdp-std_count++; + stdp-std_get_count++; } else { volatile uintptr_t *putp; uintptr_t old; @@ -575,7 +575,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx m_freem(mbuf); } stdp-std_get = NULL; - stdp-std_count = 0; + stdp-std_get_count = 0; stdp-std_getp = stdp-std_get; mtx_unlock(txq-lock); @@ -1315,6 +1315,8 @@ static int sfxge_tx_qinit(struct sfxge_softc *sc, unsigned int txq_index, enum sfxge_txq_type type, unsigned int evq_index) { + char name[16]; + struct sysctl_oid *txq_node; struct sfxge_txq *txq; struct sfxge_evq *evq; #ifdef SFXGE_HAVE_MQ @@ -1367,6 +1369,16 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u goto fail2; } + snprintf(name, sizeof(name), %u, txq_index); + txq_node = SYSCTL_ADD_NODE( + device_get_sysctl_ctx(sc-dev), + SYSCTL_CHILDREN(sc-txqs_node), + OID_AUTO, name, CTLFLAG_RD, NULL, ); + if (txq_node == NULL) { + rc = ENOMEM; + goto fail_txq_node; + } + if (type == SFXGE_TXQ_IP_TCP_UDP_CKSUM (rc = tso_init(txq)) != 0) goto fail3; @@ -1377,6 +1389,11 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u stdp-std_getp = stdp-std_get; mtx_init(txq-lock, txq, NULL, MTX_DEF); + + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc-dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + dpl_get_count, CTLFLAG_RD | CTLFLAG_STATS, + stdp-std_get_count, 0, ); #endif txq-type = type; @@ -1387,6 +1404,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); fail3: +fail_txq_node: free(txq-pend_desc, M_SFXGE); fail2: while (nmaps-- != 0) @@ -1480,6 +1498,15 @@
svn commit: r280507 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:08:28 2015 New Revision: 280507 URL: https://svnweb.freebsd.org/changeset/base/280507 Log: MFC: 272411 Properly handle a case that should never happen (the bus_dma callback being called with error set to non-zero). Modified: stable/10/sys/dev/sfxge/sfxge_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c == --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 10:06:26 2015 (r280506) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 10:08:28 2015 (r280507) @@ -160,11 +160,14 @@ sfxge_dma_alloc(struct sfxge_softc *sc, /* * The callback gets error information about the mapping -* and will have set our vaddr to NULL if something went +* and will have set esm_addr to 0 if something went * wrong. */ - if (vaddr == NULL) + if (esmp-esm_addr == 0) { + bus_dmamem_free(esmp-esm_tag, esmp-esm_base, esmp-esm_map); + bus_dma_tag_destroy(esmp-esm_tag); return (ENOMEM); + } esmp-esm_base = vaddr; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280509 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:12:13 2015 New Revision: 280509 URL: https://svnweb.freebsd.org/changeset/base/280509 Log: MFC: 277885 sfxge: Move txq-next pointer to part writable on completion path In fact the pointer is used only if more than one TXQ is processed in one interrupt. It is used (read-write) on completion path only. Also it makes the first part of the structure smaller and it fits now into one 128byte cache line. So, TXQ structure becomes 128 bytes smaller. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.h == --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:11:17 2015 (r280508) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:12:13 2015 (r280509) @@ -139,7 +139,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; @@ -173,6 +172,7 @@ struct sfxge_txq { */ unsigned intpending __aligned(CACHE_LINE_SIZE); unsigned intcompleted; + struct sfxge_txq*next; }; extern int sfxge_tx_packet_add(struct sfxge_txq *, struct mbuf *); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280510 - in stable/10/sys/dev/sfxge: . common
Author: arybchik Date: Wed Mar 25 10:13:19 2015 New Revision: 280510 URL: https://svnweb.freebsd.org/changeset/base/280510 Log: MFC: 277886 sfxge: Make it possible to build without EVQ statistics Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_tx.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c == --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:12:13 2015 (r280509) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:13:19 2015 (r280510) @@ -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: stable/10/sys/dev/sfxge/common/efx_tx.c == --- stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 10:12:13 2015 (r280509) +++ stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 10:13:19 2015 (r280510) @@ -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: stable/10/sys/dev/sfxge/sfxge.h == --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:12:13 2015 (r280509) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:13:19 2015 (r280510) @@ -224,8 +224,10 @@ struct sfxge_softc { struct sfxge_evq*evq[SFXGE_RX_SCALE_MAX]; unsigned intev_moderation; +#if EFSYS_OPT_QSTATS clock_t ev_stats_update_time; uint64_tev_stats[EV_NQSTATS]; +#endif uma_zone_t rxq_cache; struct sfxge_rxq*rxq[SFXGE_RX_SCALE_MAX]; Modified: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:12:13 2015 (r280509) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:13:19 2015 (r280510) @@ -401,6 +401,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) { @@ -462,6 +464,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) { @@ -622,8 +626,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, @@ -878,7 +884,9 @@ sfxge_ev_init(struct sfxge_softc *sc) goto fail; } +#if EFSYS_OPT_QSTATS sfxge_ev_stat_init(sc); +#endif return (0); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280515 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 10:19:43 2015 New Revision: 280515 URL: https://svnweb.freebsd.org/changeset/base/280515 Log: MFC: 277891 sfxge: Remove unused esm_size member of the efsys_mem_t structure esm_size is not even initialized properly when memory is allocated. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h == --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:18:23 2015 (r280514) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:19:43 2015 (r280515) @@ -370,7 +370,6 @@ typedef struct efsys_mem_s { bus_dmamap_tesm_map; caddr_t esm_base; efsys_dma_addr_tesm_addr; - size_t esm_size; } efsys_mem_t; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280518 - in stable/10: share/man/man4 sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:23:00 2015 New Revision: 280518 URL: https://svnweb.freebsd.org/changeset/base/280518 Log: MFC: 277894 sfxge: implemented parameter to restrict RSS channels Submitted by: Artem V. Andreev Artem.Andreev at oktetlabs.ru Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/share/man/man4/sfxge.4 stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_intr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 == --- stable/10/share/man/man4/sfxge.4Wed Mar 25 10:21:42 2015 (r280517) +++ stable/10/share/man/man4/sfxge.4Wed Mar 25 10:23:00 2015 (r280518) @@ -108,6 +108,10 @@ If a packet is dropped, the .Va tx_early_drops 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: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:21:42 2015 (r280517) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:23:00 2015 (r280518) @@ -396,11 +396,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: stable/10/sys/dev/sfxge/sfxge.h == --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:21:42 2015 (r280517) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:23:00 2015 (r280518) @@ -229,6 +229,7 @@ struct sfxge_softc { uint64_tev_stats[EV_NQSTATS]; #endif + unsigned intmax_rss_channels; uma_zone_t rxq_cache; struct sfxge_rxq*rxq[SFXGE_RX_SCALE_MAX]; unsigned intrx_indir_table[SFXGE_RX_SCALE_MAX]; Modified: stable/10/sys/dev/sfxge/sfxge_intr.c == --- stable/10/sys/dev/sfxge/sfxge_intr.cWed Mar 25 10:21:42 2015 (r280517) +++ stable/10/sys/dev/sfxge/sfxge_intr.cWed Mar 25 10:23:00 2015 (r280518) @@ -298,6 +298,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) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280520 - in head/sys: boot/fdt/dts/arm modules/dtb/rpi
Author: andrew Date: Wed Mar 25 10:26:07 2015 New Revision: 280520 URL: https://svnweb.freebsd.org/changeset/base/280520 Log: Add the Raspberry Pi 2 dtb, based on the existing rpi.dts, but with a different base address for the devces. MFC after:1 week Added: head/sys/boot/fdt/dts/arm/bcm2836.dtsi - copied, changed from r280125, head/sys/boot/fdt/dts/arm/bcm2835.dtsi head/sys/boot/fdt/dts/arm/rpi2.dts - copied, changed from r280125, head/sys/boot/fdt/dts/arm/rpi.dts Modified: head/sys/modules/dtb/rpi/Makefile Copied and modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi (from r280125, head/sys/boot/fdt/dts/arm/bcm2835.dtsi) == --- head/sys/boot/fdt/dts/arm/bcm2835.dtsi Sun Mar 15 21:57:44 2015 (r280125, copy source) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Wed Mar 25 10:26:07 2015 (r280520) @@ -29,19 +29,19 @@ #address-cells = 1; #size-cells = 1; - cpus { - cpu@0 { - compatible = arm,1176jzf-s; - }; + timer { + compatible = arm,armv7-timer; + clock-frequency = 1920; + interrupts = 72 73 75 74; + interrupt-parent = intc; }; - SOC: axi { compatible = simple-bus; #address-cells = 1; #size-cells = 1; - reg = 0x2000 0x0100; - ranges = 0 0x2000 0x0100; + reg = 0x3f00 0x0100; + ranges = 0 0x3f00 0x0100; intc: interrupt-controller { compatible = broadcom,bcm2835-armctrl-ic, @@ -101,30 +101,6 @@ */ }; - timer { - compatible = broadcom,bcm2835-system-timer, -broadcom,bcm2708-system-timer; - reg = 0x3000 0x1000; - interrupts = 8 9 10 11; - interrupt-parent = intc; - - clock-frequency = 100; - }; - - armtimer { - /* Not AMBA compatible */ - compatible = broadcom,bcm2835-sp804, arm,sp804; - reg = 0xB400 0x24; - interrupts = 0; - interrupt-parent = intc; - }; - - watchdog0 { - compatible = broadcom,bcm2835-wdt, -broadcom,bcm2708-wdt; - reg = 0x10001c 0x0c; /* 0x1c, 0x20, 0x24 */ - }; - gpio: gpio { compatible = broadcom,bcm2835-gpio, broadcom,bcm2708-gpio; @@ -397,8 +373,6 @@ }; bsc0 { - #address-cells = 1; - #size-cells = 0; compatible = broadcom,bcm2835-bsc, broadcom,bcm2708-bsc; reg = 0x205000 0x20; @@ -407,8 +381,6 @@ }; bsc1 { - #address-cells = 1; - #size-cells = 0; compatible = broadcom,bcm2835-bsc, broadcom,bcm2708-bsc; reg = 0x804000 0x20; @@ -459,7 +431,7 @@ interrupts = 70; interrupt-parent = intc; - clock-frequency = 5000; /* Set by VideoCore */ + clock-frequency = 25; /* Set by VideoCore */ }; uart0: uart0 { Copied and modified: head/sys/boot/fdt/dts/arm/rpi2.dts (from r280125, head/sys/boot/fdt/dts/arm/rpi.dts) == --- head/sys/boot/fdt/dts/arm/rpi.dts Sun Mar 15 21:57:44 2015 (r280125, copy source) +++ head/sys/boot/fdt/dts/arm/rpi2.dts Wed Mar 25 10:26:07 2015 (r280520) @@ -26,12 +26,11 @@ */ /dts-v1/; -/include/ bcm2835.dtsi +/include/ bcm2836.dtsi / { - model = Raspberry Pi (BCM2835); - compatible = raspberrypi,model-a, raspberrypi,model-b, -broadcom,bcm2835-vc, broadcom,bcm2708-vc; + model = Raspberry Pi 2 Model B; + compatible = brcm,bcm2709; memreserve = 0x0800 0x0800; /* Set by VideoCore */ @@ -39,10 +38,10 @@ #address-cells = 1; #size-cells = 0; cpu@0 { - compatible = arm,1176jzf-s; + compatible = arm,cortex-a7; device_type = cpu; - reg = 0; /* CPU ID=0 */ - clock-frequency = 7; /* 700MHz
svn commit: r280521 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 10:26:45 2015 New Revision: 280521 URL: https://svnweb.freebsd.org/changeset/base/280521 Log: MFC: 278220 sfxge: Implement EFSYS_MEM_READ_BARRIER() Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h == --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:26:07 2015 (r280520) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:26:45 2015 (r280521) @@ -677,8 +677,7 @@ typedef struct efsys_bar_s { /* BARRIERS */ -/* Strict ordering guaranteed by devacc.devacc_attr_dataorder */ -#defineEFSYS_MEM_READ_BARRIER() +#defineEFSYS_MEM_READ_BARRIER()rmb() #defineEFSYS_PIO_WRITE_BARRIER() /* TIMESTAMP */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280526 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:32:49 2015 New Revision: 280526 URL: https://svnweb.freebsd.org/changeset/base/280526 Log: MFC: 278255 sfxge: Add statistics for partially dropped TSO packets Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:31:43 2015 (r280525) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:32:49 2015 (r280526) @@ -1093,12 +1093,16 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq * roll back the work we have done. */ if (txq-n_pend_desc - SFXGE_TSO_MAX_DESC - (1 + SFXGE_TX_MAPPING_MAX_SEG)) + SFXGE_TSO_MAX_DESC - (1 + SFXGE_TX_MAPPING_MAX_SEG)) { + txq-tso_pdrop_too_many++; break; + } next_id = (id + 1) txq-ptr_mask; if (__predict_false(tso_start_new_packet(txq, tso, -next_id))) +next_id))) { + txq-tso_pdrop_no_rsrc++; break; + } id = next_id; } } @@ -1515,6 +1519,8 @@ static const struct { SFXGE_TX_STAT(tso_bursts, tso_bursts), SFXGE_TX_STAT(tso_packets, tso_packets), SFXGE_TX_STAT(tso_long_headers, tso_long_headers), + SFXGE_TX_STAT(tso_pdrop_too_many, tso_pdrop_too_many), + SFXGE_TX_STAT(tso_pdrop_no_rsrc, tso_pdrop_no_rsrc), SFXGE_TX_STAT(tx_collapses, collapses), SFXGE_TX_STAT(tx_drops, drops), SFXGE_TX_STAT(tx_get_overflow, get_overflow), Modified: stable/10/sys/dev/sfxge/sfxge_tx.h == --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:31:43 2015 (r280525) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:32:49 2015 (r280526) @@ -201,6 +201,8 @@ struct sfxge_txq { unsigned long get_non_tcp_overflow; unsigned long put_overflow; unsigned long netdown_drops; + unsigned long tso_pdrop_too_many; + unsigned long tso_pdrop_no_rsrc; /* The following fields change more often, and are used mostly * on the completion path ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280529 - stable/10/sys/dev/usb/input
Author: hselasky Date: Wed Mar 25 10:35:54 2015 New Revision: 280529 URL: https://svnweb.freebsd.org/changeset/base/280529 Log: MFC r279854: Lock softc before clearing bits. Modified: stable/10/sys/dev/usb/input/uhid.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/input/uhid.c == --- stable/10/sys/dev/usb/input/uhid.c Wed Mar 25 10:35:19 2015 (r280528) +++ stable/10/sys/dev/usb/input/uhid.c Wed Mar 25 10:35:54 2015 (r280529) @@ -518,7 +518,9 @@ uhid_open(struct usb_fifo *fifo, int ffl */ if (fflags FREAD) { /* reset flags */ + mtx_lock(sc-sc_mtx); sc-sc_flags = ~UHID_FLAG_IMMED; + mtx_unlock(sc-sc_mtx); if (usb_fifo_alloc_buffer(fifo, sc-sc_isize + 1, UHID_FRAME_NUM)) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280502 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:01:07 2015 New Revision: 280502 URL: https://svnweb.freebsd.org/changeset/base/280502 Log: MFC: 272328 Make size of Tx and Rx rings configurable Required size of event queue is calculated now. Submitted by: Andrew Rybchenko arybchenko at solarflare.com Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_rx.h stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 09:59:38 2015 (r280501) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:01:07 2015 (r280502) @@ -42,6 +42,7 @@ __FBSDID($FreeBSD$); #include sys/taskqueue.h #include sys/sockio.h #include sys/sysctl.h +#include sys/syslog.h #include dev/pci/pcireg.h #include dev/pci/pcivar.h @@ -66,6 +67,25 @@ __FBSDID($FreeBSD$); MALLOC_DEFINE(M_SFXGE, sfxge, Solarflare 10GigE driver); + +SYSCTL_NODE(_hw, OID_AUTO, sfxge, CTLFLAG_RD, 0, + SFXGE driver parameters); + +#defineSFXGE_PARAM_RX_RING SFXGE_PARAM(rx_ring) +static int sfxge_rx_ring_entries = SFXGE_NDESCS; +TUNABLE_INT(SFXGE_PARAM_RX_RING, sfxge_rx_ring_entries); +SYSCTL_INT(_hw_sfxge, OID_AUTO, rx_ring, CTLFLAG_RDTUN, + sfxge_rx_ring_entries, 0, + Maximum number of descriptors in a receive ring); + +#defineSFXGE_PARAM_TX_RING SFXGE_PARAM(tx_ring) +static int sfxge_tx_ring_entries = SFXGE_NDESCS; +TUNABLE_INT(SFXGE_PARAM_TX_RING, sfxge_tx_ring_entries); +SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, CTLFLAG_RDTUN, + sfxge_tx_ring_entries, 0, + Maximum number of descriptors in a transmit ring); + + static void sfxge_reset(void *arg, int npending); @@ -313,8 +333,8 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp-if_qflush = sfxge_if_qflush; #else ifp-if_start = sfxge_if_start; - IFQ_SET_MAXLEN(ifp-if_snd, SFXGE_NDESCS - 1); - ifp-if_snd.ifq_drv_maxlen = SFXGE_NDESCS - 1; + IFQ_SET_MAXLEN(ifp-if_snd, sc-txq_entries - 1); + ifp-if_snd.ifq_drv_maxlen = sc-txq_entries - 1; IFQ_SET_READY(ifp-if_snd); mtx_init(sc-tx_lock, txq, NULL, MTX_DEF); @@ -413,6 +433,26 @@ sfxge_create(struct sfxge_softc *sc) goto fail3; sc-enp = enp; + if (!ISP2(sfxge_rx_ring_entries) || + !(sfxge_rx_ring_entries EFX_RXQ_NDESCS_MASK)) { + log(LOG_ERR, %s=%d must be power of 2 from %u to %u, + SFXGE_PARAM_RX_RING, sfxge_rx_ring_entries, + EFX_RXQ_MINNDESCS, EFX_RXQ_MAXNDESCS); + error = EINVAL; + goto fail_rx_ring_entries; + } + sc-rxq_entries = sfxge_rx_ring_entries; + + if (!ISP2(sfxge_tx_ring_entries) || + !(sfxge_tx_ring_entries EFX_TXQ_NDESCS_MASK)) { + log(LOG_ERR, %s=%d must be power of 2 from %u to %u, + SFXGE_PARAM_TX_RING, sfxge_tx_ring_entries, + EFX_TXQ_MINNDESCS, EFX_TXQ_MAXNDESCS); + error = EINVAL; + goto fail_tx_ring_entries; + } + sc-txq_entries = sfxge_tx_ring_entries; + /* Initialize MCDI to talk to the microcontroller. */ if ((error = sfxge_mcdi_init(sc)) != 0) goto fail4; @@ -485,6 +525,8 @@ fail5: sfxge_mcdi_fini(sc); fail4: +fail_tx_ring_entries: +fail_rx_ring_entries: sc-enp = NULL; efx_nic_destroy(enp); mtx_destroy(sc-enp_lock); Modified: stable/10/sys/dev/sfxge/sfxge.h == --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 09:59:38 2015 (r280501) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:01:07 2015 (r280502) @@ -86,6 +86,8 @@ #include sfxge_rx.h #include sfxge_tx.h +#defineROUNDUP_POW_OF_TWO(_n) (1ULL flsl((_n) - 1)) + #defineSFXGE_IP_ALIGN 2 #defineSFXGE_ETHERTYPE_LOOPBACK0x9000 /* Xerox loopback */ @@ -105,6 +107,7 @@ struct sfxge_evq { enum sfxge_evq_stateinit_state; unsigned intindex; + unsigned intentries; efsys_mem_t mem; unsigned intbuf_base_id; @@ -120,7 +123,6 @@ struct sfxge_evq { struct sfxge_txq**txqs; }; -#defineSFXGE_NEVS 4096 #defineSFXGE_NDESCS1024 #defineSFXGE_MODERATION30 @@ -208,6 +210,9 @@ struct sfxge_softc { efx_nic_t *enp; struct mtx enp_lock; + unsigned intrxq_entries; +
svn commit: r280505 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:05:19 2015 New Revision: 280505 URL: https://svnweb.freebsd.org/changeset/base/280505 Log: MFC: 272331 Support tunable to control Tx deferred packet list limits Also increase default for Tx queue get-list limit. Too small limit results in TCP packets drops especiall when many streams are running simultaneously. Put list may be kept small enough since it is just a temporary location if transmit function can't get Tx queue lock. Submitted by: Andrew Rybchenko arybchenko at solarflare.com Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:03:41 2015 (r280504) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:05:19 2015 (r280505) @@ -50,6 +50,7 @@ __FBSDID($FreeBSD$); #include sys/smp.h #include sys/socket.h #include sys/sysctl.h +#include sys/syslog.h #include net/bpf.h #include net/ethernet.h @@ -77,6 +78,25 @@ __FBSDID($FreeBSD$); #defineSFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) #defineSFXGE_TXQ_BLOCK_LEVEL(_entries) ((_entries) - SFXGE_TSO_MAX_DESC) +#ifdef SFXGE_HAVE_MQ + +#defineSFXGE_PARAM_TX_DPL_GET_MAX SFXGE_PARAM(tx_dpl_get_max) +static int sfxge_tx_dpl_get_max = SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT; +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); + +#defineSFXGE_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); + +#endif + + /* Forward declarations. */ static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq); static void sfxge_tx_qlist_post(struct sfxge_txq *txq); @@ -476,7 +496,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); - if (stdp-std_get_count = SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) + if (stdp-std_get_count = stdp-std_get_max) return (ENOBUFS); *(stdp-std_getp) = mbuf; @@ -498,7 +518,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, old_len = mp-m_pkthdr.csum_data; } else old_len = 0; - if (old_len = SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT) + if (old_len = stdp-std_put_max) return (ENOBUFS); mbuf-m_pkthdr.csum_data = old_len + 1; mbuf-m_nextpkt = (void *)old; @@ -1384,8 +1404,23 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u goto fail3; #ifdef SFXGE_HAVE_MQ + if (sfxge_tx_dpl_get_max = 0) { + log(LOG_ERR, %s=%d must be greater than 0, + SFXGE_PARAM_TX_DPL_GET_MAX, sfxge_tx_dpl_get_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); + rc = EINVAL; + goto fail_tx_dpl_put_max; + } + /* Initialize the deferred packet list. */ stdp = txq-dpl; + stdp-std_put_max = sfxge_tx_dpl_put_max; + stdp-std_get_max = sfxge_tx_dpl_get_max; stdp-std_getp = stdp-std_get; mtx_init(txq-lock, txq, NULL, MTX_DEF); @@ -1403,6 +1438,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); +fail_tx_dpl_put_max: +fail_tx_dpl_get_max: fail3: fail_txq_node: free(txq-pend_desc, M_SFXGE); Modified: stable/10/sys/dev/sfxge/sfxge_tx.h == --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:03:41 2015 (r280504) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:05:19 2015 (r280505) @@ -75,13 +75,17 @@ struct sfxge_tx_mapping { enum sfxge_tx_buf_flags flags; }; -#defineSFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 64 +#defineSFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 1024 #defineSFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 /* * Deferred packet list. */ struct sfxge_tx_dpl { + unsigned intstd_get_max;/* Maximum number of packets +
svn commit: r280511 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:14:30 2015 New Revision: 280511 URL: https://svnweb.freebsd.org/changeset/base/280511 Log: MFC: 277887 sfxge: Remove extra cache-line alignment and reorder sfxge_evq_t Remove the first member alignment to cacheline since it is nop. Use __aligned() for the whole structure to make sure that the structure size is cacheline aligned. Remove lock alignment to make the structure smaller and fit all members used on event queue processing into one cacheline (128 bytes) on x86-64. The lock is obtained as well from different context when event queue statistics are retrived from sysctl context, but it is infrequent. Reorder members to avoid padding and go in usage order on event processing. As the result all structure members used on event queue processing fit into exactly one cacheline (128 byte) now. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h == --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:13:19 2015 (r280510) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:14:30 2015 (r280511) @@ -102,26 +102,26 @@ enum sfxge_evq_state { #defineSFXGE_EV_BATCH 16384 struct sfxge_evq { - struct sfxge_softc *sc __aligned(CACHE_LINE_SIZE); - struct mtx lock __aligned(CACHE_LINE_SIZE); - - enum sfxge_evq_stateinit_state; + /* Structure members below are sorted by usage order */ + struct sfxge_softc *sc; + struct mtx lock; unsigned intindex; - unsigned intentries; + enum sfxge_evq_stateinit_state; efsys_mem_t mem; - unsigned intbuf_base_id; - - boolean_t exception; - efx_evq_t *common; unsigned intread_ptr; + boolean_t exception; unsigned intrx_done; unsigned inttx_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 intbuf_base_id; + unsigned intentries; +} __aligned(CACHE_LINE_SIZE); #defineSFXGE_NDESCS1024 #defineSFXGE_MODERATION30 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280516 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:20:42 2015 New Revision: 280516 URL: https://svnweb.freebsd.org/changeset/base/280516 Log: MFC: 277892 sfxge: Pass correct address to free allocated memory in the case of load error Most likely is was just memory leak on the error handling path since typically efsys_mem_t is filled in by zeros on allocation. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c == --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 10:19:43 2015 (r280515) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 10:20:42 2015 (r280516) @@ -153,7 +153,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); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280517 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:21:42 2015 New Revision: 280517 URL: https://svnweb.freebsd.org/changeset/base/280517 Log: MFC: 277893 sfxge: Use SFXGE_MODERATION to initialize event moderation Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:20:42 2015 (r280516) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:21:42 2015 (r280517) @@ -870,7 +870,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, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280522 - in stable/10/sys/dev/sfxge: . common
Author: arybchik Date: Wed Mar 25 10:27:54 2015 New Revision: 280522 URL: https://svnweb.freebsd.org/changeset/base/280522 Log: MFC: 278221 sfxge: Add macros to init, destroy, acquire, release and assert locks Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_mcdi.c stable/10/sys/dev/sfxge/sfxge_port.c stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h == --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:26:45 2015 (r280521) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:27:54 2015 (r280522) @@ -517,6 +517,15 @@ typedef struct efsys_bar_s { struct resource *esb_res; } efsys_bar_t; +#defineSFXGE_BAR_LOCK_INIT(_esbp, _name) \ + mtx_init((_esbp)-esb_lock, (_name), NULL, MTX_DEF) +#defineSFXGE_BAR_LOCK_DESTROY(_esbp) \ + mtx_destroy((_esbp)-esb_lock) +#defineSFXGE_BAR_LOCK(_esbp) \ + mtx_lock((_esbp)-esb_lock) +#defineSFXGE_BAR_UNLOCK(_esbp) \ + mtx_unlock((_esbp)-esb_lock) + #defineEFSYS_BAR_READD(_esbp, _offset, _edp, _lock) \ do {\ _NOTE(CONSTANTCONDITION)\ @@ -525,7 +534,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION)\ if (_lock) \ - mtx_lock(((_esbp)-esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_edp)-ed_u32[0] = bus_space_read_4((_esbp)-esb_tag, \ (_esbp)-esb_handle, (_offset));\ @@ -535,7 +544,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION)\ if (_lock) \ - mtx_unlock(((_esbp)-esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp);\ _NOTE(CONSTANTCONDITION)\ } while (B_FALSE) @@ -545,7 +554,7 @@ typedef struct efsys_bar_s { KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)),\ (not power of 2 aligned));\ \ - mtx_lock(((_esbp)-esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_eqp)-eq_u32[0] = bus_space_read_4((_esbp)-esb_tag, \ (_esbp)-esb_handle, (_offset));\ @@ -556,7 +565,7 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)-eq_u32[1],\ uint32_t, (_eqp)-eq_u32[0]); \ \ - mtx_unlock(((_esbp)-esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp);\ _NOTE(CONSTANTCONDITION)\ } while (B_FALSE) @@ -568,7 +577,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION)\ if (_lock) \ - mtx_lock(((_esbp)-esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_eop)-eo_u32[0] = bus_space_read_4((_esbp)-esb_tag, \ (_esbp)-esb_handle, (_offset));\ @@ -587,7 +596,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION)\
svn commit: r280528 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:35:19 2015 New Revision: 280528 URL: https://svnweb.freebsd.org/changeset/base/280528 Log: MFC: 278835 sfxge: remove full_packet_size from sfxge_tso_state It makes sfxge_tso_state smaller and even makes tso_start_new_packet() few bytes smaller. Data used to calculate packet size are used nearby, so it should be no problems with cache etc. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor), glebius Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:34:20 2015 (r280527) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:35:19 2015 (r280528) @@ -791,8 +791,6 @@ struct sfxge_tso_state { ssize_t nh_off; /* Offset of network header */ ssize_t tcph_off; /* Offset of TCP header */ unsigned header_len;/* Number of bytes of header */ - int full_packet_size; /* Number of bytes to put in each outgoing -* segment */ }; static inline const struct ip *tso_iph(const struct sfxge_tso_state *tso) @@ -894,7 +892,6 @@ static void tso_start(struct sfxge_tso_s } tso-header_len = tso-tcph_off + 4 * tso_tcph(tso)-th_off; - tso-full_packet_size = tso-header_len + mbuf-m_pkthdr.tso_segsz; tso-seqnum = ntohl(tso_tcph(tso)-th_seq); @@ -1014,7 +1011,8 @@ static int tso_start_new_packet(struct s tso-seqnum += tso-mbuf-m_pkthdr.tso_segsz; if (tso-out_len tso-mbuf-m_pkthdr.tso_segsz) { /* This packet will not finish the TSO burst. */ - ip_length = tso-full_packet_size - tso-nh_off; + ip_length = tso-header_len - tso-nh_off + + tso-mbuf-m_pkthdr.tso_segsz; tsoh_th-th_flags = ~(TH_FIN | TH_PUSH); } else { /* This packet will be the last in the TSO burst. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280527 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:34:20 2015 New Revision: 280527 URL: https://svnweb.freebsd.org/changeset/base/280527 Log: MFC: 278833 sfxge: remove unused variable Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor), glebius Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:32:49 2015 (r280526) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:34:20 2015 (r280527) @@ -1279,7 +1279,6 @@ fail: void sfxge_tx_stop(struct sfxge_softc *sc) { - const efx_nic_cfg_t *encp; int index; index = SFXGE_TX_SCALE(sc); @@ -1288,7 +1287,6 @@ sfxge_tx_stop(struct sfxge_softc *sc) sfxge_tx_qstop(sc, SFXGE_TXQ_IP_CKSUM); - encp = efx_nic_cfg_get(sc-enp); sfxge_tx_qstop(sc, SFXGE_TXQ_NON_CKSUM); /* Tear down the transmit module */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280531 - stable/9/sys/dev/usb/input
Author: hselasky Date: Wed Mar 25 10:37:17 2015 New Revision: 280531 URL: https://svnweb.freebsd.org/changeset/base/280531 Log: MFC r279854: Lock softc before clearing bits. Modified: stable/9/sys/dev/usb/input/uhid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/input/uhid.c == --- stable/9/sys/dev/usb/input/uhid.c Wed Mar 25 10:36:37 2015 (r280530) +++ stable/9/sys/dev/usb/input/uhid.c Wed Mar 25 10:37:17 2015 (r280531) @@ -518,7 +518,9 @@ uhid_open(struct usb_fifo *fifo, int ffl */ if (fflags FREAD) { /* reset flags */ + mtx_lock(sc-sc_mtx); sc-sc_flags = ~UHID_FLAG_IMMED; + mtx_unlock(sc-sc_mtx); if (usb_fifo_alloc_buffer(fifo, sc-sc_isize + 1, UHID_FRAME_NUM)) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280533 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:38:22 2015 New Revision: 280533 URL: https://svnweb.freebsd.org/changeset/base/280533 Log: MFC: 278838 sfxge: SYSCTL_IN/OUT should not be called with non-sleepable lock held The problem is found using WITNESS option enabled. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c == --- stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 10:37:36 2015 (r280532) +++ stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 10:38:22 2015 (r280533) @@ -91,16 +91,15 @@ sfxge_mac_stat_handler(SYSCTL_HANDLER_AR struct sfxge_softc *sc = arg1; unsigned int id = arg2; int rc; + uint64_t val; SFXGE_PORT_LOCK(sc-port); - if ((rc = sfxge_mac_stat_update(sc)) != 0) - goto out; - - rc = SYSCTL_OUT(req, - (uint64_t *)sc-port.mac_stats.decode_buf + id, - sizeof(uint64_t)); -out: + if ((rc = sfxge_mac_stat_update(sc)) == 0) + val = ((uint64_t *)sc-port.mac_stats.decode_buf)[id]; SFXGE_PORT_UNLOCK(sc-port); + + if (rc == 0) + rc = SYSCTL_OUT(req, val, sizeof(val)); return (rc); } @@ -173,28 +172,29 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND sc = arg1; port = sc-port; - SFXGE_PORT_LOCK(port); - if (req-newptr != NULL) { if ((error = SYSCTL_IN(req, fcntl, sizeof(fcntl))) != 0) - goto out; - - if (port-wanted_fc == fcntl) - goto out; + return (error); - port-wanted_fc = fcntl; + SFXGE_PORT_LOCK(port); - if (port-init_state != SFXGE_PORT_STARTED) - goto out; + if (port-wanted_fc != fcntl) { + if (port-init_state == SFXGE_PORT_STARTED) + error = efx_mac_fcntl_set(sc-enp, + port-wanted_fc, + B_TRUE); + if (error == 0) + port-wanted_fc = fcntl; + } - error = efx_mac_fcntl_set(sc-enp, port-wanted_fc, B_TRUE); + SFXGE_PORT_UNLOCK(port); } else { - error = SYSCTL_OUT(req, port-wanted_fc, - sizeof(port-wanted_fc)); - } + SFXGE_PORT_LOCK(port); + fcntl = port-wanted_fc; + SFXGE_PORT_UNLOCK(port); -out: - SFXGE_PORT_UNLOCK(port); + error = SYSCTL_OUT(req, fcntl, sizeof(fcntl)); + } return (error); } @@ -205,7 +205,6 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE struct sfxge_softc *sc; struct sfxge_port *port; unsigned int wanted_fc, link_fc; - int error; sc = arg1; port = sc-port; @@ -215,10 +214,9 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE efx_mac_fcntl_get(sc-enp, wanted_fc, link_fc); else link_fc = 0; - error = SYSCTL_OUT(req, link_fc, sizeof(link_fc)); SFXGE_PORT_UNLOCK(port); - return (error); + return (SYSCTL_OUT(req, link_fc, sizeof(link_fc))); } #endif /* SFXGE_HAVE_PAUSE_MEDIAOPTS */ @@ -499,16 +497,15 @@ sfxge_phy_stat_handler(SYSCTL_HANDLER_AR struct sfxge_softc *sc = arg1; unsigned int id = arg2; int rc; + uint32_t val; SFXGE_PORT_LOCK(sc-port); - if ((rc = sfxge_phy_stat_update(sc)) != 0) - goto out; - - rc = SYSCTL_OUT(req, - (uint32_t *)sc-port.phy_stats.decode_buf + id, - sizeof(uint32_t)); -out: + if ((rc = sfxge_phy_stat_update(sc)) == 0) + val = ((uint32_t *)sc-port.phy_stats.decode_buf)[id]; SFXGE_PORT_UNLOCK(sc-port); + + if (rc == 0) + rc = SYSCTL_OUT(req, val, sizeof(val)); return (rc); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280532 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 10:37:36 2015 New Revision: 280532 URL: https://svnweb.freebsd.org/changeset/base/280532 Log: MFC: 278837 sfxge: remove inline specifiers Now compiler does not need any help. The patch does not change generated code. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor), glebius Modified: stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c == --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:37:17 2015 (r280531) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:37:36 2015 (r280532) @@ -92,8 +92,8 @@ static int lro_loss_packets = 20; #defineSFXGE_LRO_CONN_IS_TCPIPV4(c) (!((c)-l2_id SFXGE_LRO_L2_ID_IPV6)) /* Compare IPv6 addresses, avoiding conditional branches */ -static __inline unsigned long ipv6_addr_cmp(const struct in6_addr *left, - const struct in6_addr *right) +static unsigned long ipv6_addr_cmp(const struct in6_addr *left, + const struct in6_addr *right) { #if LONG_BIT == 64 const uint64_t *left64 = (const uint64_t *)left; @@ -167,7 +167,7 @@ sfxge_rx_schedule_refill(struct sfxge_rx sfxge_rx_post_refill, rxq); } -static inline struct mbuf *sfxge_rx_alloc_mbuf(struct sfxge_softc *sc) +static struct mbuf *sfxge_rx_alloc_mbuf(struct sfxge_softc *sc) { struct mb_args args; struct mbuf *m; Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:37:17 2015 (r280531) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:37:36 2015 (r280532) @@ -107,7 +107,7 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_p /* Forward declarations. */ -static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq); +static void sfxge_tx_qdpl_service(struct sfxge_txq *txq); static void sfxge_tx_qlist_post(struct sfxge_txq *txq); static void sfxge_tx_qunblock(struct sfxge_txq *txq); static int sfxge_tx_queue_tso(struct sfxge_txq *txq, struct mbuf *mbuf, @@ -156,7 +156,7 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq #ifdef SFXGE_HAVE_MQ -static inline unsigned int +static unsigned int sfxge_is_mbuf_non_tcp(struct mbuf *mbuf) { /* Absense of TCP checksum flags does not mean that it is non-TCP @@ -481,7 +481,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx * * NOTE: drops the txq mutex! */ -static inline void +static void sfxge_tx_qdpl_service(struct sfxge_txq *txq) { SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); @@ -509,7 +509,7 @@ sfxge_tx_qdpl_service(struct sfxge_txq * * overload the csum_data field in the mbuf to keep track of this length * because there is no cheap alternative to avoid races. */ -static inline int +static int sfxge_tx_qdpl_put(struct sfxge_txq *txq, struct mbuf *mbuf, int locked) { struct sfxge_tx_dpl *stdp; @@ -757,7 +757,7 @@ void sfxge_if_start(struct ifnet *ifp) SFXGE_TXQ_UNLOCK(sc-txq[0]); } -static inline void +static void sfxge_tx_qdpl_service(struct sfxge_txq *txq) { struct ifnet *ifp = txq-sc-ifnet; @@ -792,19 +792,19 @@ struct sfxge_tso_state { unsigned header_len;/* Number of bytes of header */ }; -static inline const struct ip *tso_iph(const struct sfxge_tso_state *tso) +static const struct ip *tso_iph(const struct sfxge_tso_state *tso) { KASSERT(tso-protocol == htons(ETHERTYPE_IP), (tso_iph() in non-IPv4 state)); return (const struct ip *)(tso-mbuf-m_data + tso-nh_off); } -static inline const struct ip6_hdr *tso_ip6h(const struct sfxge_tso_state *tso) +static __unused const struct ip6_hdr *tso_ip6h(const struct sfxge_tso_state *tso) { KASSERT(tso-protocol == htons(ETHERTYPE_IPV6), (tso_ip6h() in non-IPv6 state)); return (const struct ip6_hdr *)(tso-mbuf-m_data + tso-nh_off); } -static inline const struct tcphdr *tso_tcph(const struct sfxge_tso_state *tso) +static const struct tcphdr *tso_tcph(const struct sfxge_tso_state *tso) { return (const struct tcphdr *)(tso-mbuf-m_data + tso-tcph_off); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280535 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 10:39:18 2015 New Revision: 280535 URL: https://svnweb.freebsd.org/changeset/base/280535 Log: MFC: 278839 sfxge: style fixes Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_mac.c stable/10/sys/dev/sfxge/common/efx_mcdi.c stable/10/sys/dev/sfxge/common/efx_nic.c stable/10/sys/dev/sfxge/common/efx_rx.c stable/10/sys/dev/sfxge/common/efx_tx.c stable/10/sys/dev/sfxge/common/siena_mon.c stable/10/sys/dev/sfxge/common/siena_nic.c stable/10/sys/dev/sfxge/common/siena_vpd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c == --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:39:18 2015 (r280535) @@ -89,7 +89,8 @@ efx_ev_rx_not_ok( if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_TOBE_DISC) != 0) { EFX_EV_QSTAT_INCR(eep, EV_RX_TOBE_DISC); EFSYS_PROBE(tobe_disc); - /* Assume this is a unicast address mismatch, unless below + /* +* Assume this is a unicast address mismatch, unless below * we find either FSF_AZ_RX_EV_ETH_CRC_ERR or * EV_RX_PAUSE_FRM_ERR is set. */ @@ -102,7 +103,8 @@ efx_ev_rx_not_ok( (*flagsp) |= EFX_DISCARD; #if (EFSYS_OPT_RX_HDR_SPLIT || EFSYS_OPT_RX_SCATTER) - /* Lookout for payload queue ran dry errors and ignore them. + /* +* Lookout for payload queue ran dry errors and ignore them. * * Sadly for the header/data split cases, the descriptor * pointer in this event refers to the header queue and Modified: stable/10/sys/dev/sfxge/common/efx_mac.c == --- stable/10/sys/dev/sfxge/common/efx_mac.cWed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_mac.cWed Mar 25 10:39:18 2015 (r280535) @@ -669,11 +669,11 @@ chosen: EFSYS_ASSERT(emop != NULL); epp-ep_mac_type = type; - + if (emop-emo_reset != NULL) { if ((rc = emop-emo_reset(enp)) != 0) goto fail1; - + EFSYS_ASSERT(enp-en_reset_flags EFX_RESET_MAC); enp-en_reset_flags = ~EFX_RESET_MAC; } Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c == --- stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 10:39:18 2015 (r280535) @@ -44,7 +44,8 @@ __FBSDID($FreeBSD$); #defineMCDI_P1_REBOOT_OFST 0x1fe #defineMCDI_P2_REBOOT_OFST 0x1ff -/* A reboot/assertion causes the MCDI status word to be set after the +/* + * A reboot/assertion causes the MCDI status word to be set after the * command word is set or a REBOOT event is sent. If we notice a reboot * via these mechanisms then wait 10ms for the status word to be set. */ @@ -459,7 +460,8 @@ efx_mcdi_ev_death( ++emip-emi_aborted; } - /* Since we're running in parallel with a request, consume the + /* +* Since we're running in parallel with a request, consume the * status word before dropping the lock. */ if (rc == EIO || rc == EINTR) { Modified: stable/10/sys/dev/sfxge/common/efx_nic.c == --- stable/10/sys/dev/sfxge/common/efx_nic.cWed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_nic.cWed Mar 25 10:39:18 2015 (r280535) @@ -253,7 +253,8 @@ efx_nic_create( EFX_FEATURE_LFSR_HASH_INSERT | EFX_FEATURE_LINK_EVENTS | EFX_FEATURE_PERIODIC_MAC_STATS | EFX_FEATURE_WOL | EFX_FEATURE_MCDI | - EFX_FEATURE_LOOKAHEAD_SPLIT | EFX_FEATURE_MAC_HEADER_FILTERS; + EFX_FEATURE_LOOKAHEAD_SPLIT | + EFX_FEATURE_MAC_HEADER_FILTERS; break; #endif /* EFSYS_OPT_SIENA */ Modified: stable/10/sys/dev/sfxge/common/efx_rx.c == --- stable/10/sys/dev/sfxge/common/efx_rx.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_rx.c Wed Mar 25 10:39:18 2015 (r280535) @@ -527,7 +527,7 @@ efx_rx_filter_insert( EFSYS_ASSERT3P(spec, !=, NULL); spec-efs_dmaq_id = (uint16_t)erp-er_index; -
svn commit: r280575 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 12:57:43 2015 New Revision: 280575 URL: https://svnweb.freebsd.org/changeset/base/280575 Log: MFC: 279147 sfxge: TxQ block level should use EFX_TXQ_LIMIT as maximum TxQ size Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 12:46:19 2015 (r280574) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 12:57:43 2015 (r280575) @@ -67,16 +67,22 @@ __FBSDID($FreeBSD$); #include sfxge.h #include sfxge_tx.h -/* Set the block level to ensure there is space to generate a - * large number of descriptors for TSO. With minimum MSS and - * maximum mbuf length we might need more than a ring-ful of - * descriptors, but this should not happen in practice except - * due to deliberate attack. In that case we will truncate - * the output at a packet boundary. +/* + * Estimate maximum number of Tx descriptors required for TSO packet. + * With minimum MSS and maximum mbuf length we might need more (even + * than a ring-ful of descriptors), but this should not happen in + * practice except due to deliberate attack. In that case we will + * truncate the output at a packet boundary. */ #defineSFXGE_TSO_MAX_DESC \ (SFXGE_TSO_MAX_SEGS * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) -#defineSFXGE_TXQ_BLOCK_LEVEL(_entries) ((_entries) - SFXGE_TSO_MAX_DESC) + +/* + * Set the block level to ensure there is space to generate a + * large number of descriptors for TSO. + */ +#defineSFXGE_TXQ_BLOCK_LEVEL(_entries) \ + (EFX_TXQ_LIMIT(_entries) - SFXGE_TSO_MAX_DESC) #ifdef SFXGE_HAVE_MQ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280582 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:04:28 2015 New Revision: 280582 URL: https://svnweb.freebsd.org/changeset/base/280582 Log: MFC: 279177 sfxge: assert event queue lock in event handlers It is useful to highlight lock context. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:03:36 2015 (r280581) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:04:28 2015 (r280582) @@ -45,6 +45,8 @@ sfxge_ev_qcomplete(struct sfxge_evq *evq struct sfxge_rxq *rxq; struct sfxge_txq *txq; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq-sc; index = evq-index; rxq = sc-rxq[index]; @@ -84,6 +86,8 @@ sfxge_ev_rx(void *arg, uint32_t label, u struct sfxge_rx_sw_desc *rx_desc; evq = arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq-sc; if (evq-exception) @@ -135,6 +139,8 @@ sfxge_ev_exception(void *arg, uint32_t c struct sfxge_softc *sc; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq-sc; evq-exception = B_TRUE; @@ -160,6 +166,8 @@ sfxge_ev_rxq_flush_done(void *arg, uint3 uint16_t magic; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq-sc; rxq = sc-rxq[rxq_index]; @@ -192,6 +200,8 @@ sfxge_ev_rxq_flush_failed(void *arg, uin uint16_t magic; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq-sc; rxq = sc-rxq[rxq_index]; @@ -233,6 +243,8 @@ sfxge_ev_tx(void *arg, uint32_t label, u unsigned int delta; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + txq = sfxge_get_txq_by_label(evq, label); KASSERT(txq != NULL, (txq == NULL)); @@ -273,6 +285,8 @@ sfxge_ev_txq_flush_done(void *arg, uint3 uint16_t magic; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq-sc; txq = sc-txq[txq_index]; @@ -303,6 +317,8 @@ sfxge_ev_software(void *arg, uint16_t ma unsigned int label; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq-sc; label = magic SFXGE_MAGIC_DMAQ_LABEL_MASK; @@ -528,6 +544,7 @@ sfxge_ev_initialized(void *arg) struct sfxge_evq *evq; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); KASSERT(evq-init_state == SFXGE_EVQ_STARTING, (evq not starting)); @@ -544,6 +561,8 @@ sfxge_ev_link_change(void *arg, efx_link struct sfxge_softc *sc; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq-sc; sfxge_mac_link_update(sc, link_mode); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280581 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:03:36 2015 New Revision: 280581 URL: https://svnweb.freebsd.org/changeset/base/280581 Log: MFC: 279176 sfxge: pass correct address to free allocated memory in the case of load error It is one more place missed in the previous fix. Most likely is was just memory leak on the error handling path since typically efsys_mem_t is filled in by zeros on allocation. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c == --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:02:33 2015 (r280580) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:03:36 2015 (r280581) @@ -164,8 +164,8 @@ sfxge_dma_alloc(struct sfxge_softc *sc, * wrong. */ if (esmp-esm_addr == 0) { - bus_dmamem_free(esmp-esm_tag, esmp-esm_base, esmp-esm_map); - bus_dma_tag_destroy(esmp-esm_tag); + bus_dmamem_free(esmp-esm_tag, vaddr, esmp-esm_map); + bus_dma_tag_destroy(esmp-esm_tag); return (ENOMEM); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280594 - stable/9/sys/dev/sound/usb
Author: hselasky Date: Wed Mar 25 13:16:39 2015 New Revision: 280594 URL: https://svnweb.freebsd.org/changeset/base/280594 Log: MFC r280322 and r280429: The synchronisation value returned by the so-called feedback endpoint appears to be too inaccurate that it can be used to synchronize the playback data stream. If there is a recording endpoint associated with the playback endpoint, use that instead. That means if the isochronous OUT endpoint is asynchronus the USB audio driver will automatically start recording, if possible, to get exact information about the needed sample rate adjustments. In no recording endpoint is present, no rate adaption will be done. While at it fix an issue where the hardware buffer pointers don't get reset at the first device PCM trigger. Make some variables 32-bit to avoid problems with multithreading. Use the feedback value from the synchronization endpoint as fallback when there is no recording channel. PR: 198444 Modified: stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/dev/sound/usb/uaudio.h stable/9/sys/dev/sound/usb/uaudio_pcm.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c == --- stable/9/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:15:47 2015 (r280593) +++ stable/9/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:16:39 2015 (r280594) @@ -218,26 +218,25 @@ struct uaudio_chan { uint32_t sample_rem; uint32_t sample_curr; uint32_t max_buf; + int32_t jitter_rem; + int32_t jitter_curr; + + int feedback_rate; uint32_t pcm_format[2]; uint16_t bytes_per_frame[2]; - uint8_t num_alt; - uint8_t cur_alt; - uint8_t set_alt; - uint8_t operation; + uint32_t intr_counter; + uint32_t running; + uint32_t num_alt; + uint32_t cur_alt; + uint32_t set_alt; + uint32_t operation; #defineCHAN_OP_NONE 0 #defineCHAN_OP_START 1 #defineCHAN_OP_STOP 2 #defineCHAN_OP_DRAIN 3 - - /* USB audio feedback endpoint state */ - struct { - uint16_t time; /* I/O interrupt count */ - int16_t constant; /* sample rate adjustment in Hz */ - int16_t remainder; /* current remainder */ - } feedback; }; #defineUMIDI_EMB_JACK_MAX 16 /* units */ @@ -1096,6 +1095,11 @@ uaudio_attach_sub(device_t dev, kobj_cla uaudio_mixer_register_sysctl(sc, dev); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + feedback_rate, CTLFLAG_RD, sc-sc_play_chan.feedback_rate, + 0, Feedback sample rate in Hz); + return (0); /* success */ detach: @@ -1294,7 +1298,6 @@ uaudio_configure_msg_sub(struct uaudio_s chan-frames_per_second = fps; chan-sample_rem = chan_alt-sample_rate % fps; chan-sample_curr = 0; - chan-frames_per_second = fps; /* compute required buffer size */ buf_size = (chan-bytes_per_frame[1] * frames); @@ -1974,7 +1977,7 @@ uaudio_chan_play_sync_callback(struct us { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint64_t sample_rate = ch-usb_alt[ch-cur_alt].sample_rate; + uint64_t sample_rate; uint8_t buf[4]; uint64_t temp; int len; @@ -2017,6 +2020,8 @@ uaudio_chan_play_sync_callback(struct us temp *= 125ULL; + sample_rate = ch-usb_alt[ch-cur_alt].sample_rate; + /* auto adjust */ while (temp (sample_rate - (sample_rate / 4))) temp *= 2; @@ -2024,35 +2029,17 @@ uaudio_chan_play_sync_callback(struct us while (temp (sample_rate + (sample_rate / 2))) temp /= 2; - /* -* Some USB audio devices only report a sample rate -* different from the nominal one when they want one -* more or less sample. Make sure we catch this case -* by pulling the sample rate offset slowly towards -* zero if the reported value is equal to the sample -* rate. -*/ - if (temp sample_rate) - ch-feedback.constant += 1; - else if (temp sample_rate) - ch-feedback.constant -= 1; - else if (ch-feedback.constant 0) - ch-feedback.constant--; - else if (ch-feedback.constant 0) - ch-feedback.constant++; - - DPRINTF(Comparing %d Hz :: %d Hz :: %d samples drift\n, - (int)temp, (int)sample_rate,
svn commit: r280612 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:56:42 2015 New Revision: 280612 URL: https://svnweb.freebsd.org/changeset/base/280612 Log: MFC: 280432 sfxge: cleanup: add a blank line before each #if to improve readability Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h == --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 13:55:36 2015 (r280611) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 13:56:42 2015 (r280612) @@ -54,25 +54,32 @@ */ #defineCACHE_LINE_SIZE 128 #endif + #ifndef IFCAP_LINKSTATE #defineIFCAP_LINKSTATE 0 #endif + #ifndef IFCAP_VLAN_HWTSO #defineIFCAP_VLAN_HWTSO 0 #endif + #ifndef IFM_10G_T #defineIFM_10G_T IFM_UNKNOWN #endif + #ifndef IFM_10G_KX4 #defineIFM_10G_KX4 IFM_10G_CX4 #endif + #if (__FreeBSD_version = 800501 __FreeBSD_version 90) || \ __FreeBSD_version = 93 #defineSFXGE_HAVE_DESCRIBE_INTR #endif + #ifdef IFM_ETH_RXPAUSE #defineSFXGE_HAVE_PAUSE_MEDIAOPTS #endif + #ifndef CTLTYPE_U64 #defineCTLTYPE_U64 CTLTYPE_QUAD #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280615 - in stable/10/sys: dev/sfxge modules/sfxge
Author: arybchik Date: Wed Mar 25 14:10:20 2015 New Revision: 280615 URL: https://svnweb.freebsd.org/changeset/base/280615 Log: MFC: 279398 sfxge: compile out LRO if kernel is compiled without IPv4 and IPv6 Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) MFC: 279411 Unbreak 'make depend' with sfxge by removing debugging code activated in the INET || INET6 case X-MFC with: r279398 Pointyhat to: arybchik Modified: stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_rx.h stable/10/sys/modules/sfxge/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c == --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 14:05:51 2015 (r280614) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 14:10:20 2015 (r280615) @@ -57,6 +57,8 @@ __FBSDID($FreeBSD$); #defineRX_REFILL_THRESHOLD(_entries) (EFX_RXQ_LIMIT(_entries) * 9 / 10) +#ifdef SFXGE_LRO + SYSCTL_NODE(_hw_sfxge, OID_AUTO, lro, CTLFLAG_RD, NULL, Large receive offload (LRO) parameters); @@ -136,6 +138,8 @@ static unsigned long ipv6_addr_cmp(const #endif } +#endif /* SFXGE_LRO */ + void sfxge_rx_qflush_done(struct sfxge_rxq *rxq) { @@ -342,6 +346,8 @@ sfxge_rx_deliver(struct sfxge_softc *sc, rx_desc-mbuf = NULL; } +#ifdef SFXGE_LRO + static void sfxge_lro_deliver(struct sfxge_lro_state *st, struct sfxge_lro_conn *c) { @@ -760,6 +766,20 @@ static void sfxge_lro_end_of_burst(struc sfxge_lro_purge_idle(rxq, t); } +#else /* !SFXGE_LRO */ + +static void +sfxge_lro(struct sfxge_rxq *rxq, struct sfxge_rx_sw_desc *rx_buf) +{ +} + +static void +sfxge_lro_end_of_burst(struct sfxge_rxq *rxq) +{ +} + +#endif /* SFXGE_LRO */ + void sfxge_rx_qcomplete(struct sfxge_rxq *rxq, boolean_t eop) { @@ -1040,6 +1060,8 @@ fail: return (rc); } +#ifdef SFXGE_LRO + static void sfxge_lro_init(struct sfxge_rxq *rxq) { struct sfxge_lro_state *st = rxq-lro; @@ -1092,6 +1114,20 @@ static void sfxge_lro_fini(struct sfxge_ st-conns = NULL; } +#else + +static void +sfxge_lro_init(struct sfxge_rxq *rxq) +{ +} + +static void +sfxge_lro_fini(struct sfxge_rxq *rxq) +{ +} + +#endif /* SFXGE_LRO */ + static void sfxge_rx_qfini(struct sfxge_softc *sc, unsigned int index) { @@ -1162,6 +1198,7 @@ static const struct { } sfxge_rx_stats[] = { #defineSFXGE_RX_STAT(name, member) \ { #name, offsetof(struct sfxge_rxq, member) } +#ifdef SFXGE_LRO SFXGE_RX_STAT(lro_merges, lro.n_merges), SFXGE_RX_STAT(lro_bursts, lro.n_bursts), SFXGE_RX_STAT(lro_slow_start, lro.n_slow_start), @@ -1170,6 +1207,7 @@ static const struct { SFXGE_RX_STAT(lro_new_stream, lro.n_new_stream), SFXGE_RX_STAT(lro_drop_idle, lro.n_drop_idle), SFXGE_RX_STAT(lro_drop_closed, lro.n_drop_closed) +#endif }; static int @@ -1226,6 +1264,7 @@ sfxge_rx_init(struct sfxge_softc *sc) int index; int rc; +#ifdef SFXGE_LRO if (!ISP2(lro_table_size)) { log(LOG_ERR, %s=%u must be power of 2, SFXGE_LRO_PARAM(table_size), lro_table_size); @@ -1235,6 +1274,7 @@ sfxge_rx_init(struct sfxge_softc *sc) if (lro_idle_ticks == 0) lro_idle_ticks = hz / 10 + 1; /* 100 ms */ +#endif intr = sc-intr; @@ -1260,6 +1300,8 @@ fail: sc-rxq_count = 0; +#ifdef SFXGE_LRO fail_lro_table_size: +#endif return (rc); } Modified: stable/10/sys/dev/sfxge/sfxge_rx.h == --- stable/10/sys/dev/sfxge/sfxge_rx.h Wed Mar 25 14:05:51 2015 (r280614) +++ stable/10/sys/dev/sfxge/sfxge_rx.h Wed Mar 25 14:10:20 2015 (r280615) @@ -32,6 +32,13 @@ #ifndef _SFXGE_RX_H #define_SFXGE_RX_H +#include opt_inet.h +#include opt_inet6.h + +#if defined(INET) || defined(INET6) +#defineSFXGE_LRO 1 +#endif + #defineSFXGE_MAGIC_RESERVED0x8000 #defineSFXGE_MAGIC_DMAQ_LABEL_WIDTH6 @@ -59,6 +66,8 @@ struct sfxge_rx_sw_desc { int size; }; +#ifdef SFXGE_LRO + /** * struct sfxge_lro_conn - Connection state for software LRO * @link: Link for hash table and free list. @@ -139,6 +148,8 @@ struct sfxge_lro_state { unsigned n_drop_closed; }; +#endif /* SFXGE_LRO */ + enum sfxge_flush_state { SFXGE_FLUSH_DONE = 0, SFXGE_FLUSH_PENDING, @@ -167,7 +178,9 @@ struct sfxge_rxq { unsigned intpending; unsigned intcompleted; unsigned intloopback; +#ifdef SFXGE_LRO struct sfxge_lro_state lro; +#endif unsigned intrefill_threshold; struct callout refill_callout;
svn commit: r280579 - stable/10/sys/kern
Author: hselasky Date: Wed Mar 25 13:01:51 2015 New Revision: 280579 URL: https://svnweb.freebsd.org/changeset/base/280579 Log: MFC r280345: Fix for out of order device destruction notifications when using the delist_dev() function. In addition to this change: - add a proper description of this function - add a proper witness assert inside this function - switch a nearby line to use the cdp pointer instead of cdev2priv() Modified: stable/10/sys/kern/kern_conf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_conf.c == --- stable/10/sys/kern/kern_conf.c Wed Mar 25 13:01:10 2015 (r280578) +++ stable/10/sys/kern/kern_conf.c Wed Mar 25 13:01:51 2015 (r280579) @@ -1093,9 +1093,12 @@ destroy_devl(struct cdev *dev) } dev_unlock(); - notify_destroy(dev); + if ((cdp-cdp_flags CDP_UNREF_DTR) == 0) { + /* avoid out of order notify events */ + notify_destroy(dev); + } mtx_lock(cdevpriv_mtx); - while ((p = LIST_FIRST(cdev2priv(dev)-cdp_fdpriv)) != NULL) { + while ((p = LIST_FIRST(cdp-cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(cdevpriv_mtx); } @@ -1141,12 +1144,25 @@ delist_dev_locked(struct cdev *dev) devfs_destroy(dev); LIST_FOREACH(child, dev-si_children, si_siblings) delist_dev_locked(child); + dev_unlock(); + /* ensure the destroy event is queued in order */ + notify_destroy(dev); + dev_lock(); } +/* + * This function will delist a character device and its children from + * the directory listing and create a destroy event without waiting + * for all character device references to go away. At some later point + * destroy_dev() must be called to complete the character device + * destruction. After calling this function the character device name + * can instantly be re-used. + */ void delist_dev(struct cdev *dev) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, delist_dev); dev_lock(); delist_dev_locked(dev); dev_unlock(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280588 - in stable/10/sys/dev/sfxge: . common
Author: arybchik Date: Wed Mar 25 13:11:19 2015 New Revision: 280588 URL: https://svnweb.freebsd.org/changeset/base/280588 Log: MFC: 279182 sfxge: correct event queue interrupt moderation timer quanta Submitted by: Andrew Lee alee at solarflare.com Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_impl.h stable/10/sys/dev/sfxge/common/siena_nic.c stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h == --- stable/10/sys/dev/sfxge/common/efx.hWed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/common/efx.hWed Mar 25 13:11:19 2015 (r280588) @@ -895,7 +895,8 @@ typedef struct efx_nic_cfg_s { uint32_tenc_txq_limit; uint32_tenc_rxq_limit; uint32_tenc_buftbl_limit; - uint32_tenc_evq_moderation_max; + uint32_tenc_evq_timer_quantum_ns; + uint32_tenc_evq_timer_max_us; uint32_tenc_clk_mult; #if EFSYS_OPT_LOOPBACK uint32_tenc_loopback_types[EFX_LINK_NMODES]; Modified: stable/10/sys/dev/sfxge/common/efx_ev.c == --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 13:11:19 2015 (r280588) @@ -857,7 +857,7 @@ efx_ev_qmoderate( EFSYS_ASSERT3U(eep-ee_magic, ==, EFX_EVQ_MAGIC); - if (us encp-enc_evq_moderation_max) { + if (us encp-enc_evq_timer_max_us) { rc = EINVAL; goto fail1; } @@ -876,7 +876,7 @@ efx_ev_qmoderate( uint32_t timer_val; /* Calculate the timer value in quanta */ - timer_val = us * encp-enc_clk_mult / EFX_EV_TIMER_QUANTUM; + timer_val = us * 1000 / encp-enc_evq_timer_quantum_ns; /* Moderation value is base 0 so we need to deduct 1 */ if (timer_val 0) Modified: stable/10/sys/dev/sfxge/common/efx_impl.h == --- stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 13:11:19 2015 (r280588) @@ -408,7 +408,8 @@ struct efx_evq_s { #defineEFX_EVQ_MAGIC 0x08081997 -#defineEFX_EV_TIMER_QUANTUM5 +#defineEFX_EVQ_FALCON_TIMER_QUANTUM_NS 4968 /* 621 cycles */ +#defineEFX_EVQ_SIENA_TIMER_QUANTUM_NS 6144 /* 768 cycles */ struct efx_rxq_s { uint32_ter_magic; Modified: stable/10/sys/dev/sfxge/common/siena_nic.c == --- stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 13:11:19 2015 (r280588) @@ -329,8 +329,10 @@ siena_board_cfg( encp-enc_clk_mult = 2; } - encp-enc_evq_moderation_max = EFX_EV_TIMER_QUANTUM - FRF_AB_TIMER_VAL_WIDTH / encp-enc_clk_mult; + encp-enc_evq_timer_quantum_ns = + EFX_EVQ_SIENA_TIMER_QUANTUM_NS / encp-enc_clk_mult; + encp-enc_evq_timer_max_us = (encp-enc_evq_timer_quantum_ns + FRF_CZ_TC_TIMER_VAL_WIDTH) / 1000; /* Resource limits */ req.emr_cmd = MC_CMD_GET_RESOURCE_LIMITS; Modified: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:11:19 2015 (r280588) @@ -517,7 +517,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG * so we have to range-check the value ourselves. */ if (moderation - efx_nic_cfg_get(sc-enp)-enc_evq_moderation_max) { + efx_nic_cfg_get(sc-enp)-enc_evq_timer_max_us) { error = EINVAL; goto out; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280587 - stable/10/share/man/man4
Author: arybchik Date: Wed Mar 25 13:09:46 2015 New Revision: 280587 URL: https://svnweb.freebsd.org/changeset/base/280587 Log: MFC: 279181 sfxge: add indefinite article and update timestamp Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/share/man/man4/sfxge.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 == --- stable/10/share/man/man4/sfxge.4Wed Mar 25 13:08:57 2015 (r280586) +++ stable/10/share/man/man4/sfxge.4Wed Mar 25 13:09:46 2015 (r280587) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd September 30, 2014 +.Dd February 22, 2015 .Dt SFXGE 4 .Os .Sh NAME @@ -103,7 +103,7 @@ The value must be greater than 0. 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 +If a 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. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280598 - head/sys/dev/usb
Author: hselasky Date: Wed Mar 25 13:32:27 2015 New Revision: 280598 URL: https://svnweb.freebsd.org/changeset/base/280598 Log: Add definition of the ISOCHRONOUS endpoint usage bits. Refer to the USB v2.0 specification for more information. MFC after:1 week Modified: head/sys/dev/usb/usb.h Modified: head/sys/dev/usb/usb.h == --- head/sys/dev/usb/usb.h Wed Mar 25 13:28:13 2015(r280597) +++ head/sys/dev/usb/usb.h Wed Mar 25 13:32:27 2015(r280598) @@ -542,6 +542,11 @@ struct usb_endpoint_descriptor { #defineUE_ISO_ADAPT0x08 #defineUE_ISO_SYNC 0x0c #defineUE_GET_ISO_TYPE(a) ((a) UE_ISO_TYPE) +#defineUE_ISO_USAGE0x30 +#defineUE_ISO_USAGE_DATA 0x00 +#defineUE_ISO_USAGE_FEEDBACK 0x10 +#defineUE_ISO_USAGE_IMPLICT_FB 0x20 +#defineUE_GET_ISO_USAGE(a) ((a) UE_ISO_USAGE) uWord wMaxPacketSize; #defineUE_ZERO_MPS 0x /* for internal use only */ uByte bInterval; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280605 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 13:48:54 2015 New Revision: 280605 URL: https://svnweb.freebsd.org/changeset/base/280605 Log: MFC: 280375 sfxge: add barriers to BAR write macros In theory the barriers are required to cope with write combining and reordering. Two barriers are added (sometimes merged to one): 1. Before the first write to guarantee that previous writes to the region have been done 2. Before the last write to guarantee that write to the last dword/qword is done after previous writes Barriers are inserted before in the assumption that it is better to postpone barriers as much as it is possible (more chances that the operation has already been already done and barrier does not stall CPU). On x86 and amd64 bus space write barriers are just compiler memory barriers which are definitely required. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2077 Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h == --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:47:48 2015 (r280604) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:48:54 2015 (r280605) @@ -786,6 +786,14 @@ typedef struct efsys_bar_s { EFSYS_PROBE2(bar_writed, unsigned int, (_offset), \ uint32_t, (_edp)-ed_u32[0]); \ \ + /* \ +* Make sure that previous writes to the dword have \ +* been done. It should be cheaper than barrier just\ +* after the write below. \ +*/ \ + bus_space_barrier((_esbp)-esb_tag, (_esbp)-esb_handle,\ + (_offset), sizeof (efx_dword_t),\ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)-esb_tag, \ (_esbp)-esb_handle,\ (_offset), (_edp)-ed_u32[0]); \ @@ -809,6 +817,14 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)-eq_u32[1],\ uint32_t, (_eqp)-eq_u32[0]); \ \ + /* \ +* Make sure that previous writes to the qword have \ +* been done. It should be cheaper than barrier just\ +* after the write below. \ +*/ \ + bus_space_barrier((_esbp)-esb_tag, (_esbp)-esb_handle,\ + (_offset), sizeof (efx_qword_t),\ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_8((_esbp)-esb_tag, \ (_esbp)-esb_handle,\ (_offset), (_eqp)-eq_u64[0]); \ @@ -829,9 +845,25 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)-eq_u32[1],\ uint32_t, (_eqp)-eq_u32[0]); \ \ + /* \ +* Make sure that previous writes to the qword have \ +* been done. It should be cheaper than barrier just\ +* after the last write below. \ +*/ \ + bus_space_barrier((_esbp)-esb_tag, (_esbp)-esb_handle,\ + (_offset), sizeof (efx_qword_t),\ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)-esb_tag, \ (_esbp)-esb_handle,\ (_offset), (_eqp)-eq_u32[0]); \ + /* \ +* It should be guaranteed that the last dword comes\ +* the last, so barrier entire qword to be sure that\ +* neither above nor below writes are reordered.\ +*/
Re: svn commit: r280444 - head/sys/netinet6
On 24.03.2015 19:45, Gleb Smirnoff wrote: Author: glebius Date: Tue Mar 24 16:45:50 2015 New Revision: 280444 URL: https://svnweb.freebsd.org/changeset/base/280444 Log: Move ip6_sprintf() declaration from in6_var.h to in6.h. This is a simple function that works with in6_addr and it is not related to the INET6 stack implementation. Hi, maybe it will be better just remove ip6_sprintf() and use inet_ntop() instead? -- WBR, Andrey V. Elsukov signature.asc Description: OpenPGP digital signature
svn commit: r280586 - stable/8/sys/kern
Author: hselasky Date: Wed Mar 25 13:08:57 2015 New Revision: 280586 URL: https://svnweb.freebsd.org/changeset/base/280586 Log: MFC r280345: Fix for out of order device destruction notifications when using the delist_dev() function. In addition to this change: - add a proper description of this function - add a proper witness assert inside this function - switch a nearby line to use the cdp pointer instead of cdev2priv() Modified: stable/8/sys/kern/kern_conf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_conf.c == --- stable/8/sys/kern/kern_conf.c Wed Mar 25 13:06:37 2015 (r280585) +++ stable/8/sys/kern/kern_conf.c Wed Mar 25 13:08:57 2015 (r280586) @@ -929,9 +929,12 @@ destroy_devl(struct cdev *dev) } dev_unlock(); - notify_destroy(dev); + if ((cdp-cdp_flags CDP_UNREF_DTR) == 0) { + /* avoid out of order notify events */ + notify_destroy(dev); + } mtx_lock(cdevpriv_mtx); - while ((p = LIST_FIRST(cdev2priv(dev)-cdp_fdpriv)) != NULL) { + while ((p = LIST_FIRST(cdp-cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(cdevpriv_mtx); } @@ -977,12 +980,25 @@ delist_dev_locked(struct cdev *dev) devfs_destroy(dev); LIST_FOREACH(child, dev-si_children, si_siblings) delist_dev_locked(child); + dev_unlock(); + /* ensure the destroy event is queued in order */ + notify_destroy(dev); + dev_lock(); } +/* + * This function will delist a character device and its children from + * the directory listing and create a destroy event without waiting + * for all character device references to go away. At some later point + * destroy_dev() must be called to complete the character device + * destruction. After calling this function the character device name + * can instantly be re-used. + */ void delist_dev(struct cdev *dev) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, delist_dev); dev_lock(); delist_dev_locked(dev); dev_unlock(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280596 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:18:51 2015 New Revision: 280596 URL: https://svnweb.freebsd.org/changeset/base/280596 Log: MFC: 279351 sfxge: expect required init_state on data path and in periodic calls With the patch applied the number of instruction events is 1% less and number of mispredicted branch events is 5% less under multistream TCP traffic load close to line rate. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_intr.c stable/10/sys/dev/sfxge/sfxge_port.c stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:18:36 2015 (r280595) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:18:51 2015 (r280596) @@ -98,7 +98,7 @@ sfxge_ev_rx(void *arg, uint32_t label, u KASSERT(evq-index == rxq-index, (evq-index != rxq-index)); - if (rxq-init_state != SFXGE_RXQ_STARTED) + if (__predict_false(rxq-init_state != SFXGE_RXQ_STARTED)) goto done; expected = rxq-pending++ rxq-ptr_mask; @@ -251,7 +251,7 @@ sfxge_ev_tx(void *arg, uint32_t label, u KASSERT(evq-index == txq-evq_index, (evq-index != txq-evq_index)); - if (txq-init_state != SFXGE_TXQ_STARTED) + if (__predict_false(txq-init_state != SFXGE_TXQ_STARTED)) goto done; stop = (id + 1) txq-ptr_mask; @@ -428,7 +428,7 @@ sfxge_ev_stat_update(struct sfxge_softc SFXGE_ADAPTER_LOCK(sc); - if (sc-evq[0]-init_state != SFXGE_EVQ_STARTED) + if (__predict_false(sc-evq[0]-init_state != SFXGE_EVQ_STARTED)) goto out; now = ticks; @@ -593,8 +593,8 @@ sfxge_ev_qpoll(struct sfxge_evq *evq) SFXGE_EVQ_LOCK(evq); - if (evq-init_state != SFXGE_EVQ_STARTING - evq-init_state != SFXGE_EVQ_STARTED) { + if (__predict_false(evq-init_state != SFXGE_EVQ_STARTING + evq-init_state != SFXGE_EVQ_STARTED)) { rc = EINVAL; goto fail; } Modified: stable/10/sys/dev/sfxge/sfxge_intr.c == --- stable/10/sys/dev/sfxge/sfxge_intr.cWed Mar 25 13:18:36 2015 (r280595) +++ stable/10/sys/dev/sfxge/sfxge_intr.cWed Mar 25 13:18:51 2015 (r280596) @@ -130,7 +130,7 @@ sfxge_intr_message(void *arg) KASSERT(intr-type == EFX_INTR_MESSAGE, (intr-type != EFX_INTR_MESSAGE)); - if (intr-state != SFXGE_INTR_STARTED) + if (__predict_false(intr-state != SFXGE_INTR_STARTED)) return; (void)efx_intr_status_message(enp, index, fatal); Modified: stable/10/sys/dev/sfxge/sfxge_port.c == --- stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 13:18:36 2015 (r280595) +++ stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 13:18:51 2015 (r280596) @@ -50,7 +50,7 @@ sfxge_mac_stat_update(struct sfxge_softc SFXGE_PORT_LOCK_ASSERT_OWNED(port); - if (port-init_state != SFXGE_PORT_STARTED) { + if (__predict_false(port-init_state != SFXGE_PORT_STARTED)) { rc = 0; goto out; } @@ -179,7 +179,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND SFXGE_PORT_LOCK(port); if (port-wanted_fc != fcntl) { - if (port-init_state == SFXGE_PORT_STARTED) + if (__predict_false(port-init_state == SFXGE_PORT_STARTED)) error = efx_mac_fcntl_set(sc-enp, port-wanted_fc, B_TRUE); @@ -210,7 +210,8 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE port = sc-port; SFXGE_PORT_LOCK(port); - if (port-init_state == SFXGE_PORT_STARTED SFXGE_LINK_UP(sc)) + if (__predict_true(port-init_state == SFXGE_PORT_STARTED) + SFXGE_LINK_UP(sc)) efx_mac_fcntl_get(sc-enp, wanted_fc, link_fc); else link_fc = 0; @@ -265,7 +266,7 @@ sfxge_mac_poll_work(void *arg, int npend SFXGE_PORT_LOCK(port); - if (port-init_state != SFXGE_PORT_STARTED) + if (__predict_false(port-init_state != SFXGE_PORT_STARTED)) goto done; /* This may sleep waiting for MCDI completion */ @@ -332,7 +333,7 @@ sfxge_mac_filter_set(struct sfxge_softc * lock is held in sleeping thread. Both problems are repeatable * on LAG with LACP proto bring up. */ -
svn commit: r280599 - in stable/10: share/man/man4 sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:41:26 2015 New Revision: 280599 URL: https://svnweb.freebsd.org/changeset/base/280599 Log: MFC: 280160 sfxge: add tunables to control LRO parameters on driver load time Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/share/man/man4/sfxge.4 stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 == --- stable/10/share/man/man4/sfxge.4Wed Mar 25 13:32:27 2015 (r280598) +++ stable/10/share/man/man4/sfxge.4Wed Mar 25 13:41:26 2015 (r280599) @@ -120,6 +120,27 @@ The value must be greater than or equal 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. +.It Va hw.sfxge.lro.table_size +Size of the LRO hash table. +Must be a power of 2. +A larger table means we can accelerate a larger number of streams. +.It Va hw.sfxge.lro.chain_max +The maximum length of a hash chain. +If chains get too long then the lookup time increases and may exceed +the benefit of LRO. +.It Va hw.sfxge.lro.idle_ticks +The maximum time (in ticks) that a connection can be idle before it's LRO +state is discarded. +.It Va hw.sfxge.lro.slow_start_packets +Number of packets with payload that must arrive in-order before a connection +is eligible for LRO. +The idea is we should avoid coalescing segments when the sender is in +slow-start because reducing the ACK rate can damage performance. +.It Va hw.sfxge.lro.loss_packets +Number of packets with payload that must arrive in-order following loss +before a connection is eligible for LRO. +The idea is we should avoid coalescing segments when the sender is recovering +from loss, because reducing the ACK rate can damage performance. .El .Sh SUPPORT For general information and support, Modified: stable/10/sys/dev/sfxge/sfxge_rx.c == --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:32:27 2015 (r280598) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:41:26 2015 (r280599) @@ -36,6 +36,7 @@ __FBSDID($FreeBSD$); #include sys/socket.h #include sys/sysctl.h #include sys/limits.h +#include sys/syslog.h #include net/ethernet.h #include net/if.h @@ -56,20 +57,38 @@ __FBSDID($FreeBSD$); #defineRX_REFILL_THRESHOLD(_entries) (EFX_RXQ_LIMIT(_entries) * 9 / 10) +SYSCTL_NODE(_hw_sfxge, OID_AUTO, lro, CTLFLAG_RD, NULL, + Large receive offload (LRO) parameters); + +#defineSFXGE_LRO_PARAM(_param) SFXGE_PARAM(lro._param) + /* Size of the LRO hash table. Must be a power of 2. A larger table * means we can accelerate a larger number of streams. */ static unsigned lro_table_size = 128; +TUNABLE_INT(SFXGE_LRO_PARAM(table_size), lro_table_size); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, table_size, CTLFLAG_RDTUN, + lro_table_size, 0, + Size of the LRO hash table (must be a power of 2)); /* Maximum length of a hash chain. If chains get too long then the lookup * time increases and may exceed the benefit of LRO. */ static unsigned lro_chain_max = 20; +TUNABLE_INT(SFXGE_LRO_PARAM(chain_max), lro_chain_max); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, chain_max, CTLFLAG_RDTUN, + lro_chain_max, 0, + The maximum length of a hash chain); /* Maximum time (in ticks) that a connection can be idle before it's LRO * state is discarded. */ static unsigned lro_idle_ticks; /* initialised in sfxge_rx_init() */ +TUNABLE_INT(SFXGE_LRO_PARAM(idle_ticks), lro_idle_ticks); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, idle_ticks, CTLFLAG_RDTUN, + lro_idle_ticks, 0, + The maximum time (in ticks) that a connection can be idle + before it's LRO state is discarded); /* Number of packets with payload that must arrive in-order before a * connection is eligible for LRO. The idea is we should avoid coalescing @@ -77,6 +96,11 @@ static unsigned lro_idle_ticks; /* initi * can damage performance. */ static int lro_slow_start_packets = 2000; +TUNABLE_INT(SFXGE_LRO_PARAM(slow_start_packets), lro_slow_start_packets); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, slow_start_packets, CTLFLAG_RDTUN, + lro_slow_start_packets, 0, + Number of packets with payload that must arrive in-order before + a connection is eligible for LRO); /* Number of packets with payload that must arrive in-order following loss * before a connection is eligible for LRO. The idea is we should avoid @@ -84,6 +108,11 @@ static int lro_slow_start_packets = 2000 * reducing the ACK rate can damage performance. */ static int lro_loss_packets = 20; +TUNABLE_INT(SFXGE_LRO_PARAM(loss_packets), lro_loss_packets); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO,
svn commit: r280603 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:46:30 2015 New Revision: 280603 URL: https://svnweb.freebsd.org/changeset/base/280603 Log: MFC: 280164 sfxge: increase default put-list limit to 1024 Drops are observed under multi-stream TCP traffic due to put-list overflow with limit equal to 64. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.h == --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:45:20 2015 (r280602) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:46:30 2015 (r280603) @@ -81,7 +81,7 @@ struct sfxge_tx_mapping { #defineSFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT (64 * 1024) #defineSFXGE_TX_DPL_GET_NON_TCP_PKT_LIMIT_DEFAULT 1024 -#defineSFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 +#defineSFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 1024 /* * Deferred packet list. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280610 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:54:28 2015 New Revision: 280610 URL: https://svnweb.freebsd.org/changeset/base/280610 Log: MFC: 280380 sfxge: remove unnecessary and wrong prediction Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2085 Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c == --- stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 13:53:28 2015 (r280609) +++ stable/10/sys/dev/sfxge/sfxge_port.cWed Mar 25 13:54:28 2015 (r280610) @@ -179,7 +179,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND SFXGE_PORT_LOCK(port); if (port-wanted_fc != fcntl) { - if (__predict_false(port-init_state == SFXGE_PORT_STARTED)) + if (port-init_state == SFXGE_PORT_STARTED) error = efx_mac_fcntl_set(sc-enp, port-wanted_fc, B_TRUE); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280577 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 12:59:49 2015 New Revision: 280577 URL: https://svnweb.freebsd.org/changeset/base/280577 Log: MFC: 279173 sfxge: add missing common code NVRAM types and map from MCDI Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/siena_nvram.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h == --- stable/10/sys/dev/sfxge/common/efx.hWed Mar 25 12:59:01 2015 (r280576) +++ stable/10/sys/dev/sfxge/common/efx.hWed Mar 25 12:59:49 2015 (r280577) @@ -1024,6 +1024,10 @@ typedef enum efx_nvram_type_e { EFX_NVRAM_MC_GOLDEN, EFX_NVRAM_PHY, EFX_NVRAM_NULLPHY, + EFX_NVRAM_FPGA, + EFX_NVRAM_FCFW, + EFX_NVRAM_CPLD, + EFX_NVRAM_FPGA_BACKUP, EFX_NVRAM_NTYPES, } efx_nvram_type_t; Modified: stable/10/sys/dev/sfxge/common/siena_nvram.c == --- stable/10/sys/dev/sfxge/common/siena_nvram.cWed Mar 25 12:59:01 2015(r280576) +++ stable/10/sys/dev/sfxge/common/siena_nvram.cWed Mar 25 12:59:49 2015(r280577) @@ -330,6 +330,14 @@ static siena_parttbl_entry_t siena_partt {MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT1, 2, EFX_NVRAM_BOOTROM_CFG}, {MC_CMD_NVRAM_TYPE_PHY_PORT0, 1, EFX_NVRAM_PHY}, {MC_CMD_NVRAM_TYPE_PHY_PORT1, 2, EFX_NVRAM_PHY}, + {MC_CMD_NVRAM_TYPE_FPGA,1, EFX_NVRAM_FPGA}, + {MC_CMD_NVRAM_TYPE_FPGA,2, EFX_NVRAM_FPGA}, + {MC_CMD_NVRAM_TYPE_FPGA_BACKUP, 1, EFX_NVRAM_FPGA_BACKUP}, + {MC_CMD_NVRAM_TYPE_FPGA_BACKUP, 2, EFX_NVRAM_FPGA_BACKUP}, + {MC_CMD_NVRAM_TYPE_FC_FW, 1, EFX_NVRAM_FCFW}, + {MC_CMD_NVRAM_TYPE_FC_FW, 2, EFX_NVRAM_FCFW}, + {MC_CMD_NVRAM_TYPE_CPLD,1, EFX_NVRAM_CPLD}, + {MC_CMD_NVRAM_TYPE_CPLD,2, EFX_NVRAM_CPLD}, {0, 0, 0}, }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280585 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:06:37 2015 New Revision: 280585 URL: https://svnweb.freebsd.org/changeset/base/280585 Log: MFC: 279179 sfxge: DMA allocated memory is set to zeros because of BUS_DMA_ZERO flag It is not required to set it to zeros once again. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c == --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:05:33 2015 (r280584) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:06:37 2015 (r280585) @@ -1113,7 +1113,6 @@ sfxge_rx_qinit(struct sfxge_softc *sc, u /* Allocate and zero DMA space. */ if ((rc = sfxge_dma_alloc(sc, EFX_RXQ_SIZE(sc-rxq_entries), esmp)) != 0) return (rc); - (void)memset(esmp-esm_base, 0, EFX_RXQ_SIZE(sc-rxq_entries)); /* Allocate buffer table entries. */ sfxge_sram_buf_tbl_alloc(sc, EFX_RXQ_NBUFS(sc-rxq_entries), Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:05:33 2015 (r280584) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:06:37 2015 (r280585) @@ -1399,7 +1399,6 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u /* Allocate and zero DMA space for the descriptor ring. */ if ((rc = sfxge_dma_alloc(sc, EFX_TXQ_SIZE(sc-txq_entries), esmp)) != 0) return (rc); - (void)memset(esmp-esm_base, 0, EFX_TXQ_SIZE(sc-txq_entries)); /* Allocate buffer table entries. */ sfxge_sram_buf_tbl_alloc(sc, EFX_TXQ_NBUFS(sc-txq_entries), ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280606 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:50:38 2015 New Revision: 280606 URL: https://svnweb.freebsd.org/changeset/base/280606 Log: MFC: 280376 sfxge: remove obsolete Tx non-multi queue support Tx multi queue is added in FreeBSD 8.0. So, the changeset drops earlier versions support. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2081 Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 13:48:54 2015 (r280605) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 13:50:38 2015 (r280606) @@ -329,19 +329,8 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ether_ifattach(ifp, encp-enc_mac_addr); -#ifdef SFXGE_HAVE_MQ ifp-if_transmit = sfxge_if_transmit; ifp-if_qflush = sfxge_if_qflush; -#else - ifp-if_start = sfxge_if_start; - IFQ_SET_MAXLEN(ifp-if_snd, sc-txq_entries - 1); - ifp-if_snd.ifq_drv_maxlen = sc-txq_entries - 1; - IFQ_SET_READY(ifp-if_snd); - - snprintf(sc-tx_lock_name, sizeof(sc-tx_lock_name), -%s:tx, device_get_nameunit(sc-dev)); - mtx_init(sc-tx_lock, sc-tx_lock_name, NULL, MTX_DEF); -#endif if ((rc = sfxge_port_ifmedia_init(sc)) != 0) goto fail; Modified: stable/10/sys/dev/sfxge/sfxge.h == --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 13:48:54 2015 (r280605) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 13:50:38 2015 (r280606) @@ -66,12 +66,6 @@ #ifndef IFM_10G_KX4 #defineIFM_10G_KX4 IFM_10G_CX4 #endif -#if __FreeBSD_version = 800054 -/* Networking core is multiqueue aware. We can manage our own TX - * queues and use m_pkthdr.flowid. - */ -#defineSFXGE_HAVE_MQ -#endif #if (__FreeBSD_version = 800501 __FreeBSD_version 90) || \ __FreeBSD_version = 93 #defineSFXGE_HAVE_DESCRIBE_INTR @@ -242,11 +236,7 @@ struct sfxge_softc { struct sfxge_rxq*rxq[SFXGE_RX_SCALE_MAX]; unsigned intrx_indir_table[SFXGE_RX_SCALE_MAX]; -#ifdef SFXGE_HAVE_MQ struct sfxge_txq*txq[SFXGE_TXQ_NTYPES + SFXGE_RX_SCALE_MAX]; -#else - struct sfxge_txq*txq[SFXGE_TXQ_NTYPES]; -#endif struct ifmedia media; @@ -254,11 +244,6 @@ struct sfxge_softc { size_t rx_buffer_size; uma_zone_t rx_buffer_zone; -#ifndef SFXGE_HAVE_MQ - struct mtx tx_lock __aligned(CACHE_LINE_SIZE); - chartx_lock_name[SFXGE_LOCK_NAME_MAX]; -#endif - unsigned intevq_count; unsigned intrxq_count; unsigned inttxq_count; Modified: stable/10/sys/dev/sfxge/sfxge_rx.c == --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:48:54 2015 (r280605) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:50:38 2015 (r280606) @@ -326,14 +326,12 @@ sfxge_rx_deliver(struct sfxge_softc *sc, if (rx_desc-flags EFX_CKSUM_TCPUDP) csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; -#ifdef SFXGE_HAVE_MQ /* The hash covers a 4-tuple for TCP only */ if (rx_desc-flags EFX_PKT_TCP) { m-m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); m-m_flags |= M_FLOWID; } -#endif m-m_data += sc-rx_prefix_size; m-m_len = rx_desc-size - sc-rx_prefix_size; m-m_pkthdr.len = m-m_len; @@ -380,10 +378,9 @@ sfxge_lro_deliver(struct sfxge_lro_state memcpy(c_th + 1, c-th_last + 1, optlen); } -#ifdef SFXGE_HAVE_MQ m-m_pkthdr.flowid = c-conn_hash; m-m_flags |= M_FLOWID; -#endif + m-m_pkthdr.csum_flags = csum_flags; __sfxge_rx_deliver(sc, m); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:48:54 2015 (r280605) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:50:38 2015 (r280606) @@ -84,7 +84,6 @@ __FBSDID($FreeBSD$); #defineSFXGE_TXQ_BLOCK_LEVEL(_entries) \ (EFX_TXQ_LIMIT(_entries) - SFXGE_TSO_MAX_DESC) -#ifdef SFXGE_HAVE_MQ #define
svn commit: r280580 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 13:02:33 2015 New Revision: 280580 URL: https://svnweb.freebsd.org/changeset/base/280580 Log: MFC: 279175 sfxge: using bus_space_*_stream_* API for better portability Host-bus byte order translation is not requred. Submitted by: Artem V. Andreev Artem.Andreev at oktetlabs.ru Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h == --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:01:51 2015 (r280579) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:02:33 2015 (r280580) @@ -94,6 +94,15 @@ extern C { #defineISP2(x) (((x) ((x) - 1)) == 0) #endif +#if defined(__x86_64__) +#if !defined(bus_space_read_stream_8) +#definebus_space_read_stream_8(t, h, o) \ + bus_space_read_8((t), (h), (o)) +#definebus_space_write_stream_8(t, h, o, v) \ + bus_space_write_8((t), (h), (o), (v)) +#endif +#endif + #defineENOTACTIVE EINVAL /* Memory type to use on FreeBSD */ @@ -641,8 +650,9 @@ typedef struct efsys_bar_s { if (_lock) \ SFXGE_BAR_LOCK(_esbp); \ \ - (_edp)-ed_u32[0] = bus_space_read_4((_esbp)-esb_tag, \ - (_esbp)-esb_handle, (_offset));\ + (_edp)-ed_u32[0] = bus_space_read_stream_4(\ + (_esbp)-esb_tag, (_esbp)-esb_handle, \ + (_offset)); \ \ EFSYS_PROBE2(bar_readd, unsigned int, (_offset),\ uint32_t, (_edp)-ed_u32[0]); \ @@ -662,8 +672,9 @@ typedef struct efsys_bar_s { \ SFXGE_BAR_LOCK(_esbp); \ \ - (_eqp)-eq_u64[0] = bus_space_read_8((_esbp)-esb_tag, \ - (_esbp)-esb_handle, (_offset));\ + (_eqp)-eq_u64[0] = bus_space_read_stream_8(\ + (_esbp)-esb_tag, (_esbp)-esb_handle, \ + (_offset)); \ \ EFSYS_PROBE3(bar_readq, unsigned int, (_offset),\ uint32_t, (_eqp)-eq_u32[1],\ @@ -683,10 +694,12 @@ typedef struct efsys_bar_s { if (_lock) \ SFXGE_BAR_LOCK(_esbp); \ \ - (_eop)-eo_u64[0] = bus_space_read_8((_esbp)-esb_tag, \ - (_esbp)-esb_handle, (_offset));\ - (_eop)-eo_u64[1] = bus_space_read_8((_esbp)-esb_tag, \ - (_esbp)-esb_handle, (_offset+8)); \ + (_eop)-eo_u64[0] = bus_space_read_stream_8(\ + (_esbp)-esb_tag, (_esbp)-esb_handle, \ + (_offset)); \ + (_eop)-eo_u64[1] = bus_space_read_stream_8(\ + (_esbp)-esb_tag, (_esbp)-esb_handle, \ + (_offset) + 8); \ \ EFSYS_PROBE5(bar_reado, unsigned int, (_offset),\ uint32_t, (_eop)-eo_u32[3],\ @@ -709,10 +722,12 @@ typedef struct efsys_bar_s { \ SFXGE_BAR_LOCK(_esbp); \ \ - (_eqp)-eq_u32[0] = bus_space_read_4((_esbp)-esb_tag, \ - (_esbp)-esb_handle, (_offset));\ - (_eqp)-eq_u32[1] = bus_space_read_4((_esbp)-esb_tag, \ - (_esbp)-esb_handle, (_offset+4)); \ + (_eqp)-eq_u32[0] = bus_space_read_stream_4(\ + (_esbp)-esb_tag, (_esbp)-esb_handle, \ +
svn commit: r280591 - stable/10/sys/dev/sound/usb
Author: hselasky Date: Wed Mar 25 13:14:25 2015 New Revision: 280591 URL: https://svnweb.freebsd.org/changeset/base/280591 Log: MFC r280322 and r280429: The synchronisation value returned by the so-called feedback endpoint appears to be too inaccurate that it can be used to synchronize the playback data stream. If there is a recording endpoint associated with the playback endpoint, use that instead. That means if the isochronous OUT endpoint is asynchronus the USB audio driver will automatically start recording, if possible, to get exact information about the needed sample rate adjustments. In no recording endpoint is present, no rate adaption will be done. While at it fix an issue where the hardware buffer pointers don't get reset at the first device PCM trigger. Make some variables 32-bit to avoid problems with multithreading. Use the feedback value from the synchronization endpoint as fallback when there is no recording channel. PR: 198444 Modified: stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/dev/sound/usb/uaudio.h stable/10/sys/dev/sound/usb/uaudio_pcm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c == --- stable/10/sys/dev/sound/usb/uaudio.cWed Mar 25 13:13:32 2015 (r280590) +++ stable/10/sys/dev/sound/usb/uaudio.cWed Mar 25 13:14:25 2015 (r280591) @@ -218,26 +218,25 @@ struct uaudio_chan { uint32_t sample_rem; uint32_t sample_curr; uint32_t max_buf; + int32_t jitter_rem; + int32_t jitter_curr; + + int feedback_rate; uint32_t pcm_format[2]; uint16_t bytes_per_frame[2]; - uint8_t num_alt; - uint8_t cur_alt; - uint8_t set_alt; - uint8_t operation; + uint32_t intr_counter; + uint32_t running; + uint32_t num_alt; + uint32_t cur_alt; + uint32_t set_alt; + uint32_t operation; #defineCHAN_OP_NONE 0 #defineCHAN_OP_START 1 #defineCHAN_OP_STOP 2 #defineCHAN_OP_DRAIN 3 - - /* USB audio feedback endpoint state */ - struct { - uint16_t time; /* I/O interrupt count */ - int16_t constant; /* sample rate adjustment in Hz */ - int16_t remainder; /* current remainder */ - } feedback; }; #defineUMIDI_EMB_JACK_MAX 16 /* units */ @@ -1096,6 +1095,11 @@ uaudio_attach_sub(device_t dev, kobj_cla uaudio_mixer_register_sysctl(sc, dev); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + feedback_rate, CTLFLAG_RD, sc-sc_play_chan.feedback_rate, + 0, Feedback sample rate in Hz); + return (0); /* success */ detach: @@ -1294,7 +1298,6 @@ uaudio_configure_msg_sub(struct uaudio_s chan-frames_per_second = fps; chan-sample_rem = chan_alt-sample_rate % fps; chan-sample_curr = 0; - chan-frames_per_second = fps; /* compute required buffer size */ buf_size = (chan-bytes_per_frame[1] * frames); @@ -1974,7 +1977,7 @@ uaudio_chan_play_sync_callback(struct us { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint64_t sample_rate = ch-usb_alt[ch-cur_alt].sample_rate; + uint64_t sample_rate; uint8_t buf[4]; uint64_t temp; int len; @@ -2017,6 +2020,8 @@ uaudio_chan_play_sync_callback(struct us temp *= 125ULL; + sample_rate = ch-usb_alt[ch-cur_alt].sample_rate; + /* auto adjust */ while (temp (sample_rate - (sample_rate / 4))) temp *= 2; @@ -2024,35 +2029,17 @@ uaudio_chan_play_sync_callback(struct us while (temp (sample_rate + (sample_rate / 2))) temp /= 2; - /* -* Some USB audio devices only report a sample rate -* different from the nominal one when they want one -* more or less sample. Make sure we catch this case -* by pulling the sample rate offset slowly towards -* zero if the reported value is equal to the sample -* rate. -*/ - if (temp sample_rate) - ch-feedback.constant += 1; - else if (temp sample_rate) - ch-feedback.constant -= 1; - else if (ch-feedback.constant 0) - ch-feedback.constant--; - else if (ch-feedback.constant 0) - ch-feedback.constant++; - - DPRINTF(Comparing %d Hz :: %d Hz :: %d samples drift\n, - (int)temp, (int)sample_rate,
svn commit: r280597 - head/sys/cam/scsi
Author: hselasky Date: Wed Mar 25 13:28:13 2015 New Revision: 280597 URL: https://svnweb.freebsd.org/changeset/base/280597 Log: Add DA_Q_NO_RC16 quirk for USB mass storage device. PR: 198647 MFC after:1 week Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c == --- head/sys/cam/scsi/scsi_da.c Wed Mar 25 13:18:51 2015(r280596) +++ head/sys/cam/scsi/scsi_da.c Wed Mar 25 13:28:13 2015(r280597) @@ -1182,6 +1182,13 @@ static struct da_quirk_entry da_quirk_ta { T_DIRECT, SIP_MEDIA_REMOVABLE, Innostor, Innostor*, * }, /*quirks*/DA_Q_NO_RC16 }, + { + /* +* MX-ES USB Drive by Mach Xtreme +*/ + { T_DIRECT, SIP_MEDIA_REMOVABLE, MX, MXUB3SES*, *}, + /*quirks*/DA_Q_NO_RC16 + }, }; static disk_strategy_t dastrategy; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280604 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:47:48 2015 New Revision: 280604 URL: https://svnweb.freebsd.org/changeset/base/280604 Log: MFC: 280374 sfxge: assert either kernel or internal copy of interface flags ioctl to put interface down sets ifp-if_flags which holds the intended administratively defined state and calls driver callback to apply it. When everything is done, driver updates internal copy of interface flags sc-if_flags which holds the operational state. So, transmit from Rx path is possible when interface is intended to be administratively down in accordance with ifp-if_flags, but not applied yet and the operational state is up in accordance with sc-if_flags. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2075 Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:46:30 2015 (r280603) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:47:48 2015 (r280604) @@ -676,7 +676,16 @@ sfxge_if_transmit(struct ifnet *ifp, str sc = (struct sfxge_softc *)ifp-if_softc; - KASSERT(ifp-if_flags IFF_UP, (interface not up)); + /* +* Transmit may be called when interface is up from the kernel +* point of view, but not yet up (in progress) from the driver +* point of view. I.e. link aggregation bring up. +* Transmit may be called when interface is up from the driver +* point of view, but already down from the kernel point of +* view. I.e. Rx when interface shutdown is in progress. +*/ + KASSERT((ifp-if_flags IFF_UP) || (sc-if_flags IFF_UP), + (interface not up)); /* Pick the desired transmit queue. */ if (m-m_pkthdr.csum_flags (CSUM_DELAY_DATA | CSUM_TSO)) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280609 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 13:53:28 2015 New Revision: 280609 URL: https://svnweb.freebsd.org/changeset/base/280609 Log: MFC: 280379 sfxge: do not check MCDI status word This is a temporary workaround until we determine a reliable sequence of operations for detecting MC reboots. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2084 Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c == --- stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 13:52:31 2015 (r280608) +++ stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 13:53:28 2015 (r280609) @@ -213,6 +213,14 @@ static int efx_mcdi_poll_reboot( __inefx_nic_t *enp) { +#ifndef EFX_GRACEFUL_MC_REBOOT + /* +* This function is not being used properly. +* Until its callers are fixed, it should always return 0. +*/ + _NOTE(ARGUNUSED(enp)) + return (0); +#else efx_mcdi_iface_t *emip = (enp-en_u.siena.enu_mip); unsigned int rebootr; efx_dword_t dword; @@ -236,6 +244,7 @@ efx_mcdi_poll_reboot( return (EINTR); else return (EIO); +#endif } __checkReturn boolean_t ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280572 - head/share/man/man4
Author: brueffer Date: Wed Mar 25 12:14:34 2015 New Revision: 280572 URL: https://svnweb.freebsd.org/changeset/base/280572 Log: mdoc cleanup; fix spelling. Modified: head/share/man/man4/ixlv.4 Modified: head/share/man/man4/ixlv.4 == --- head/share/man/man4/ixlv.4 Wed Mar 25 11:53:52 2015(r280571) +++ head/share/man/man4/ixlv.4 Wed Mar 25 12:14:34 2015(r280572) @@ -31,7 +31,7 @@ .\ .\ $FreeBSD$ .\ -.Dd January 14, 2015 +.Dd March 25, 2015 .Dt IXLV 4 .Os .Sh NAME @@ -77,13 +77,13 @@ and/or TSO6, and finally LRO can be set For more information on configuring this device, see .Xr ifconfig 8 . .Pp -NOTE that The +.Em NOTE : +The .Nm Driver is only used by means of SRIOV, normally in a VM on a hosting server with the .Xr ixl 4 driver. -.Pp .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 @@ -92,10 +92,10 @@ prompt before booting the kernel or stor .Bl -tag -width indent .It Va hw.ixlv.ringsz Set the number of descriptors in the rings, note that this -changes BOTH the TX and RX rings, they cannot be set independly. +changes BOTH the TX and RX rings, they cannot be set independently. .It Va hw.ixlv.max_queues Set the number of queues (each a TX/RX pair) for the port, this -allows one to override the autocalculation if its set to 0. +allows one to override the autocalculation if it is set to 0. .It Va hw.ixlv.txbrsz Set the size of the buff ring used by the transmit side of the stack, we have found that it is necessary to have it quite large @@ -109,7 +109,6 @@ The RX interrupt rate value, set to 8K b .It Va hw.ixlv.tx_itr The TX interrupt rate value, set to 4K by default. .El -.Pp .Sh SUPPORT For general information and support, go to the Intel support website at: @@ -119,8 +118,8 @@ If an issue is identified with this driv email all the specific information related to the issue to .Aq free...@intel.com . .Sh SEE ALSO -.Xr ixl 4 , .Xr arp 4 , +.Xr ixl 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280574 - head/share/man/man4
Author: brueffer Date: Wed Mar 25 12:46:19 2015 New Revision: 280574 URL: https://svnweb.freebsd.org/changeset/base/280574 Log: mdoc cleanup; fix spelling; Xref ixlv.4 Modified: head/share/man/man4/ixl.4 Modified: head/share/man/man4/ixl.4 == --- head/share/man/man4/ixl.4 Wed Mar 25 12:45:29 2015(r280573) +++ head/share/man/man4/ixl.4 Wed Mar 25 12:46:19 2015(r280574) @@ -31,7 +31,7 @@ .\ .\ $FreeBSD$ .\ -.Dd January 14, 2015 +.Dd March 25, 2015 .Dt IXL 4 .Os .Sh NAME @@ -113,8 +113,6 @@ Intel DUAL RATE 1G/10G SFP+ LR (bailed) Note that X710/XL710 Based SFP+ adapters also support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. - -.Pp .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 @@ -125,10 +123,10 @@ prompt before booting the kernel or stor Allows one to enable/disable MSIX, thus forcing MSI instead. .It Va hw.ixl.ringsz Set the number of descriptors in the rings, note that this -changes BOTH the TX and RX rings, they cannot be set independly. +changes BOTH the TX and RX rings, they cannot be set independently. .It Va hw.ixl.max_queues Set the number of queues (each a TX/RX pair) for the port, this -allows one to override the autocalculation if its set to 0. +allows one to override the autocalculation if it is set to 0. .It Va hw.ixl.dynamic_rx_itr The dynamic RX interrupt control, set to 1 to enable. .It Va hw.ixl.dynamic_tx_itr @@ -138,27 +136,31 @@ The RX interrupt rate value, set to 8K b .It Va hw.ixl.tx_itr The TX interrupt rate value, set to 4K by default. .El -.Pp .Sh SYSCTL PROCEDURES .Bl -tag -width indent .It Va hw.ixl.fc -Allows one to set the flow control value. A value of 0 disables +Allows one to set the flow control value. +A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is TX pause. .It Va hw.ixl.advertise_speed Allows one to set advertised link speeds, this will then -cause a link renegotiation. With the appropriate adapter -this can cause a link at 10GB, 1GB, or 100MB. +cause a link renegotiation. +With the appropriate adapter +this can cause a link at 10GB, 1GB, or 100MB. .It Va hw.ixl.current_speed This is a display of the current setting. .It Va hw.ixl.fw_version This is a display of the Firmware version. +.El .Sh Interrupt Storms -It is important to note that 40G operation can generate high +It is important to note that 40G operation can generate high numbers of interrupts, often incorrectly being interpreted as -a storm condition in the kernel. It is suggested that this +a storm condition in the kernel. +It is suggested that this be resolved by setting: .Bl -tag -width indent .It Va hw.intr_storm_threshold: 0 +.El .Sh SUPPORT For general information and support, go to the Intel support website at: @@ -169,6 +171,7 @@ email all the specific information relat .Aq free...@intel.com . .Sh SEE ALSO .Xr arp 4 , +.Xr ixlv 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280593 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 13:15:47 2015 New Revision: 280593 URL: https://svnweb.freebsd.org/changeset/base/280593 Log: MFC: 279266 sfxge: correct limit for number of Rx queues Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_impl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_impl.h == --- stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 13:14:50 2015 (r280592) +++ stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 13:15:47 2015 (r280593) @@ -204,7 +204,7 @@ typedef struct efx_nic_ops_s { # define EFX_TXQ_LIMIT_TARGET 259 #endif #ifndef EFX_RXQ_LIMIT_TARGET -# define EFX_RXQ_LIMIT_TARGET 768 +# define EFX_RXQ_LIMIT_TARGET 512 #endif #ifndef EFX_TXQ_DC_SIZE #define EFX_TXQ_DC_SIZE 1 /* 16 descriptors */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280592 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:14:50 2015 New Revision: 280592 URL: https://svnweb.freebsd.org/changeset/base/280592 Log: MFC: 279231 sfxge: add put-list high watermark It is interesting to know how long put-list grows. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:14:25 2015 (r280591) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:14:50 2015 (r280592) @@ -214,6 +214,9 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * count++; } while (mbuf != NULL); + if (count stdp-std_put_hiwat) + stdp-std_put_hiwat = count; + /* Append the reversed put list to the get list. */ KASSERT(*get_tailp == NULL, (*get_tailp != NULL)); *stdp-std_getp = get_next; @@ -1484,6 +1487,10 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u SYSCTL_CHILDREN(txq_node), OID_AUTO, dpl_get_hiwat, CTLFLAG_RD | CTLFLAG_STATS, stdp-std_get_hiwat, 0, ); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc-dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + dpl_put_hiwat, CTLFLAG_RD | CTLFLAG_STATS, + stdp-std_put_hiwat, 0, ); #endif txq-type = type; Modified: stable/10/sys/dev/sfxge/sfxge_tx.h == --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:14:25 2015 (r280591) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:14:50 2015 (r280592) @@ -102,6 +102,8 @@ struct sfxge_tx_dpl { * in get list */ unsigned intstd_get_hiwat; /* Packets in get list * high watermark */ + unsigned intstd_put_hiwat; /* Packets in put list +* high watermark */ }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280600 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:42:37 2015 New Revision: 280600 URL: https://svnweb.freebsd.org/changeset/base/280600 Log: MFC: 280161 sfxge: move deferred packet list statistics to dedicated node It is done to structure sysctl and do not mix with Tx queue statistics to be added. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:41:26 2015 (r280599) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:42:37 2015 (r280600) @@ -1379,11 +1379,13 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u enum sfxge_txq_type type, unsigned int evq_index) { char name[16]; + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc-dev); struct sysctl_oid *txq_node; struct sfxge_txq *txq; struct sfxge_evq *evq; #ifdef SFXGE_HAVE_MQ struct sfxge_tx_dpl *stdp; + struct sysctl_oid *dpl_node; #endif efsys_mem_t *esmp; unsigned int nmaps; @@ -1432,10 +1434,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u } snprintf(name, sizeof(name), %u, txq_index); - txq_node = SYSCTL_ADD_NODE( - device_get_sysctl_ctx(sc-dev), - SYSCTL_CHILDREN(sc-txqs_node), - OID_AUTO, name, CTLFLAG_RD, NULL, ); + txq_node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(sc-txqs_node), + OID_AUTO, name, CTLFLAG_RD, NULL, ); if (txq_node == NULL) { rc = ENOMEM; goto fail_txq_node; @@ -1475,21 +1475,25 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u SFXGE_TXQ_LOCK_INIT(txq, device_get_nameunit(sc-dev), txq_index); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc-dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - dpl_get_count, CTLFLAG_RD | CTLFLAG_STATS, + dpl_node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(txq_node), OID_AUTO, + dpl, CTLFLAG_RD, NULL, + Deferred packet list statistics); + if (dpl_node == NULL) { + rc = ENOMEM; + goto fail_dpl_node; + } + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + 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, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + 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, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + get_hiwat, CTLFLAG_RD | CTLFLAG_STATS, stdp-std_get_hiwat, 0, ); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc-dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - dpl_put_hiwat, CTLFLAG_RD | CTLFLAG_STATS, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + put_hiwat, CTLFLAG_RD | CTLFLAG_STATS, stdp-std_put_hiwat, 0, ); #endif @@ -1500,6 +1504,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); +fail_dpl_node: fail_tx_dpl_put_max: fail_tx_dpl_get_max: fail3: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280601 - in stable/10/sys: dev/sfxge modules/sfxge
Author: arybchik Date: Wed Mar 25 13:44:01 2015 New Revision: 280601 URL: https://svnweb.freebsd.org/changeset/base/280601 Log: MFC: 280162 sfxge: adding version info to device description The information is required for NIC update and config tools. Submitted by: Artem V. Andreev Artem.Andreev at oktetlabs.ru Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Added: stable/10/sys/dev/sfxge/sfxge_version.h - copied unchanged from r280162, head/sys/dev/sfxge/sfxge_version.h Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/modules/sfxge/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 13:42:37 2015 (r280600) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 13:44:01 2015 (r280601) @@ -56,6 +56,7 @@ __FBSDID($FreeBSD$); #include sfxge.h #include sfxge_rx.h +#include sfxge_version.h #defineSFXGE_CAP (IFCAP_VLAN_MTU | \ IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \ @@ -472,6 +473,12 @@ sfxge_create(struct sfxge_softc *sc) if ((error = efx_nic_probe(enp)) != 0) goto fail5; + SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, version, CTLFLAG_RD, + SFXGE_VERSION_STRING, 0, + Driver version); + /* Initialize the NVRAM. */ if ((error = efx_nvram_init(enp)) != 0) goto fail6; Copied: stable/10/sys/dev/sfxge/sfxge_version.h (from r280162, head/sys/dev/sfxge/sfxge_version.h) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/sfxge/sfxge_version.h Wed Mar 25 13:44:01 2015 (r280601, copy of r280162, head/sys/dev/sfxge/sfxge_version.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2015 Solarflare Communications, Inc. + * All rights reserved. + * + * This software was developed in part by OKTET Labs under contract for + * Solarflare Communications, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SFXGE_VERSION_H +#define_SFXGE_VERSION_H + +#defineSFXGE_VERSION_STRINGv3.3.4.6363 + +#endif /* _SFXGE_DRIVER_VERSION_H */ Modified: stable/10/sys/modules/sfxge/Makefile == --- stable/10/sys/modules/sfxge/MakefileWed Mar 25 13:42:37 2015 (r280600) +++ stable/10/sys/modules/sfxge/MakefileWed Mar 25 13:44:01 2015 (r280601) @@ -11,7 +11,7 @@ SRCS+=opt_inet.h opt_sched.h SRCS+= sfxge.c sfxge_dma.c sfxge_ev.c SRCS+= sfxge_intr.c sfxge_mcdi.c SRCS+= sfxge_port.c sfxge_rx.c sfxge_tx.c -SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h +SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h sfxge_version.h .PATH: ${.CURDIR}/../../dev/sfxge/common SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280576 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 12:59:01 2015 New Revision: 280576 URL: https://svnweb.freebsd.org/changeset/base/280576 Log: MFC: 279172 sfxge: add new identities to Siena static config Submitted by: Andrew Jackson ajackson at solarflare.com Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/siena_flash.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/siena_flash.h == --- stable/10/sys/dev/sfxge/common/siena_flash.hWed Mar 25 12:57:43 2015(r280575) +++ stable/10/sys/dev/sfxge/common/siena_flash.hWed Mar 25 12:59:01 2015(r280576) @@ -81,7 +81,9 @@ typedef struct siena_mc_static_config_hd efx_byte_t green_mode_valid; /* Whether cal holds a valid value */ efx_word_t mac_addr_count; efx_word_t mac_addr_stride; - efx_dword_t reserved2[2]; /* (write as zero) */ + efx_word_t calibrated_vref; + efx_word_t adc_vref; + efx_dword_t reserved2[1]; /* (write as zero) */ efx_dword_t num_dbi_items; struct { efx_word_t addr; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280595 - stable/8/sys/dev/sound/usb
Author: hselasky Date: Wed Mar 25 13:18:36 2015 New Revision: 280595 URL: https://svnweb.freebsd.org/changeset/base/280595 Log: MFC r280322 and r280429: The synchronisation value returned by the so-called feedback endpoint appears to be too inaccurate that it can be used to synchronize the playback data stream. If there is a recording endpoint associated with the playback endpoint, use that instead. That means if the isochronous OUT endpoint is asynchronus the USB audio driver will automatically start recording, if possible, to get exact information about the needed sample rate adjustments. In no recording endpoint is present, no rate adaption will be done. While at it fix an issue where the hardware buffer pointers don't get reset at the first device PCM trigger. Make some variables 32-bit to avoid problems with multithreading. Use the feedback value from the synchronization endpoint as fallback when there is no recording channel. PR: 198444 Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/sound/usb/uaudio.h stable/8/sys/dev/sound/usb/uaudio_pcm.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c == --- stable/8/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:16:39 2015 (r280594) +++ stable/8/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:18:36 2015 (r280595) @@ -218,26 +218,25 @@ struct uaudio_chan { uint32_t sample_rem; uint32_t sample_curr; uint32_t max_buf; + int32_t jitter_rem; + int32_t jitter_curr; + + int feedback_rate; uint32_t pcm_format[2]; uint16_t bytes_per_frame[2]; - uint8_t num_alt; - uint8_t cur_alt; - uint8_t set_alt; - uint8_t operation; + uint32_t intr_counter; + uint32_t running; + uint32_t num_alt; + uint32_t cur_alt; + uint32_t set_alt; + uint32_t operation; #defineCHAN_OP_NONE 0 #defineCHAN_OP_START 1 #defineCHAN_OP_STOP 2 #defineCHAN_OP_DRAIN 3 - - /* USB audio feedback endpoint state */ - struct { - uint16_t time; /* I/O interrupt count */ - int16_t constant; /* sample rate adjustment in Hz */ - int16_t remainder; /* current remainder */ - } feedback; }; #defineUMIDI_EMB_JACK_MAX 16 /* units */ @@ -1096,6 +1095,11 @@ uaudio_attach_sub(device_t dev, kobj_cla uaudio_mixer_register_sysctl(sc, dev); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + feedback_rate, CTLFLAG_RD, sc-sc_play_chan.feedback_rate, + 0, Feedback sample rate in Hz); + return (0); /* success */ detach: @@ -1294,7 +1298,6 @@ uaudio_configure_msg_sub(struct uaudio_s chan-frames_per_second = fps; chan-sample_rem = chan_alt-sample_rate % fps; chan-sample_curr = 0; - chan-frames_per_second = fps; /* compute required buffer size */ buf_size = (chan-bytes_per_frame[1] * frames); @@ -1974,7 +1977,7 @@ uaudio_chan_play_sync_callback(struct us { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint64_t sample_rate = ch-usb_alt[ch-cur_alt].sample_rate; + uint64_t sample_rate; uint8_t buf[4]; uint64_t temp; int len; @@ -2017,6 +2020,8 @@ uaudio_chan_play_sync_callback(struct us temp *= 125ULL; + sample_rate = ch-usb_alt[ch-cur_alt].sample_rate; + /* auto adjust */ while (temp (sample_rate - (sample_rate / 4))) temp *= 2; @@ -2024,35 +2029,17 @@ uaudio_chan_play_sync_callback(struct us while (temp (sample_rate + (sample_rate / 2))) temp /= 2; - /* -* Some USB audio devices only report a sample rate -* different from the nominal one when they want one -* more or less sample. Make sure we catch this case -* by pulling the sample rate offset slowly towards -* zero if the reported value is equal to the sample -* rate. -*/ - if (temp sample_rate) - ch-feedback.constant += 1; - else if (temp sample_rate) - ch-feedback.constant -= 1; - else if (ch-feedback.constant 0) - ch-feedback.constant--; - else if (ch-feedback.constant 0) - ch-feedback.constant++; - -
svn commit: r280613 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:57:54 2015 New Revision: 280613 URL: https://svnweb.freebsd.org/changeset/base/280613 Log: MFC: 280433 sfxge: cleanup: fix index variable type to match upper boundary type Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:56:42 2015 (r280612) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:57:54 2015 (r280613) @@ -667,7 +667,7 @@ void sfxge_if_qflush(struct ifnet *ifp) { struct sfxge_softc *sc; - int i; + unsigned int i; sc = ifp-if_softc; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280578 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 13:01:10 2015 New Revision: 280578 URL: https://svnweb.freebsd.org/changeset/base/280578 Log: MFC: 279174 sfxge: add missing Siena sensors to common code Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/siena_mon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/siena_mon.c == --- stable/10/sys/dev/sfxge/common/siena_mon.c Wed Mar 25 12:59:49 2015 (r280577) +++ stable/10/sys/dev/sfxge/common/siena_mon.c Wed Mar 25 13:01:10 2015 (r280578) @@ -70,6 +70,21 @@ static __cs uint16_t __siena_mon_port0_m EFX_MON_STAT_2_5V, /* MC_CMD_SENSOR_IN_2V5 */ EFX_MON_STAT_3_3V, /* MC_CMD_SENSOR_IN_3V3 */ EFX_MON_STAT_12V, /* MC_CMD_SENSOR_IN_12V0 */ + EFX_MON_STAT_1_2VA, /* MC_CMD_SENSOR_IN_1V2A */ + EFX_MON_STAT_VREF, /* MC_CMD_SENSOR_IN_VREF */ + EFX_MON_STAT_VAOE, /* MC_CMD_SENSOR_OUT_VAOE */ + EFX_MON_STAT_AOE_TEMP, /* MC_CMD_SENSOR_AOE_TEMP */ + EFX_MON_STAT_PSU_AOE_TEMP, /* MC_CMD_SENSOR_PSU_AOE_TEMP */ + EFX_MON_STAT_PSU_TEMP, /* MC_CMD_SENSOR_PSE_TEMP */ + EFX_MON_STAT_FAN0, /* MC_CMD_SENSOR_FAN_0 */ + EFX_MON_STAT_FAN1, /* MC_CMD_SENSOR_FAN_1 */ + EFX_MON_STAT_FAN2, /* MC_CMD_SENSOR_FAN_2 */ + EFX_MON_STAT_FAN3, /* MC_CMD_SENSOR_FAN_3 */ + EFX_MON_STAT_FAN4, /* MC_CMD_SENSOR_FAN_4 */ + EFX_MON_STAT_VAOE_IN, /* MC_CMD_SENSOR_IN_VAOE */ + EFX_MON_STAT_IAOE, /* MC_CMD_SENSOR_OUT_IAOE */ + EFX_MON_STAT_IAOE_IN, /* MC_CMD_SENSOR_IN_IAOE */ + }; static __cs uint16_t __siena_mon_port1_map[] = { @@ -86,6 +101,21 @@ static __cs uint16_t __siena_mon_port1_m EFX_MON_STAT_2_5V, /* MC_CMD_SENSOR_IN_2V5 */ EFX_MON_STAT_3_3V, /* MC_CMD_SENSOR_IN_3V3 */ EFX_MON_STAT_12V, /* MC_CMD_SENSOR_IN_12V0 */ + EFX_MON_STAT_1_2VA, /* MC_CMD_SENSOR_IN_1V2A */ + EFX_MON_STAT_VREF, /* MC_CMD_SENSOR_IN_VREF */ + EFX_MON_STAT_VAOE, /* MC_CMD_SENSOR_OUT_VAOE */ + EFX_MON_STAT_AOE_TEMP, /* MC_CMD_SENSOR_AOE_TEMP */ + EFX_MON_STAT_PSU_AOE_TEMP, /* MC_CMD_SENSOR_PSU_AOE_TEMP */ + EFX_MON_STAT_PSU_TEMP, /* MC_CMD_SENSOR_PSE_TEMP */ + EFX_MON_STAT_FAN0, /* MC_CMD_SENSOR_FAN_0 */ + EFX_MON_STAT_FAN1, /* MC_CMD_SENSOR_FAN_1 */ + EFX_MON_STAT_FAN2, /* MC_CMD_SENSOR_FAN_2 */ + EFX_MON_STAT_FAN3, /* MC_CMD_SENSOR_FAN_3 */ + EFX_MON_STAT_FAN4, /* MC_CMD_SENSOR_FAN_4 */ + EFX_MON_STAT_VAOE_IN, /* MC_CMD_SENSOR_IN_VAOE */ + EFX_MON_STAT_IAOE, /* MC_CMD_SENSOR_OUT_IAOE */ + EFX_MON_STAT_IAOE_IN, /* MC_CMD_SENSOR_IN_IAOE */ + }; #defineSIENA_STATIC_SENSOR_ASSERT(_field) \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280589 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 13:12:15 2015 New Revision: 280589 URL: https://svnweb.freebsd.org/changeset/base/280589 Log: MFC: 279183 sfxge: add common code support for changing TX queue pace To delay packets from a particular TX queue by a particular time, write a value into the TX Pace table s.t. pace time = TX Pace Clock Period * (2 ^ pace value) - the TX pace clock is 1/13 of the system clock, so its period should be 104 or 52 ns depending on whether turbo mode is active. EFX_TX_PACE_CLOCK_BASE added by me. Submitted by: Mark Spender mspender at solarflare.com Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_regs.h stable/10/sys/dev/sfxge/common/efx_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h == --- stable/10/sys/dev/sfxge/common/efx.hWed Mar 25 13:11:19 2015 (r280588) +++ stable/10/sys/dev/sfxge/common/efx.hWed Mar 25 13:12:15 2015 (r280589) @@ -1736,6 +1736,11 @@ efx_tx_qpost( __inunsigned int completed, __inout unsigned int *addedp); +extern __checkReturn int +efx_tx_qpace( + __inefx_txq_t *etp, + __inunsigned int ns); + extern void efx_tx_qpush( __inefx_txq_t *etp, Modified: stable/10/sys/dev/sfxge/common/efx_regs.h == --- stable/10/sys/dev/sfxge/common/efx_regs.h Wed Mar 25 13:11:19 2015 (r280588) +++ stable/10/sys/dev/sfxge/common/efx_regs.h Wed Mar 25 13:12:15 2015 (r280589) @@ -34,6 +34,13 @@ extern C { #endif +/** + * + * Falcon/Siena registers and descriptors + * + ** + */ + /* * FR_AB_EE_VPD_CFG0_REG_SF(128bit): * SPI/VPD configuration register 0 @@ -3838,6 +3845,18 @@ extern C { #defineFSF_AZ_DRIVER_EV_RX_DESCQ_ID_WIDTH 12 + +/** + * + * Falcon non-volatile configuration + * + ** + */ + + +#define FR_AZ_TX_PACE_TBL_OFST FR_BZ_TX_PACE_TBL_OFST + + #ifdef __cplusplus } #endif Modified: stable/10/sys/dev/sfxge/common/efx_tx.c == --- stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 13:11:19 2015 (r280588) +++ stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 13:12:15 2015 (r280589) @@ -224,6 +224,53 @@ efx_tx_qpush( etp-et_index, dword, B_FALSE); } +#defineEFX_MAX_PACE_VALUE 20 +#defineEFX_TX_PACE_CLOCK_BASE 104 + + __checkReturn int +efx_tx_qpace( + __inefx_txq_t *etp, + __inunsigned int ns) +{ + efx_nic_t *enp = etp-et_enp; + efx_nic_cfg_t *encp = (enp-en_nic_cfg); + efx_oword_t oword; + unsigned int pace_val; + unsigned int timer_period; + int rc; + + EFSYS_ASSERT3U(etp-et_magic, ==, EFX_TXQ_MAGIC); + + if (ns == 0) { + pace_val = 0; + } else { + /* +* The pace_val to write into the table is s.t +* ns = timer_period * (2 ^ pace_val) +*/ + timer_period = EFX_TX_PACE_CLOCK_BASE / encp-enc_clk_mult; + for (pace_val = 1; pace_val = EFX_MAX_PACE_VALUE; pace_val++) { + if ((timer_period pace_val) = ns) + break; + } + } + if (pace_val EFX_MAX_PACE_VALUE) { + rc = EINVAL; + goto fail1; + } + + /* Update the pacing table */ + EFX_POPULATE_OWORD_1(oword, FRF_AZ_TX_PACE, pace_val); + EFX_BAR_TBL_WRITEO(enp, FR_AZ_TX_PACE_TBL, etp-et_index, oword); + + return (0); + +fail1: + EFSYS_PROBE1(fail1, int, rc); + + return (rc); +} + void efx_tx_qflush( __inefx_txq_t *etp) @@ -234,6 +281,8 @@ efx_tx_qflush( EFSYS_ASSERT3U(etp-et_magic, ==, EFX_TXQ_MAGIC); + efx_tx_qpace(etp, 0); + label = etp-et_index; /* Flush the queue */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280602 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:45:20 2015 New Revision: 280602 URL: https://svnweb.freebsd.org/changeset/base/280602 Log: MFC: 280163 sfxge: prefetch txq-common if TxQ is started only Transmit may be called when TxQ is not started yet (i.e. txq-common is invalid). TxQ state is checked below when mbuf is processed and dropped if TxQ is not started. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:44:01 2015 (r280601) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:45:20 2015 (r280602) @@ -423,8 +423,10 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx stdp = txq-dpl; pushed = txq-added; - prefetch_read_many(sc-enp); - prefetch_read_many(txq-common); + if (__predict_true(txq-init_state == SFXGE_TXQ_STARTED)) { + prefetch_read_many(sc-enp); + prefetch_read_many(txq-common); + } mbuf = stdp-std_get; count = stdp-std_get_count; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280608 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 13:52:31 2015 New Revision: 280608 URL: https://svnweb.freebsd.org/changeset/base/280608 Log: MFC: 280378 sfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64 bus_space_*_8() are not always macros, so it is not correct to use #ifndef. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2083 Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h == --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:51:39 2015 (r280607) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:52:31 2015 (r280608) @@ -94,13 +94,20 @@ extern C { #defineISP2(x) (((x) ((x) - 1)) == 0) #endif -#if defined(__x86_64__) +#if defined(__x86_64__) __FreeBSD_version = 100 + +#defineSFXGE_USE_BUS_SPACE_8 1 + #if !defined(bus_space_read_stream_8) + #definebus_space_read_stream_8(t, h, o) \ bus_space_read_8((t), (h), (o)) + #definebus_space_write_stream_8(t, h, o, v) \ bus_space_write_8((t), (h), (o), (v)) + #endif + #endif #defineENOTACTIVE EINVAL @@ -663,7 +670,7 @@ typedef struct efsys_bar_s { _NOTE(CONSTANTCONDITION)\ } while (B_FALSE) -#if defined(__x86_64__) +#if defined(SFXGE_USE_BUS_SPACE_8) #defineEFSYS_BAR_READQ(_esbp, _offset, _eqp) \ do {\ _NOTE(CONSTANTCONDITION)\ @@ -804,7 +811,7 @@ typedef struct efsys_bar_s { _NOTE(CONSTANTCONDITION)\ } while (B_FALSE) -#if defined(__x86_64__) +#if defined(SFXGE_USE_BUS_SPACE_8) #defineEFSYS_BAR_WRITEQ(_esbp, _offset, _eqp) \ do {\ _NOTE(CONSTANTCONDITION)\ @@ -873,7 +880,7 @@ typedef struct efsys_bar_s { } while (B_FALSE) #endif -#if defined(__x86_64__) +#if defined(SFXGE_USE_BUS_SPACE_8) #defineEFSYS_BAR_WRITEO(_esbp, _offset, _eop, _lock) \ do {\ _NOTE(CONSTANTCONDITION)\ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280607 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:51:39 2015 New Revision: 280607 URL: https://svnweb.freebsd.org/changeset/base/280607 Log: MFC: 280377 sfxge: add statistics for each Tx queue Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2082 Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:50:38 2015 (r280606) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:51:39 2015 (r280607) @@ -109,6 +109,26 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_p Maximum number of any packets in deferred packet put-list); +static const struct { + const char *name; + size_t offset; +} sfxge_tx_stats[] = { +#defineSFXGE_TX_STAT(name, member) \ + { #name, offsetof(struct sfxge_txq, member) } + SFXGE_TX_STAT(tso_bursts, tso_bursts), + SFXGE_TX_STAT(tso_packets, tso_packets), + SFXGE_TX_STAT(tso_long_headers, tso_long_headers), + SFXGE_TX_STAT(tso_pdrop_too_many, tso_pdrop_too_many), + SFXGE_TX_STAT(tso_pdrop_no_rsrc, tso_pdrop_no_rsrc), + SFXGE_TX_STAT(tx_collapses, collapses), + SFXGE_TX_STAT(tx_drops, 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), +}; + + /* Forward declarations. */ static void sfxge_tx_qdpl_service(struct sfxge_txq *txq); static void sfxge_tx_qlist_post(struct sfxge_txq *txq); @@ -1258,6 +1278,30 @@ fail: return (rc); } +static int +sfxge_txq_stat_init(struct sfxge_txq *txq, struct sysctl_oid *txq_node) +{ + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(txq-sc-dev); + struct sysctl_oid *stat_node; + unsigned int id; + + stat_node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(txq_node), OID_AUTO, + stats, CTLFLAG_RD, NULL, + Tx queue statistics); + if (stat_node == NULL) + return (ENOMEM); + + for (id = 0; id nitems(sfxge_tx_stats); id++) { + SYSCTL_ADD_ULONG( + ctx, SYSCTL_CHILDREN(stat_node), OID_AUTO, + sfxge_tx_stats[id].name, CTLFLAG_RD | CTLFLAG_STATS, + (unsigned long *)((caddr_t)txq + sfxge_tx_stats[id].offset), + ); + } + + return (0); +} + /** * Destroy a transmit queue. */ @@ -1411,6 +1455,10 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u put_hiwat, CTLFLAG_RD | CTLFLAG_STATS, stdp-std_put_hiwat, 0, ); + rc = sfxge_txq_stat_init(txq, txq_node); + if (rc != 0) + goto fail_txq_stat_init; + txq-type = type; txq-evq_index = evq_index; txq-txq_index = txq_index; @@ -1418,6 +1466,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); +fail_txq_stat_init: fail_dpl_node: fail_tx_dpl_put_max: fail_tx_dpl_get_max: @@ -1436,25 +1485,6 @@ fail: return (rc); } -static const struct { - const char *name; - size_t offset; -} sfxge_tx_stats[] = { -#defineSFXGE_TX_STAT(name, member) \ - { #name, offsetof(struct sfxge_txq, member) } - SFXGE_TX_STAT(tso_bursts, tso_bursts), - SFXGE_TX_STAT(tso_packets, tso_packets), - SFXGE_TX_STAT(tso_long_headers, tso_long_headers), - SFXGE_TX_STAT(tso_pdrop_too_many, tso_pdrop_too_many), - SFXGE_TX_STAT(tso_pdrop_no_rsrc, tso_pdrop_no_rsrc), - SFXGE_TX_STAT(tx_collapses, collapses), - SFXGE_TX_STAT(tx_drops, 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 sfxge_tx_stat_handler(SYSCTL_HANDLER_ARGS) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280573 - head/share/man/man4
Author: brueffer Date: Wed Mar 25 12:45:29 2015 New Revision: 280573 URL: https://svnweb.freebsd.org/changeset/base/280573 Log: Fix a typo and EOL whitespace missed in the previous commit. Modified: head/share/man/man4/ixlv.4 Modified: head/share/man/man4/ixlv.4 == --- head/share/man/man4/ixlv.4 Wed Mar 25 12:14:34 2015(r280572) +++ head/share/man/man4/ixlv.4 Wed Mar 25 12:45:29 2015(r280573) @@ -78,12 +78,12 @@ For more information on configuring this .Xr ifconfig 8 . .Pp .Em NOTE : -The +The .Nm -Driver is only used by means of SRIOV, normally in a VM on a +driver is only used by means of SRIOV, normally in a VM on a hosting server with the .Xr ixl 4 -driver. +driver. .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280584 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Wed Mar 25 13:05:33 2015 New Revision: 280584 URL: https://svnweb.freebsd.org/changeset/base/280584 Log: MFC: 279178 sfxge: do no allow EFSYS_MEM_ALLOC sleep It solves locking problem when EFSYS_MEM_ALLOC is called in the context holding a mutex (not allowed to sleep). E.g. on interface bring up or multicast addresses addition. Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h == --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:05:17 2015 (r280583) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:05:33 2015 (r280584) @@ -941,7 +941,11 @@ typedefclock_t efsys_timestamp_t; #defineEFSYS_KMEM_ALLOC(_esip, _size, _p) \ do {\ (_esip) = (_esip); \ - (_p) = malloc((_size), M_SFXGE, M_WAITOK|M_ZERO); \ + /* \ +* The macro is used in non-sleepable contexts, for \ +* example, holding a mutex.\ +*/ \ + (_p) = malloc((_size), M_SFXGE, M_NOWAIT|M_ZERO); \ _NOTE(CONSTANTCONDITION)\ } while (B_FALSE) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280583 - stable/9/sys/kern
Author: hselasky Date: Wed Mar 25 13:05:17 2015 New Revision: 280583 URL: https://svnweb.freebsd.org/changeset/base/280583 Log: MFC r280345: Fix for out of order device destruction notifications when using the delist_dev() function. In addition to this change: - add a proper description of this function - add a proper witness assert inside this function - switch a nearby line to use the cdp pointer instead of cdev2priv() Modified: stable/9/sys/kern/kern_conf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_conf.c == --- stable/9/sys/kern/kern_conf.c Wed Mar 25 13:04:28 2015 (r280582) +++ stable/9/sys/kern/kern_conf.c Wed Mar 25 13:05:17 2015 (r280583) @@ -1088,9 +1088,12 @@ destroy_devl(struct cdev *dev) } dev_unlock(); - notify_destroy(dev); + if ((cdp-cdp_flags CDP_UNREF_DTR) == 0) { + /* avoid out of order notify events */ + notify_destroy(dev); + } mtx_lock(cdevpriv_mtx); - while ((p = LIST_FIRST(cdev2priv(dev)-cdp_fdpriv)) != NULL) { + while ((p = LIST_FIRST(cdp-cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(cdevpriv_mtx); } @@ -1136,12 +1139,25 @@ delist_dev_locked(struct cdev *dev) devfs_destroy(dev); LIST_FOREACH(child, dev-si_children, si_siblings) delist_dev_locked(child); + dev_unlock(); + /* ensure the destroy event is queued in order */ + notify_destroy(dev); + dev_lock(); } +/* + * This function will delist a character device and its children from + * the directory listing and create a destroy event without waiting + * for all character device references to go away. At some later point + * destroy_dev() must be called to complete the character device + * destruction. After calling this function the character device name + * can instantly be re-used. + */ void delist_dev(struct cdev *dev) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, delist_dev); dev_lock(); delist_dev_locked(dev); dev_unlock(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280590 - stable/10/sys/dev/sfxge
Author: arybchik Date: Wed Mar 25 13:13:32 2015 New Revision: 280590 URL: https://svnweb.freebsd.org/changeset/base/280590 Log: MFC: 279230 sfxge: use goto to cleanup to avoid duplicate cleanup code Sponsored by: Solarflare Communications, Inc. Approved by:gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c == --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:12:15 2015 (r280589) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:13:32 2015 (r280590) @@ -137,7 +137,7 @@ sfxge_dma_alloc(struct sfxge_softc *sc, MIN(0x3FFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, NULL, NULL, esmp-esm_tag) != 0) { device_printf(sc-dev, Couldn't allocate txq DMA tag\n); - return (ENOMEM); + goto fail_tag_create; } /* Allocate kernel memory. */ @@ -145,17 +145,14 @@ sfxge_dma_alloc(struct sfxge_softc *sc, BUS_DMA_WAITOK | BUS_DMA_COHERENT | BUS_DMA_ZERO, esmp-esm_map) != 0) { device_printf(sc-dev, Couldn't allocate DMA memory\n); - bus_dma_tag_destroy(esmp-esm_tag); - return (ENOMEM); + goto fail_alloc; } /* Load map into device memory. */ 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, vaddr, esmp-esm_map); - bus_dma_tag_destroy(esmp-esm_tag); - return (ENOMEM); + goto fail_load; } /* @@ -163,15 +160,20 @@ sfxge_dma_alloc(struct sfxge_softc *sc, * and will have set esm_addr to 0 if something went * wrong. */ - if (esmp-esm_addr == 0) { - bus_dmamem_free(esmp-esm_tag, vaddr, esmp-esm_map); - bus_dma_tag_destroy(esmp-esm_tag); - return (ENOMEM); - } + if (esmp-esm_addr == 0) + goto fail_load_check; esmp-esm_base = vaddr; return (0); + +fail_load_check: +fail_load: + bus_dmamem_free(esmp-esm_tag, vaddr, esmp-esm_map); +fail_alloc: + bus_dma_tag_destroy(esmp-esm_tag); +fail_tag_create: + return (ENOMEM); } void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280611 - stable/10/sys/modules/sfxge
Author: arybchik Date: Wed Mar 25 13:55:36 2015 New Revision: 280611 URL: https://svnweb.freebsd.org/changeset/base/280611 Log: MFC: 280431 sfxge: cleanup: remove trailing whitespaces Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/modules/sfxge/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/sfxge/Makefile == --- stable/10/sys/modules/sfxge/MakefileWed Mar 25 13:54:28 2015 (r280610) +++ stable/10/sys/modules/sfxge/MakefileWed Mar 25 13:55:36 2015 (r280611) @@ -14,7 +14,7 @@ SRCS+=sfxge_port.c sfxge_rx.c sfxge_tx. SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h sfxge_version.h .PATH: ${.CURDIR}/../../dev/sfxge/common -SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c +SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c SRCS+= efx_nvram.c efx_phy.c efx_port.c efx_rx.c efx_sram.c efx_tx.c SRCS+= efx_vpd.c efx_wol.c SRCS+= efsys.h @@ -22,7 +22,7 @@ SRCS+=efx.h efx_impl.h efx_mcdi.h efx_r SRCS+= efx_regs_mcdi.h efx_regs_pci.h efx_types.h SRCS+= siena_mac.c siena_nic.c siena_nvram.c siena_phy.c -SRCS+= siena_sram.c siena_vpd.c +SRCS+= siena_sram.c siena_vpd.c SRCS+= siena_flash.h siena_impl.h DEBUG_FLAGS= -DDEBUG=1 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280621 - in head/sys: i386/conf sparc64/conf
Author: jhb Date: Wed Mar 25 15:51:41 2015 New Revision: 280621 URL: https://svnweb.freebsd.org/changeset/base/280621 Log: Apply r276208 to non-amd64 NOTES files as well to fix tinderbox builds run under a system using vt(4) instead of syscons(4): Use compiled in default keymaps which are available both in syscons and vt. Modified: head/sys/i386/conf/NOTES head/sys/sparc64/conf/NOTES Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESWed Mar 25 14:36:17 2015(r280620) +++ head/sys/i386/conf/NOTESWed Mar 25 15:51:41 2015(r280621) @@ -433,7 +433,7 @@ hint.atkbd.0.irq=1 # Options for atkbd: optionsATKBD_DFLT_KEYMAP # specify the built-in keymap -makeoptionsATKBD_DFLT_KEYMAP=jp.106 +makeoptionsATKBD_DFLT_KEYMAP=fr.dvorak # `flags' for atkbd: # 0x01Force detection of keyboard, else we always assume a keyboard Modified: head/sys/sparc64/conf/NOTES == --- head/sys/sparc64/conf/NOTES Wed Mar 25 14:36:17 2015(r280620) +++ head/sys/sparc64/conf/NOTES Wed Mar 25 15:51:41 2015(r280621) @@ -67,7 +67,7 @@ deviceatkbd # Options for atkbd: optionsATKBD_DFLT_KEYMAP # specify the built-in keymap -makeoptionsATKBD_DFLT_KEYMAP=jp.106 +makeoptionsATKBD_DFLT_KEYMAP=fr.dvorak # `flags' for atkbd: # 0x01Force detection of keyboard, else we always assume a keyboard @@ -84,7 +84,7 @@ options SUNKBD_EMULATE_ATKBD# allows t # in share/syscons/keymaps, required # for SUNKBD_DFLT_KEYMAP and kbdmux optionsSUNKBD_DFLT_KEYMAP # specify the built-in keymap -makeoptionsSUNKBD_DFLT_KEYMAP=jp.106 +makeoptionsSUNKBD_DFLT_KEYMAP=fr.dvorak # ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280622 - head/sys/net
Author: glebius Date: Wed Mar 25 16:01:46 2015 New Revision: 280622 URL: https://svnweb.freebsd.org/changeset/base/280622 Log: Fix couple of fallouts from r280280. The first one is a simple typo, where counter was incremented on parent, instead of vlan(4) interface. The second is more complicated. Historically, in our stack the incoming packets are accounted in drivers, while incoming bytes for Ethernet drivers are accounted in ether_input_internal(). Thus, it should be removed from vlan(4) driver. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c == --- head/sys/net/if_vlan.c Wed Mar 25 15:51:41 2015(r280621) +++ head/sys/net/if_vlan.c Wed Mar 25 16:01:46 2015(r280622) @@ -1163,8 +1163,7 @@ vlan_input(struct ifnet *ifp, struct mbu TRUNK_RUNLOCK(trunk); m-m_pkthdr.rcvif = ifv-ifv_ifp; - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); - if_inc_counter(ifp, IFCOUNTER_IBYTES, m-m_pkthdr.len); + if_inc_counter(ifv-ifv_ifp, IFCOUNTER_IPACKETS, 1); /* Pass it back through the parent's input routine. */ (*ifp-if_input)(ifv-ifv_ifp, m); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r280444 - head/sys/netinet6
On Wed, Mar 25, 2015 at 03:52:20PM +0300, Andrey V. Elsukov wrote: A On 24.03.2015 19:45, Gleb Smirnoff wrote: A Author: glebius A Date: Tue Mar 24 16:45:50 2015 A New Revision: 280444 A URL: https://svnweb.freebsd.org/changeset/base/280444 A A Log: AMove ip6_sprintf() declaration from in6_var.h to in6.h. This is a simple Afunction that works with in6_addr and it is not related to the INET6 Astack implementation. A A maybe it will be better just remove ip6_sprintf() and use inet_ntop() A instead? That's up to you, guys. My aim was to remove yet another user of if_var.h -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280626 - head/include
Author: pfg Date: Wed Mar 25 16:54:37 2015 New Revision: 280626 URL: https://svnweb.freebsd.org/changeset/base/280626 Log: Clean sparse spaces. Modified: head/include/stdlib.h Modified: head/include/stdlib.h == --- head/include/stdlib.h Wed Mar 25 16:40:08 2015(r280625) +++ head/include/stdlib.h Wed Mar 25 16:54:37 2015(r280626) @@ -277,9 +277,9 @@ int cgetustr(char *, const char *, char int daemon(int, int); char *devname(__dev_t, __mode_t); -char *devname_r(__dev_t, __mode_t, char *, int); +char *devname_r(__dev_t, __mode_t, char *, int); char *fdevname(int); -char *fdevname_r(int, char *, int); +char *fdevname_r(int, char *, int); int getloadavg(double [], int); const char * getprogname(void); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280628 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml
Author: gjb Date: Wed Mar 25 17:58:44 2015 New Revision: 280628 URL: https://svnweb.freebsd.org/changeset/base/280628 Log: Document SA-15:06. Sponsored by: The FreeBSD Foundation Modified: stable/8/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml stable/9/release/doc/share/xml/security.xml Modified: stable/8/release/doc/share/xml/security.xml == --- stable/8/release/doc/share/xml/security.xml Wed Mar 25 17:20:59 2015 (r280627) +++ stable/8/release/doc/share/xml/security.xml Wed Mar 25 17:58:44 2015 (r280628) @@ -231,6 +231,13 @@ entryparaRemote denial of service vulnerability/para/entry /row + + row + entrylink + xlink:href=security.url;/FreeBSD-SA-15:06.openssl.ascFreeBSD-SA-15:06.openssl/link/entry + entry19nbsp;Marchnbsp;2015/entry + entryparaMultiple vulnerabilities/para/entry + /row /tbody /tgroup /informaltable ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280628 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml
Author: gjb Date: Wed Mar 25 17:58:44 2015 New Revision: 280628 URL: https://svnweb.freebsd.org/changeset/base/280628 Log: Document SA-15:06. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/8/release/doc/share/xml/security.xml stable/9/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/security.xml == --- stable/10/release/doc/share/xml/security.xmlWed Mar 25 17:20:59 2015(r280627) +++ stable/10/release/doc/share/xml/security.xmlWed Mar 25 17:58:44 2015(r280628) @@ -79,6 +79,13 @@ entry25nbsp;Februarynbsp;2015/entry entryparaInteger overflow in IGMP protocol/para/entry /row + + row + entrylink + xlink:href=security.url;/FreeBSD-SA-15:06.openssl.ascFreeBSD-SA-15:06.openssl/link/entry + entry19nbsp;Marchnbsp;2015/entry + entryparaMultiple vulnerabilities/para/entry + /row /tbody /tgroup /informaltable ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280629 - head/share/misc
Author: culot (ports committer) Date: Wed Mar 25 18:02:06 2015 New Revision: 280629 URL: https://svnweb.freebsd.org/changeset/base/280629 Log: Update the portmgr members list Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot == --- head/share/misc/organization.dotWed Mar 25 17:58:44 2015 (r280628) +++ head/share/misc/organization.dotWed Mar 25 18:02:06 2015 (r280629) @@ -30,7 +30,7 @@ coresecretary [label=Core Team Secretar doccommitters [label=Doc/www Committers\ndoc-committ...@freebsd.org] doceng [label=Documentation Engineering Team\ndoc...@freebsd.org\ngjb, blackend,\ngabor, hrs] portscommitters [label=Ports Committers\nports-committ...@freebsd.org] -portmgr [label=Port Management Team\nport...@freebsd.org\nantoine, bapt, bdrewery,\ndecke, erwin, mat, swills] +portmgr [label=Port Management Team\nport...@freebsd.org\nantoine, bapt, bdrewery,\nerwin, mat, swills] portmgrsecretary [label=Port Management Team Secretary\nportmgr-secret...@freebsd.org\nculot] re [label=Primary Release Engineering Team\n...@freebsd.org\nkib, blackend, jpaetzel, hrs, kensmith] secteam [label=Security Team\nsect...@freebsd.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz] ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280628 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml
Author: gjb Date: Wed Mar 25 17:58:44 2015 New Revision: 280628 URL: https://svnweb.freebsd.org/changeset/base/280628 Log: Document SA-15:06. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml stable/8/release/doc/share/xml/security.xml Modified: stable/9/release/doc/share/xml/security.xml == --- stable/9/release/doc/share/xml/security.xml Wed Mar 25 17:20:59 2015 (r280627) +++ stable/9/release/doc/share/xml/security.xml Wed Mar 25 17:58:44 2015 (r280628) @@ -126,6 +126,13 @@ entryparaRemote denial of service vulnerability/para/entry /row + + row + entrylink + xlink:href=security.url;/FreeBSD-SA-15:06.openssl.ascFreeBSD-SA-15:06.openssl/link/entry + entry19nbsp;Marchnbsp;2015/entry + entryparaMultiple vulnerabilities/para/entry + /row /tbody /tgroup /informaltable ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280630 - in head: lib/libfetch sys/sys usr.bin/fetch
Author: jkim Date: Wed Mar 25 18:56:36 2015 New Revision: 280630 URL: https://svnweb.freebsd.org/changeset/base/280630 Log: Remove defunct SSLv2 support from fetch(1) and fetch(3). Modified: head/lib/libfetch/common.c head/lib/libfetch/fetch.3 head/sys/sys/param.h head/usr.bin/fetch/fetch.1 head/usr.bin/fetch/fetch.c Modified: head/lib/libfetch/common.c == --- head/lib/libfetch/common.c Wed Mar 25 18:02:06 2015(r280629) +++ head/lib/libfetch/common.c Wed Mar 25 18:56:36 2015(r280630) @@ -672,9 +672,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX { long ssl_ctx_options; - ssl_ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET; - if (getenv(SSL_ALLOW_SSL2) == NULL) - ssl_ctx_options |= SSL_OP_NO_SSLv2; + ssl_ctx_options = SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_TICKET; if (getenv(SSL_ALLOW_SSL3) == NULL) ssl_ctx_options |= SSL_OP_NO_SSLv3; if (getenv(SSL_NO_TLS1) != NULL) Modified: head/lib/libfetch/fetch.3 == --- head/lib/libfetch/fetch.3 Wed Mar 25 18:02:06 2015(r280629) +++ head/lib/libfetch/fetch.3 Wed Mar 25 18:56:36 2015(r280630) @@ -26,7 +26,7 @@ .\ .\ $FreeBSD$ .\ -.Dd October 15, 2014 +.Dd March 25, 2015 .Dt FETCH 3 .Os .Sh NAME @@ -441,10 +441,8 @@ By default allows TLSv1 and newer when negotiating the connecting with the remote peer. You can change this behavior by setting the -.Ev SSL_ALLOW_SSL2 -and .Ev SSL_ALLOW_SSL3 -environment variables to allow SSLv2 and SSLv3, respectively, and +environment variable to allow SSLv3 and .Ev SSL_NO_TLS1 , .Ev SSL_NO_TLS1_1 and .Ev SSL_NO_TLS1_2 @@ -646,8 +644,6 @@ which proxies should not be used. Same as .Ev NO_PROXY , for compatibility. -.It Ev SSL_ALLOW_SSL2 -Allow SSL version 2 when negotiating the connection (not recommended). .It Ev SSL_ALLOW_SSL3 Allow SSL version 3 when negotiating the connection (not recommended). .It Ev SSL_CA_CERT_FILE Modified: head/sys/sys/param.h == --- head/sys/sys/param.hWed Mar 25 18:02:06 2015(r280629) +++ head/sys/sys/param.hWed Mar 25 18:56:36 2015(r280630) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100066 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100067 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/usr.bin/fetch/fetch.1 == --- head/usr.bin/fetch/fetch.1 Wed Mar 25 18:02:06 2015(r280629) +++ head/usr.bin/fetch/fetch.1 Wed Mar 25 18:56:36 2015(r280630) @@ -30,7 +30,7 @@ .\ .\ $FreeBSD$ .\ -.Dd January 28, 2014 +.Dd March 25, 2015 .Dt FETCH 1 .Os .Sh NAME @@ -39,7 +39,6 @@ .Sh SYNOPSIS .Nm .Op Fl 146AadFlMmnPpqRrsUv -.Op Fl -allow-sslv2 .Op Fl B Ar bytes .Op Fl -bind-address= Ns Ar host .Op Fl -ca-cert= Ns Ar file @@ -113,9 +112,6 @@ Some broken Web sites will return a redi error when the requested object does not exist. .It Fl a , -retry Automatically retry the transfer upon soft failures. -.It Fl -allow-sslv2 -[SSL] -Allow SSL version 2 when negotiating the connection. .It Fl B Ar bytes , Fl -buffer-size= Ns Ar bytes Specify the read buffer size in bytes. The default is 16,384 bytes. @@ -350,7 +346,6 @@ for a description of additional environm .Ev NETRC , .Ev NO_PROXY , .Ev no_proxy , -.Ev SSL_ALLOW_SSL2 , .Ev SSL_CA_CERT_FILE , .Ev SSL_CA_CERT_PATH , .Ev SSL_CLIENT_CERT_FILE , Modified: head/usr.bin/fetch/fetch.c == --- head/usr.bin/fetch/fetch.c Wed Mar 25 18:02:06 2015(r280629) +++ head/usr.bin/fetch/fetch.c Wed Mar 25 18:56:36 2015(r280630) @@ -102,7 +102,6 @@ enum options OPTION_HTTP_REFERER, OPTION_HTTP_USER_AGENT, OPTION_NO_PROXY, - OPTION_SSL_ALLOW_SSL2, OPTION_SSL_CA_CERT_FILE, OPTION_SSL_CA_CERT_PATH, OPTION_SSL_CLIENT_CERT_FILE, @@ -154,7 +153,6 @@ static struct option longopts[] = { referer, required_argument, NULL, OPTION_HTTP_REFERER }, { user-agent, required_argument, NULL, OPTION_HTTP_USER_AGENT }, { no-proxy, required_argument, NULL, OPTION_NO_PROXY }, - { allow-sslv2, no_argument, NULL, OPTION_SSL_ALLOW_SSL2 }, { ca-cert, required_argument, NULL, OPTION_SSL_CA_CERT_FILE }, { ca-path, required_argument, NULL, OPTION_SSL_CA_CERT_PATH }, { cert, required_argument, NULL, OPTION_SSL_CLIENT_CERT_FILE }, @@ -845,17 +843,17 @@ static void usage(void) { fprintf(stderr,
Re: svn commit: r280407 - head/sys/kern
On Tue, Mar 24, 2015 at 03:58:14PM +1100, Bruce Evans wrote: On Tue, 24 Mar 2015, Mateusz Guzik wrote: Log: filedesc: microoptimize fget_unlocked by getting rid of fd 0 branch This has no effect. Compilers optimize to the equivalent of the the unsigned cast hack if this is good. On x86, it is good since no instructions are needed for the conversion, and the only difference between the code generated by if (fd = fdt-fdt_nfiles) and if (fd 0 || fd = fdt-fdt_nfiles) is to change from jl (jump if less than) to jb (jump if below) (both jumps over the if clause). Negative values satisfy jl but not jb. I would not commit the change if it did not affect generated assembly at least on amd64. if (fd 0 || fd = fdt-fdt_nfiles): 0x807d147d fget_unlocked+13: sub$0x38,%rsp 0x807d1481 fget_unlocked+17: test %esi,%esi 0x807d1483 fget_unlocked+19: js 0x807d15b8 fget_unlocked+328 0x807d1489 fget_unlocked+25: mov(%rdi),%rbx 0x807d148c fget_unlocked+28: cmp%esi,(%rbx) 0x807d148e fget_unlocked+30: jle0x807d15bf fget_unlocked+335 if ((u_int)fd = fdt-fdt_nfiles): 0x807d147d fget_unlocked+13: sub$0x38,%rsp 0x807d1481 fget_unlocked+17: mov(%rdi),%rbx 0x807d1484 fget_unlocked+20: cmp%esi,(%rbx) 0x807d1486 fget_unlocked+22: jbe0x807d15a8 fget_unlocked+312 I did not check other archs prior to the commit. This is clang 3.6 as present in head. Sources compiled with -O2. Also see below for other compiler test. Casting fd to an unsigned type simplifies fd range coparison to mere checking if the result is bigger than the table. No, it obfuscates the range comparison. It is a standard hack which is hard to misread and which seems to add a slight benefit (see below). On some arches, conversion to unsigned is slow. Then compilers should optimize in the opposite direction by first undoing the bogus cast to get back to the range check and then optimizing the range check using the best strategy. Compilers should probably first undo the bogus cast even on x86, so as to reduce to the range check case. Range checks are more important and more uniform than bogus casts, so they are more likely to be optimized. Similarly if fd has type u_int to begin with. It affects assembly on all arm, powerpc64 and mips64 as well. Both arm and powerpc just get rid of zero-test and use the same instructions to perform the other comparison. I only found a difference on mips64 which used sltu instead of slt (but still got rid of the zero-check). Granted I don't know mips instruction costs and I don't have the real hadrware to benchark on. Seems like a win for most architectures anyway. Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.c Tue Mar 24 00:01:30 2015 (r280406) +++ head/sys/kern/kern_descrip.c Tue Mar 24 00:10:11 2015 (r280407) @@ -2342,7 +2342,7 @@ fget_unlocked(struct filedesc *fdp, int #endif fdt = fdp-fd_files; -if (fd 0 || fd = fdt-fdt_nfiles) +if ((u_int)fd = fdt-fdt_nfiles) return (EBADF); /* * Fetch the descriptor locklessly. We avoid fdrop() races by [..] - fget_locked() seems to be unchanged recently, so it doesn't have the obfuscation. fget_unlocked() is newer than the unobfuscated version of fget_locked(). It is in a different file, but may have copied the unobfuscated range check from fget_locked(). This commit restores the obfuscation to it alone. This definitely should be synced one way or the other, thanks for pointing this out. There are now some other range checks in kern_desc.c that are missing the obfuscation: grepping for fd gives: - a magic treatment for negative fd's in closefrom() Well I'll start with a short note that I don't know what's up with uap-lowfd = 0; instead of retuning with EINVAL. Anyay, the cast there would not have any use. - the range check in an unobfuscated by confusing form in fdisused(). The check has to be inverted since it is in a KASSERT(), and the inversion is done by reversing the inequalities. Correct, this likely should also be synced (one way or the other). - similarly in fdalloc(). Same. I used to use this hack a lot 30 years ago, but stopped when compilers got better 20-25 years ago. I wrote a toy program and checked e.g. gcc5 and it still did not optimise zero-test away. In fact I would argue the optimisation in question is impossible unless upper limit check is against a constant in (0, INT_MAX) range or against a var whose range is known at compile time. In particular this is problematic for negative values. Consider: int fd, limit; if (fd 0 || fd = limit) Let's have fd = -5 and limit = -4. Should the fd 0 check be dropped by
svn commit: r280631 - head
Author: emaste Date: Wed Mar 25 20:57:08 2015 New Revision: 280631 URL: https://svnweb.freebsd.org/changeset/base/280631 Log: Force MK_INCLUDES for the legacy stage As legacy executes make installincludes we don't want it to be disabled by a src.conf setting. Reviewed by: imp MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D2143 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Mar 25 18:56:36 2015(r280630) +++ head/Makefile.inc1 Wed Mar 25 20:57:08 2015(r280631) @@ -259,7 +259,8 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ - MK_LLDB=no MK_TESTS=no + MK_LLDB=no MK_TESTS=no \ + MK_INCLUDES=yes # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280632 - in stable/10: sys/kern sys/sys usr.sbin/jail
Author: ian Date: Wed Mar 25 20:57:54 2015 New Revision: 280632 URL: https://svnweb.freebsd.org/changeset/base/280632 Log: MFC r279361, r279395, r279396: Allow the kern.osrelease and kern.osreldate sysctl values to be set in a jail's creation parameters. This allows the kernel version to be reliably spoofed within the jail whether examined directly with sysctl or indirectly with the uname -r and -K options. Export the new osreldate and osrelease jail parms in jail_get(2). Fix line wrap. Modified: stable/10/sys/kern/imgact_elf.c stable/10/sys/kern/init_main.c stable/10/sys/kern/kern_jail.c stable/10/sys/kern/kern_mib.c stable/10/sys/sys/jail.h stable/10/usr.sbin/jail/jail.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c == --- stable/10/sys/kern/imgact_elf.c Wed Mar 25 20:57:08 2015 (r280631) +++ stable/10/sys/kern/imgact_elf.c Wed Mar 25 20:57:54 2015 (r280632) @@ -41,6 +41,7 @@ __FBSDID($FreeBSD$); #include sys/fcntl.h #include sys/imgact.h #include sys/imgact_elf.h +#include sys/jail.h #include sys/kernel.h #include sys/lock.h #include sys/malloc.h @@ -996,7 +997,8 @@ __elfN(freebsd_fixup)(register_t **stack AUXARGS_ENTRY(pos, AT_BASE, args-base); if (imgp-execpathp != 0) AUXARGS_ENTRY(pos, AT_EXECPATH, imgp-execpathp); - AUXARGS_ENTRY(pos, AT_OSRELDATE, osreldate); + AUXARGS_ENTRY(pos, AT_OSRELDATE, + imgp-proc-p_ucred-cr_prison-pr_osreldate); if (imgp-canary != 0) { AUXARGS_ENTRY(pos, AT_CANARY, imgp-canary); AUXARGS_ENTRY(pos, AT_CANARYLEN, imgp-canarylen); Modified: stable/10/sys/kern/init_main.c == --- stable/10/sys/kern/init_main.c Wed Mar 25 20:57:08 2015 (r280631) +++ stable/10/sys/kern/init_main.c Wed Mar 25 20:57:54 2015 (r280632) @@ -493,7 +493,7 @@ proc0_init(void *dummy __unused) td-td_flags = TDF_INMEM; td-td_pflags = TDP_KTHREAD; td-td_cpuset = cpuset_thread0(); - prison0.pr_cpuset = cpuset_ref(td-td_cpuset); + prison0_init(); p-p_peers = 0; p-p_leader = p; p-p_reaper = p; Modified: stable/10/sys/kern/kern_jail.c == --- stable/10/sys/kern/kern_jail.c Wed Mar 25 20:57:08 2015 (r280631) +++ stable/10/sys/kern/kern_jail.c Wed Mar 25 20:57:54 2015 (r280632) @@ -238,6 +238,19 @@ static int jail_default_devfs_rsnum = JA static unsigned jail_max_af_ips = 255; #endif +/* + * Initialize the parts of prison0 that can't be static-initialized with + * constants. This is called from proc0_init() after creating thread0 cpuset. + */ +void +prison0_init(void) +{ + + prison0.pr_cpuset = cpuset_ref(thread0.td_cpuset); + prison0.pr_osreldate = osreldate; + strlcpy(prison0.pr_osrelease, osrelease, sizeof(prison0.pr_osrelease)); +} + #ifdef INET static int qcmp_v4(const void *ip1, const void *ip2) @@ -537,7 +550,7 @@ kern_jail_set(struct thread *td, struct struct prison *pr, *deadpr, *mypr, *ppr, *tpr; struct vnode *root; char *domain, *errmsg, *host, *name, *namelc, *p, *path, *uuid; - char *g_path; + char *g_path, *osrelstr; #if defined(INET) || defined(INET6) struct prison *tppr; void *op; @@ -547,7 +560,7 @@ kern_jail_set(struct thread *td, struct int created, cuflags, descend, enforce, error, errmsg_len, errmsg_pos; int gotchildmax, gotenforce, gothid, gotrsnum, gotslevel; int fi, jid, jsys, len, level; - int childmax, rsnum, slevel; + int childmax, osreldt, rsnum, slevel; int fullpath_disabled; #if defined(INET) || defined(INET6) int ii, ij; @@ -962,6 +975,46 @@ kern_jail_set(struct thread *td, struct } } + error = vfs_getopt(opts, osrelease, (void **)osrelstr, len); + if (error == ENOENT) + osrelstr = NULL; + else if (error != 0) + goto done_free; + else { + if (flags JAIL_UPDATE) { + error = EINVAL; + vfs_opterror(opts, + osrelease cannot be changed after creation); + goto done_errmsg; + } + if (len == 0 || len = OSRELEASELEN) { + error = EINVAL; + vfs_opterror(opts, + osrelease string must be 1-%d bytes long, + OSRELEASELEN - 1); + goto done_errmsg; + } + } + + error = vfs_copyopt(opts, osreldate, osreldt, sizeof(osreldt)); + if (error == ENOENT) +
svn commit: r280634 - head/sys/netinet
Author: tuexen Date: Wed Mar 25 21:41:20 2015 New Revision: 280634 URL: https://svnweb.freebsd.org/changeset/base/280634 Log: Use the reference count of the right SCTP inp. Joint work with rrs@ MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c == --- head/sys/netinet/sctp_usrreq.c Wed Mar 25 21:31:36 2015 (r280633) +++ head/sys/netinet/sctp_usrreq.c Wed Mar 25 21:41:20 2015 (r280634) @@ -6953,7 +6953,7 @@ sctp_listen(struct socket *so, int backl SCTP_INP_DECR_REF(tinp); return (EADDRINUSE); } else if (tinp) { - SCTP_INP_DECR_REF(inp); + SCTP_INP_DECR_REF(tinp); } } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280640 - head/release/arm
Author: gjb Date: Wed Mar 25 22:08:02 2015 New Revision: 280640 URL: https://svnweb.freebsd.org/changeset/base/280640 Log: Crochet sources moved to a new home; update accordingly. MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BEAGLEBONE.conf head/release/arm/PANDABOARD.conf head/release/arm/RPI-B.conf head/release/arm/WANDBOARD-QUAD.conf head/release/arm/ZEDBOARD.conf Modified: head/release/arm/BEAGLEBONE.conf == --- head/release/arm/BEAGLEBONE.confWed Mar 25 21:59:36 2015 (r280639) +++ head/release/arm/BEAGLEBONE.confWed Mar 25 22:08:02 2015 (r280640) @@ -32,6 +32,6 @@ load_target_env() { export XDEV_FLAGS=WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 export XDEV_FLAGS=${XDEV_FLAGS} MK_TESTS=no export KERNEL=BEAGLEBONE - export CROCHETSRC=https://github.com/kientzle/crochet-freebsd; + export CROCHETSRC=https://github.com/freebsd/crochet; export CROCHETBRANCH=trunk@r744 } Modified: head/release/arm/PANDABOARD.conf == --- head/release/arm/PANDABOARD.confWed Mar 25 21:59:36 2015 (r280639) +++ head/release/arm/PANDABOARD.confWed Mar 25 22:08:02 2015 (r280640) @@ -32,6 +32,6 @@ load_target_env() { export XDEV_FLAGS=WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 export XDEV_FLAGS=${XDEV_FLAGS} MK_TESTS=no export KERNEL=PANDABOARD - export CROCHETSRC=https://github.com/kientzle/crochet-freebsd; + export CROCHETSRC=https://github.com/freebsd/crochet; export CROCHETBRANCH=trunk@r744 } Modified: head/release/arm/RPI-B.conf == --- head/release/arm/RPI-B.conf Wed Mar 25 21:59:36 2015(r280639) +++ head/release/arm/RPI-B.conf Wed Mar 25 22:08:02 2015(r280640) @@ -32,7 +32,7 @@ load_target_env() { export XDEV_FLAGS=WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 export XDEV_FLAGS=${XDEV_FLAGS} MK_TESTS=no export KERNEL=RPI-B - export CROCHETSRC=https://github.com/kientzle/crochet-freebsd; + export CROCHETSRC=https://github.com/freebsd/crochet; export CROCHETBRANCH=trunk@r744 export UBOOTSRC=https://github.com/gonzoua/u-boot-pi; export UBOOTBRANCH=trunk Modified: head/release/arm/WANDBOARD-QUAD.conf == --- head/release/arm/WANDBOARD-QUAD.confWed Mar 25 21:59:36 2015 (r280639) +++ head/release/arm/WANDBOARD-QUAD.confWed Mar 25 22:08:02 2015 (r280640) @@ -32,6 +32,6 @@ load_target_env() { export XDEV_FLAGS=WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 export XDEV_FLAGS=${XDEV_FLAGS} MK_TESTS=no export KERNEL=WANDBOARD-QUAD - export CROCHETSRC=https://github.com/kientzle/crochet-freebsd; + export CROCHETSRC=https://github.com/freebsd/crochet; export CROCHETBRANCH=trunk@r744 } Modified: head/release/arm/ZEDBOARD.conf == --- head/release/arm/ZEDBOARD.conf Wed Mar 25 21:59:36 2015 (r280639) +++ head/release/arm/ZEDBOARD.conf Wed Mar 25 22:08:02 2015 (r280640) @@ -31,6 +31,6 @@ load_target_env() { export XDEV_FLAGS=WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 export XDEV_FLAGS=${XDEV_FLAGS} MK_TESTS=no export KERNEL=ZEDBOARD - export CROCHETSRC=https://github.com/kientzle/crochet-freebsd; + export CROCHETSRC=https://github.com/freebsd/crochet; export CROCHETBRANCH=trunk@r744 } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280639 - head
Author: imp Date: Wed Mar 25 21:59:36 2015 New Revision: 280639 URL: https://svnweb.freebsd.org/changeset/base/280639 Log: Add some more explanation to the different phases of the build. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Mar 25 21:57:03 2015(r280638) +++ head/Makefile.inc1 Wed Mar 25 21:59:36 2015(r280639) @@ -209,7 +209,9 @@ INSTALLTMP!=/usr/bin/mktemp -d -u -t in # 1. legacy stage [BMAKE] # This stage is responsible for creating compatibility # shims that are needed by the bootstrap-tools, -# build-tools and cross-tools stages. +# build-tools and cross-tools stages. These are generally +# APIs that tools from one of those three stages need to +# build that aren't present on the host. # 1. bootstrap-tools stage [BMAKE] # This stage is responsible for creating programs that # are needed for backward compatibility reasons. They @@ -220,7 +222,7 @@ INSTALLTMP!=/usr/bin/mktemp -d -u -t in # the build process. # 3. cross-tools stage [XMAKE] # This stage is responsible for creating any tools that -# are needed for cross-builds. A cross-compiler is one +# are needed for building the system. A cross-compiler is one # of them. # 4. world stage [WMAKE] # This stage actually builds the world. @@ -1222,7 +1224,9 @@ update: # # -# legacy: Build compatibility shims for the next three targets +# legacy: Build compatibility shims for the next three targets. This is a minimal +# set of tools and shims necessary to compensate for older systems which don't have +# the APIs that the targets built in bootstrap-tools, build-tools or cross-tools. # legacy: .if ${BOOTSTRAPPING} 800107 ${BOOTSTRAPPING} != 0 @@ -1240,7 +1244,10 @@ legacy: .endfor # -# bootstrap-tools: Build tools needed for compatibility +# bootstrap-tools: Build tools needed for compatibility. These are binaries that +# are built to build other binaries in the system. However, the focus of these +# binaries is usually quite narrow. Bootstrap tools use the host's compiler and +# libraries, augmented by -legacy. # _bt= _bootstrap-tools @@ -1446,7 +1453,9 @@ kernel-tools: .MAKE -p ${MAKEOBJDIRPREFIX}/usr /dev/null # -# cross-tools: Build cross-building tools +# cross-tools: All the tools needed to build the rest of the system after +# we get done with the earlier stages. It is the last set of tools needed +# to begin building the target binaries. # .if ${TARGET_ARCH} != ${MACHINE_ARCH} .if ${TARGET_ARCH} == amd64 || ${TARGET_ARCH} == i386 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r280636 - head/include
Author: pfg Date: Wed Mar 25 21:53:17 2015 New Revision: 280636 URL: https://svnweb.freebsd.org/changeset/base/280636 Log: Temporarily revert 280458. GCC is still carries an old version of cdefs.h which doesn't accept multiple parameters for the nonnull attribute. Since this issue probably affects many ports in the tree we will revert it for now until gcc gets fixed. Modified: head/include/pthread.h head/include/signal.h Modified: head/include/pthread.h == --- head/include/pthread.h Wed Mar 25 21:53:16 2015(r280635) +++ head/include/pthread.h Wed Mar 25 21:53:17 2015(r280636) @@ -144,23 +144,19 @@ struct _pthread_cleanup_info { */ __BEGIN_DECLS intpthread_atfork(void (*)(void), void (*)(void), void (*)(void)); -intpthread_attr_destroy(pthread_attr_t *) __nonnull(1); +intpthread_attr_destroy(pthread_attr_t *); intpthread_attr_getstack(const pthread_attr_t * __restrict, - void ** __restrict, size_t * __restrict) - __nonnull(1, 2, 3); -intpthread_attr_getstacksize(const pthread_attr_t *, size_t *) - __nonnull(1, 2); + void ** __restrict, size_t * __restrict); +intpthread_attr_getstacksize(const pthread_attr_t *, size_t *); intpthread_attr_getguardsize(const pthread_attr_t *, size_t *); intpthread_attr_getstackaddr(const pthread_attr_t *, void **); -intpthread_attr_getdetachstate(const pthread_attr_t *, int *) - __nonnull(1, 2); -intpthread_attr_init(pthread_attr_t *) __nonnull(1); -intpthread_attr_setstacksize(pthread_attr_t *, size_t) __nonnull(1); -intpthread_attr_setguardsize(pthread_attr_t *, size_t) __nonnull(1); -intpthread_attr_setstack(pthread_attr_t *, void *, size_t) - __nonnull(1); +intpthread_attr_getdetachstate(const pthread_attr_t *, int *); +intpthread_attr_init(pthread_attr_t *); +intpthread_attr_setstacksize(pthread_attr_t *, size_t); +intpthread_attr_setguardsize(pthread_attr_t *, size_t); +intpthread_attr_setstack(pthread_attr_t *, void *, size_t); intpthread_attr_setstackaddr(pthread_attr_t *, void *); -intpthread_attr_setdetachstate(pthread_attr_t *, int) __nonnull(1); +intpthread_attr_setdetachstate(pthread_attr_t *, int); intpthread_barrier_destroy(pthread_barrier_t *); intpthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, unsigned); @@ -168,7 +164,7 @@ int pthread_barrier_wait(pthread_barrie intpthread_barrierattr_destroy(pthread_barrierattr_t *); intpthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *); -intpthread_barrierattr_init(pthread_barrierattr_t *) __nonnull(1); +intpthread_barrierattr_init(pthread_barrierattr_t *); intpthread_barrierattr_setpshared(pthread_barrierattr_t *, int); #definepthread_cleanup_push(cleanup_routine, cleanup_arg) \ @@ -184,96 +180,85 @@ int pthread_barrierattr_setpshared(pthr __pthread_cleanup_pop_imp(execute); \ } -intpthread_condattr_destroy(pthread_condattr_t *) __nonnull(1); +intpthread_condattr_destroy(pthread_condattr_t *); intpthread_condattr_getclock(const pthread_condattr_t *, - clockid_t *) __nonnull(1, 2); -intpthread_condattr_getpshared(const pthread_condattr_t *, int *) - __nonnull(1, 2); -intpthread_condattr_init(pthread_condattr_t *) __nonnull(1); -intpthread_condattr_setclock(pthread_condattr_t *, clockid_t) - __nonnull(1); -intpthread_condattr_setpshared(pthread_condattr_t *, int) - __nonnull(1); -intpthread_cond_broadcast(pthread_cond_t *) - __nonnull(1); -intpthread_cond_destroy(pthread_cond_t *) - __nonnull(1); + clockid_t *); +intpthread_condattr_getpshared(const pthread_condattr_t *, int *); +intpthread_condattr_init(pthread_condattr_t *); +intpthread_condattr_setclock(pthread_condattr_t *, clockid_t); +intpthread_condattr_setpshared(pthread_condattr_t *, int); +intpthread_cond_broadcast(pthread_cond_t *); +intpthread_cond_destroy(pthread_cond_t *); intpthread_cond_init(pthread_cond_t *, - const pthread_condattr_t *) __nonnull(1); -int