svn commit: r253378 - head/sys/modules/usb

2013-07-15 Thread Rui Paulo
Author: rpaulo
Date: Tue Jul 16 06:43:37 2013
New Revision: 253378
URL: http://svnweb.freebsd.org/changeset/base/253378

Log:
  Add urtwnfw.

Modified:
  head/sys/modules/usb/Makefile

Modified: head/sys/modules/usb/Makefile
==
--- head/sys/modules/usb/Makefile   Tue Jul 16 04:39:44 2013
(r253377)
+++ head/sys/modules/usb/Makefile   Tue Jul 16 06:43:37 2013
(r253378)
@@ -32,7 +32,7 @@
 
 SUBDIR = usb
 SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} ${_at91dci} 
${_atmegadci} ${_avr32dci}
-SUBDIR += ${_rum} run ${_uath} upgt usie ural ${_zyd} ${_urtw} urtwn
+SUBDIR += ${_rum} run ${_uath} upgt usie ural ${_zyd} ${_urtw} urtwn urtwnfw
 SUBDIR += atp uhid ukbd ums udbp ufm uep
 SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt 
\
  umct umcs umodem umoscom uplcom uslcom uvisor uvscom
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253376 - head/usr.sbin/rtsold

2013-07-15 Thread Kevin Lo
Author: kevlo
Date: Tue Jul 16 03:12:31 2013
New Revision: 253376
URL: http://svnweb.freebsd.org/changeset/base/253376

Log:
  Silent warnings.

Modified:
  head/usr.sbin/rtsold/rtsol.c

Modified: head/usr.sbin/rtsold/rtsol.c
==
--- head/usr.sbin/rtsold/rtsol.cTue Jul 16 00:05:17 2013
(r253375)
+++ head/usr.sbin/rtsold/rtsol.cTue Jul 16 03:12:31 2013
(r253376)
@@ -237,7 +237,7 @@ sendpacket(struct ifinfo *ifi)
 void
 rtsol_input(int s)
 {
-   u_char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
+   char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
int l, ifindex = 0, *hlimp = NULL;
ssize_t msglen;
struct in6_pktinfo *pi = NULL;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253372 - head/sbin/mount

2013-07-15 Thread Robert Millan
Author: rmh
Date: Mon Jul 15 21:57:21 2013
New Revision: 253372
URL: http://svnweb.freebsd.org/changeset/base/253372

Log:
  Add -n flag for compatibility with Linux version of mount(8).
  
  Reviewed by: freebsd-fs, eadler, mckusick, jh, wblock

Modified:
  head/sbin/mount/mount.8
  head/sbin/mount/mount.c

Modified: head/sbin/mount/mount.8
==
--- head/sbin/mount/mount.8 Mon Jul 15 20:33:54 2013(r253371)
+++ head/sbin/mount/mount.8 Mon Jul 15 21:57:21 2013(r253372)
@@ -118,6 +118,9 @@ When used in conjunction with the
 .Fl a
 option, also mount those file systems which are marked as
 .Dq Li late .
+.It Fl n
+For compatibility with some other implementations, this flag is
+currently a no-op.
 .It Fl o
 Options are specified with a
 .Fl o

Modified: head/sbin/mount/mount.c
==
--- head/sbin/mount/mount.c Mon Jul 15 20:33:54 2013(r253371)
+++ head/sbin/mount/mount.c Mon Jul 15 21:57:21 2013(r253372)
@@ -253,7 +253,7 @@ main(int argc, char *argv[])
options = NULL;
vfslist = NULL;
vfstype = "ufs";
-   while ((ch = getopt(argc, argv, "adF:fLlo:prt:uvw")) != -1)
+   while ((ch = getopt(argc, argv, "adF:fLlno:prt:uvw")) != -1)
switch (ch) {
case 'a':
all = 1;
@@ -274,6 +274,9 @@ main(int argc, char *argv[])
case 'l':
late = 1;
break;
+   case 'n':
+   /* For compatibility with the Linux version of mount. */
+   break;
case 'o':
if (*optarg) {
options = catopt(options, optarg);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r253210 - in head/sys: conf netinet

2013-07-15 Thread Andre Oppermann

On 15.07.2013 20:38, Mikolaj Golub wrote:

On Mon, Jul 15, 2013 at 11:36:16AM +0200, Ulrich Spörlein wrote:

Hey Andre,

I don't see why this commit triggers it, but Coverity Scan found a new
resource leak in this file. syncache_expand() will leak *s when line
1071 is reached. The "failed:" case below correctly frees the resources.

1068/* how do we find the inp for the new socket? */
 22. Condition "sc != &scs", taking true branch
1069if (sc != &scs)
1070syncache_free(sc);

CID null (#1 of 1): Resource leak (RESOURCE_LEAK)
23. leaked_storage: Variable "s" going out of scope leaks the storage it points 
to.
1071return (1);
1072failed:
1073if (sc != NULL && sc != &scs)
1074syncache_free(sc);
1075if (s != NULL)
1076free(s, M_TCPLOG);
1077*lsop = NULL;
1078return (0);
1079}


It looks like free(s, M_TCPLOG) is missed in this branch:

   1043 if ((sc->sc_flags & SCF_TIMESTAMP) && !(to->to_flags & TOF_TS)) 
{
   1044 if ((s = tcp_log_addrs(inc, th, NULL, NULL)))
   1045 log(LOG_DEBUG, "%s; %s: Timestamp missing, "
   1046 "no action\n", s, __func__);
   1047 }


Yes, I just figured that out and prepared a patch.

--
Andre

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r253210 - in head/sys: conf netinet

2013-07-15 Thread Mikolaj Golub
On Mon, Jul 15, 2013 at 11:36:16AM +0200, Ulrich Spörlein wrote:
> Hey Andre,
> 
> I don't see why this commit triggers it, but Coverity Scan found a new
> resource leak in this file. syncache_expand() will leak *s when line
> 1071 is reached. The "failed:" case below correctly frees the resources.
> 
> 1068/* how do we find the inp for the new socket? */
> 22. Condition "sc != &scs", taking true branch
> 1069if (sc != &scs)
> 1070syncache_free(sc);
> 
> CID null (#1 of 1): Resource leak (RESOURCE_LEAK)
> 23. leaked_storage: Variable "s" going out of scope leaks the storage it 
> points to.
> 1071return (1);
> 1072failed:
> 1073if (sc != NULL && sc != &scs)
> 1074syncache_free(sc);
> 1075if (s != NULL)
> 1076free(s, M_TCPLOG);
> 1077*lsop = NULL;
> 1078return (0);
> 1079}

It looks like free(s, M_TCPLOG) is missed in this branch:

  1043  if ((sc->sc_flags & SCF_TIMESTAMP) && !(to->to_flags & TOF_TS)) 
{
  1044  if ((s = tcp_log_addrs(inc, th, NULL, NULL)))
  1045  log(LOG_DEBUG, "%s; %s: Timestamp missing, "
  1046  "no action\n", s, __func__);
  1047  }


-- 
Mikolaj Golub
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r253274 - head/sys/cam/scsi

2013-07-15 Thread Ulrich Spörlein
2013/7/15 Kenneth D. Merry :
> Oops, you're right!  Thanks for pointing it out!  I just committed a fix.
>
> How does Coverity detect something like that?  Using the comment, or the
> variable name?

I would guess the variable name, maybe with a fuzzy match. At least
that's how I would do it, I don't know the internal workings of their
software and I'm sure they won't tell anyone :)

Cheers,
Uli
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253370 - in head/sys/cam: . scsi

2013-07-15 Thread Alexander Motin
Author: mav
Date: Mon Jul 15 18:17:31 2013
New Revision: 253370
URL: http://svnweb.freebsd.org/changeset/base/253370

Log:
  Make some improvements to r253322 to really rescan target, not a bus.
  Add there and in two more places checks for NULL on xpt_alloc_ccb_nowait().

Modified:
  head/sys/cam/cam_periph.c
  head/sys/cam/cam_xpt.c
  head/sys/cam/scsi/scsi_xpt.c

Modified: head/sys/cam/cam_periph.c
==
--- head/sys/cam/cam_periph.c   Mon Jul 15 18:02:26 2013(r253369)
+++ head/sys/cam/cam_periph.c   Mon Jul 15 18:17:31 2013(r253370)
@@ -1770,13 +1770,17 @@ cam_periph_error(union ccb *ccb, cam_fla
if (xpt_create_path(&newpath, NULL,
xpt_path_path_id(ccb->ccb_h.path),
xpt_path_target_id(ccb->ccb_h.path),
-   -1) == CAM_REQ_CMP) {
+   CAM_LUN_WILDCARD) == CAM_REQ_CMP) {
 
scan_ccb = xpt_alloc_ccb_nowait();
-   scan_ccb->ccb_h.path = newpath;
-   scan_ccb->ccb_h.func_code = XPT_SCAN_BUS;
-   scan_ccb->crcn.flags = 0;
-   xpt_rescan(scan_ccb);
+   if (scan_ccb != NULL) {
+   scan_ccb->ccb_h.path = newpath;
+   scan_ccb->ccb_h.func_code = XPT_SCAN_TGT;
+   scan_ccb->crcn.flags = 0;
+   xpt_rescan(scan_ccb);
+   } else
+   xpt_print(newpath,
+   "Can't allocate CCB to rescan target\n");
}
}
 

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Mon Jul 15 18:02:26 2013(r253369)
+++ head/sys/cam/cam_xpt.c  Mon Jul 15 18:17:31 2013(r253370)
@@ -3900,10 +3900,13 @@ xpt_bus_register(struct cam_sim *sim, de
xpt_async(AC_PATH_REGISTERED, path, &cpi);
/* Initiate bus rescan. */
scan_ccb = xpt_alloc_ccb_nowait();
-   scan_ccb->ccb_h.path = path;
-   scan_ccb->ccb_h.func_code = XPT_SCAN_BUS;
-   scan_ccb->crcn.flags = 0;
-   xpt_rescan(scan_ccb);
+   if (scan_ccb != NULL) {
+   scan_ccb->ccb_h.path = path;
+   scan_ccb->ccb_h.func_code = XPT_SCAN_BUS;
+   scan_ccb->crcn.flags = 0;
+   xpt_rescan(scan_ccb);
+   } else
+   xpt_print(path, "Can't allocate CCB to scan bus\n");
} else
xpt_free_path(path);
return (CAM_SUCCESS);

Modified: head/sys/cam/scsi/scsi_xpt.c
==
--- head/sys/cam/scsi/scsi_xpt.cMon Jul 15 18:02:26 2013
(r253369)
+++ head/sys/cam/scsi/scsi_xpt.cMon Jul 15 18:17:31 2013
(r253370)
@@ -1881,8 +1881,8 @@ scsi_scan_bus(struct cam_periph *periph,
if ((work_ccb->cpi.hba_inquiry &
(PI_WIDE_32|PI_WIDE_16|PI_SDTR_ABLE)) &&
!(work_ccb->cpi.hba_misc & PIM_NOBUSRESET) &&
-   !timevalisset(&request_ccb->ccb_h.path->bus->last_reset)) {
-   reset_ccb = xpt_alloc_ccb_nowait();
+   !timevalisset(&request_ccb->ccb_h.path->bus->last_reset) &&
+   (reset_ccb = xpt_alloc_ccb_nowait()) != NULL) {
xpt_setup_ccb(&reset_ccb->ccb_h, 
request_ccb->ccb_h.path,
  CAM_PRIORITY_NONE);
reset_ccb->ccb_h.func_code = XPT_RESET_BUS;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r253314 - head/sys/net

2013-07-15 Thread Adrian Chadd
Yup and they will be turned into per-interface ioctls before I merge it into -9.

Thanks!


-adrian

On 15 July 2013 02:47, Gleb Smirnoff  wrote:
> On Sat, Jul 13, 2013 at 04:25:03AM +, Adrian Chadd wrote:
> A> Author: adrian
> A> Date: Sat Jul 13 04:25:03 2013
> A> New Revision: 253314
> A> URL: http://svnweb.freebsd.org/changeset/base/253314
> A>
> A> Log:
> A>   Bring over some link aggregation / LACP protocol improvements and 
> debugging
> A>   additions.
> A>
> A>   * Add some new tracing events to aid in debugging.
> A>   * Add in a debugging mode to drop transmit and received frames, 
> specifically
> A> to test whether seeing or hearing heartbeats correctly cause LACP to
> A> drop the port.
> A>   * Add in (and make default) a strict LACP mode, which requires the
> A> heartbeat on a port to be heard before it's used.  Sometimes vendor 
> ports
> A> will hang but the link layer stays up, resulting in hung traffic.
> A>   * Add logging the number of link status flaps, again to aid in debugging
> A> badly behaving switch ports.
> A>   * Calculate the lagg interface port speed as the multiple of the
> A> configured ports, rather than the largest.
>
> Having the txtest, rxtest and lacp_strict a global sysctls makes them
> useless on a box that has more than one aggregate interface. Turning
> test on will down all laggs on a box.
>
> IMO, these should be ioctls that can be configured per-interface via
> ifconfig, and in perfect case documented in ifconfig.8.
>
> --
> Totus tuus, Glebius.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r253322 - in head/sys/cam: . scsi

2013-07-15 Thread Alexander Motin

On 15.07.2013 17:48, Ulrich Spörlein wrote:

On Sat, 2013-07-13 at 13:35:10 +, Alexander Motin wrote:

Author: mav
Date: Sat Jul 13 13:35:09 2013
New Revision: 253322
URL: http://svnweb.freebsd.org/changeset/base/253322

Log:
   Improve handling of 0x3F/0x0E "Reported LUNs data has changed" and 0x25/0x00
   "Logical unit not supported" errors.  First initiates specific target rescan,
   second -- destroys specific LUN.  That allows to automatically detect changes
   in list of device LUNs.  This mechanism doesn't work when target is 
completely
   idle, but probably that is all what can be done without active polling.

   Reviewed by: ken
   Sponsored by:iXsystems, Inc.

Modified:
   head/sys/cam/cam_periph.c
   head/sys/cam/scsi/scsi_all.c
   head/sys/cam/scsi/scsi_all.h

Modified: head/sys/cam/cam_periph.c
==
@@ -1761,12 +1759,25 @@ cam_periph_error(union ccb *ccb, cam_fla
xpt_async(AC_LOST_DEVICE, newpath, NULL);
xpt_free_path(newpath);
}
+   }

/* Broadcast UNIT ATTENTIONs to all periphs. */
-   } else if (scsi_extract_sense_ccb(ccb,
-   &error_code, &sense_key, &asc, &ascq) &&
-   sense_key == SSD_KEY_UNIT_ATTENTION) {
+   if ((action & SSQ_UA) != 0)
xpt_async(AC_UNIT_ATTENTION, orig_ccb->ccb_h.path, orig_ccb);
+
+   /* Rescan target on "Reported LUNs data has changed" */
+   if ((action & SSQ_RESCAN) != 0) {
+   if (xpt_create_path(&newpath, NULL,
+   xpt_path_path_id(ccb->ccb_h.path),
+   xpt_path_target_id(ccb->ccb_h.path),
+   -1) == CAM_REQ_CMP) {
+
+   scan_ccb = xpt_alloc_ccb_nowait();
+   scan_ccb->ccb_h.path = newpath;
+   scan_ccb->ccb_h.func_CODe = XPT_SCAN_BUS;
+   scan_ccb->crcn.flags = 0;
+   xpt_rescan(scan_ccb);
+   }
}

/* Attempt a retry */



This introduces a possible NULL dereference. xpt_alloc_ccb_nowait() may
return NULL. Coverity reports that this is checked for NULL returns 31
out of 36 times. Please grep over the tree and fix this plus the other 4
locations where this is not being null-checked. Thanks!

This has no CID yet (they run a background check that merges and
assigns CIDs, and this is a fresh run ...)


Thank you. That was a copy-paste of the existing code. I am testing fix 
for three alike cases I've found in CAM.


--
Alexander Motin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r253274 - head/sys/cam/scsi

2013-07-15 Thread Kenneth D. Merry
On Mon, Jul 15, 2013 at 17:14:00 +0200, Ulrich Sp??rlein wrote:
> On Fri, 2013-07-12 at 17:09:50 +, Kenneth D. Merry wrote:
> > Author: ken
> > Date: Fri Jul 12 17:09:50 2013
> > New Revision: 253274
> > URL: http://svnweb.freebsd.org/changeset/base/253274
> > 
> > Log:
> >   Fix a problem with READ ELEMENT STATUS that occurs on some
> >   changers that don't support the DVCID and CURDATA bits that were
> >   introduced in the SMC spec.
> >   
> >   These changers will return an Illegal Request type error if the
> >   bits are set.  This causes "chio status" to fail.
> >   
> >   The fix is two-fold.  First, for changers that claim to be SCSI-2
> >   or older, don't set the DVCID and CURDATA bits for READ ELEMENT
> >   STATUS.  For newer changers (SCSI-3 and newer), we default to
> >   setting the new bits, but back off and try the READ ELEMENT STATUS
> >   without the bits if we get an Illegal Request type error.
> >   
> >   This has been tested on a Qualstar TLS-8211, which is a SCSI-2
> >   changer that does not support the new bits, and a Spectra T-380,
> >   which is a SCSI-3 changer that does support the new bits.  In the
> >   absence of a SCSI-3 changer that does not support the bits, I
> >   tested that with some error injection code.  (The SMC spec says
> >   that support for CURDATA is mandatory, and DVCID is optional.)
> >   
> >   scsi_ch.c:Add a new quirk, CH_Q_NO_DVCID that gets set for
> > SCSI-2 and older libraries, or newer libraries that
> > report errors when the DVCID/CURDATA bits are set.
> >   
> > In chgetelemstatus(), use the new quirk to
> > determine whether or not to set DVCID and CURDATA.
> > If we get an error with the bits set, back off and
> > try without the bits.  Set the quirk flag if the
> > read element status succeeds without the bits set.
> >   
> > Increase the READ ELEMENT STATUS timeout to 60
> > seconds after testing with a Spectra T-380.  The
> > previous value was 10 seconds, and too short for
> > the T-380.  This may be decreased later after
> > some additional testing and investigation.
> >   
> >   Tested by:Andre Albsmeier 
> >   Sponsored by: Spectra Logic
> >   MFC after:3 days
> > 
> > Modified:
> >   head/sys/cam/scsi/scsi_ch.c
> > 
> > Modified: head/sys/cam/scsi/scsi_ch.c
> > ==
> > --- head/sys/cam/scsi/scsi_ch.c Fri Jul 12 16:41:58 2013
> > (r253273)
> > +++ head/sys/cam/scsi/scsi_ch.c Fri Jul 12 17:09:50 2013
> > (r253274)
> > @@ -1284,8 +1342,8 @@ chgetelemstatus(struct cam_periph *perip
> >  /* voltag */ want_voltags,
> >  /* sea */ softc->sc_firsts[chet]
> >  + cesr->cesr_element_base,
> > -/* dvcid */ 1,
> > -/* curdata */ 1,
> > +/* dvcid */ dvcid,
> > +/* curdata */ curdata,
> >  /* count */ cesr->cesr_element_count,
> >  /* data_ptr */ data,
> >  /* dxfer_len */ size,
> 
> Are you sure? Coverity flags this as being in the wrong argument order
> (there's no CID for this yet).
> 
> CID null (#2 of 2): Arguments in wrong order (SWAPPED_ARGUMENTS)
> swapped_arguments: The positions of arguments curdata and dvcid are 
> inconsistent with the positions of the corresponding parameters for 
> "scsi_read_element_status(struct ccb_scsiio *, u_int32_t, void (*)(struct 
> cam_periph *, union ccb *), u_int8_t, int, u_int32_t, int, int, u_int32_t, 
> u_int8_t *, u_int32_t, u_int8_t, u_int32_t)". [show details]
> 1338scsi_read_element_status(&ccb->csio,
> 1339 /* retries */ 1,
> 1340 /* cbfcnp */ chdone,
> 1341 /* tag_action */ MSG_SIMPLE_Q_TAG,
> 1342 /* voltag */ want_voltags,
> 1343 /* sea */ softc->sc_firsts[chet]
> 1344 + cesr->cesr_element_base,
> 1345 /* dvcid */ dvcid,
> 1346 /* curdata */ curdata,
> 1347 /* count */ cesr->cesr_element_count,
> 1348 /* data_ptr */ data,
> 1349 /* dxfer_len */ size,
> 1350 /* sense_len */ SSD_FULL_SIZE,
> 1351 /* timeout */ 
> CH_TIMEOUT_READ_ELEMENT_STATUS);
> 
> And this is the definition:
> 
> 1860void
> 1861scsi_read_element_status(struct ccb_scsiio *csio, u_int32_t retries,
> 1862 void (*cbfcnp)(struct cam_periph *, union ccb 

svn commit: r253368 - head/sys/cam/scsi

2013-07-15 Thread Kenneth D. Merry
Author: ken
Date: Mon Jul 15 16:38:48 2013
New Revision: 253368
URL: http://svnweb.freebsd.org/changeset/base/253368

Log:
  Fix an argument reversal in calls to scsi_read_element_status().
  
  Reported by:  Ulrich Spoerlein 
  MFC after:3 days

Modified:
  head/sys/cam/scsi/scsi_ch.c

Modified: head/sys/cam/scsi/scsi_ch.c
==
--- head/sys/cam/scsi/scsi_ch.c Mon Jul 15 15:40:57 2013(r253367)
+++ head/sys/cam/scsi/scsi_ch.c Mon Jul 15 16:38:48 2013(r253368)
@@ -1274,8 +1274,8 @@ retry_einval:
 /* tag_action */ MSG_SIMPLE_Q_TAG,
 /* voltag */ want_voltags,
 /* sea */ softc->sc_firsts[chet],
-/* dvcid */ dvcid,
 /* curdata */ curdata,
+/* dvcid */ dvcid,
 /* count */ 1,
 /* data_ptr */ data,
 /* dxfer_len */ 1024,
@@ -1342,8 +1342,8 @@ retry_einval:
 /* voltag */ want_voltags,
 /* sea */ softc->sc_firsts[chet]
 + cesr->cesr_element_base,
-/* dvcid */ dvcid,
 /* curdata */ curdata,
+/* dvcid */ dvcid,
 /* count */ cesr->cesr_element_count,
 /* data_ptr */ data,
 /* dxfer_len */ size,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253367 - in head/sys: i386/i386 mips/mips powerpc/powerpc sparc64/sparc64

2013-07-15 Thread Andrey V. Elsukov
Author: ae
Date: Mon Jul 15 15:40:57 2013
New Revision: 253367
URL: http://svnweb.freebsd.org/changeset/base/253367

Log:
  Include sys/systm.h after sys/param.h.
  
  Suggested by: pluknet

Modified:
  head/sys/i386/i386/uio_machdep.c
  head/sys/mips/mips/uio_machdep.c
  head/sys/powerpc/powerpc/uio_machdep.c
  head/sys/sparc64/sparc64/uio_machdep.c

Modified: head/sys/i386/i386/uio_machdep.c
==
--- head/sys/i386/i386/uio_machdep.cMon Jul 15 15:38:16 2013
(r253366)
+++ head/sys/i386/i386/uio_machdep.cMon Jul 15 15:40:57 2013
(r253367)
@@ -39,13 +39,13 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 

Modified: head/sys/mips/mips/uio_machdep.c
==
--- head/sys/mips/mips/uio_machdep.cMon Jul 15 15:38:16 2013
(r253366)
+++ head/sys/mips/mips/uio_machdep.cMon Jul 15 15:40:57 2013
(r253367)
@@ -39,12 +39,12 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 

Modified: head/sys/powerpc/powerpc/uio_machdep.c
==
--- head/sys/powerpc/powerpc/uio_machdep.c  Mon Jul 15 15:38:16 2013
(r253366)
+++ head/sys/powerpc/powerpc/uio_machdep.c  Mon Jul 15 15:40:57 2013
(r253367)
@@ -39,11 +39,11 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 

Modified: head/sys/sparc64/sparc64/uio_machdep.c
==
--- head/sys/sparc64/sparc64/uio_machdep.c  Mon Jul 15 15:38:16 2013
(r253366)
+++ head/sys/sparc64/sparc64/uio_machdep.c  Mon Jul 15 15:40:57 2013
(r253367)
@@ -39,12 +39,12 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r253274 - head/sys/cam/scsi

2013-07-15 Thread Ulrich Spörlein
On Fri, 2013-07-12 at 17:09:50 +, Kenneth D. Merry wrote:
> Author: ken
> Date: Fri Jul 12 17:09:50 2013
> New Revision: 253274
> URL: http://svnweb.freebsd.org/changeset/base/253274
> 
> Log:
>   Fix a problem with READ ELEMENT STATUS that occurs on some
>   changers that don't support the DVCID and CURDATA bits that were
>   introduced in the SMC spec.
>   
>   These changers will return an Illegal Request type error if the
>   bits are set.  This causes "chio status" to fail.
>   
>   The fix is two-fold.  First, for changers that claim to be SCSI-2
>   or older, don't set the DVCID and CURDATA bits for READ ELEMENT
>   STATUS.  For newer changers (SCSI-3 and newer), we default to
>   setting the new bits, but back off and try the READ ELEMENT STATUS
>   without the bits if we get an Illegal Request type error.
>   
>   This has been tested on a Qualstar TLS-8211, which is a SCSI-2
>   changer that does not support the new bits, and a Spectra T-380,
>   which is a SCSI-3 changer that does support the new bits.  In the
>   absence of a SCSI-3 changer that does not support the bits, I
>   tested that with some error injection code.  (The SMC spec says
>   that support for CURDATA is mandatory, and DVCID is optional.)
>   
>   scsi_ch.c:  Add a new quirk, CH_Q_NO_DVCID that gets set for
>   SCSI-2 and older libraries, or newer libraries that
>   report errors when the DVCID/CURDATA bits are set.
>   
>   In chgetelemstatus(), use the new quirk to
>   determine whether or not to set DVCID and CURDATA.
>   If we get an error with the bits set, back off and
>   try without the bits.  Set the quirk flag if the
>   read element status succeeds without the bits set.
>   
>   Increase the READ ELEMENT STATUS timeout to 60
>   seconds after testing with a Spectra T-380.  The
>   previous value was 10 seconds, and too short for
>   the T-380.  This may be decreased later after
>   some additional testing and investigation.
>   
>   Tested by:  Andre Albsmeier 
>   Sponsored by:   Spectra Logic
>   MFC after:  3 days
> 
> Modified:
>   head/sys/cam/scsi/scsi_ch.c
> 
> Modified: head/sys/cam/scsi/scsi_ch.c
> ==
> --- head/sys/cam/scsi/scsi_ch.c   Fri Jul 12 16:41:58 2013
> (r253273)
> +++ head/sys/cam/scsi/scsi_ch.c   Fri Jul 12 17:09:50 2013
> (r253274)
> @@ -1284,8 +1342,8 @@ chgetelemstatus(struct cam_periph *perip
>/* voltag */ want_voltags,
>/* sea */ softc->sc_firsts[chet]
>+ cesr->cesr_element_base,
> -  /* dvcid */ 1,
> -  /* curdata */ 1,
> +  /* dvcid */ dvcid,
> +  /* curdata */ curdata,
>/* count */ cesr->cesr_element_count,
>/* data_ptr */ data,
>/* dxfer_len */ size,

Are you sure? Coverity flags this as being in the wrong argument order
(there's no CID for this yet).

CID null (#2 of 2): Arguments in wrong order (SWAPPED_ARGUMENTS)
swapped_arguments: The positions of arguments curdata and dvcid are 
inconsistent with the positions of the corresponding parameters for 
"scsi_read_element_status(struct ccb_scsiio *, u_int32_t, void (*)(struct 
cam_periph *, union ccb *), u_int8_t, int, u_int32_t, int, int, u_int32_t, 
u_int8_t *, u_int32_t, u_int8_t, u_int32_t)". [show details]
1338scsi_read_element_status(&ccb->csio,
1339 /* retries */ 1,
1340 /* cbfcnp */ chdone,
1341 /* tag_action */ MSG_SIMPLE_Q_TAG,
1342 /* voltag */ want_voltags,
1343 /* sea */ softc->sc_firsts[chet]
1344 + cesr->cesr_element_base,
1345 /* dvcid */ dvcid,
1346 /* curdata */ curdata,
1347 /* count */ cesr->cesr_element_count,
1348 /* data_ptr */ data,
1349 /* dxfer_len */ size,
1350 /* sense_len */ SSD_FULL_SIZE,
1351 /* timeout */ 
CH_TIMEOUT_READ_ELEMENT_STATUS);

And this is the definition:

1860void
1861scsi_read_element_status(struct ccb_scsiio *csio, u_int32_t retries,
1862 void (*cbfcnp)(struct cam_periph *, union ccb *),
1863 u_int8_t tag_action, int voltag, u_int32_t sea,
1864 int curdata, int dvcid,
1865 u_int32_t count, u_int8_t *data_ptr,
1866

Re: svn commit: r253322 - in head/sys/cam: . scsi

2013-07-15 Thread Ulrich Spörlein
On Sat, 2013-07-13 at 13:35:10 +, Alexander Motin wrote:
> Author: mav
> Date: Sat Jul 13 13:35:09 2013
> New Revision: 253322
> URL: http://svnweb.freebsd.org/changeset/base/253322
> 
> Log:
>   Improve handling of 0x3F/0x0E "Reported LUNs data has changed" and 0x25/0x00
>   "Logical unit not supported" errors.  First initiates specific target 
> rescan,
>   second -- destroys specific LUN.  That allows to automatically detect 
> changes
>   in list of device LUNs.  This mechanism doesn't work when target is 
> completely
>   idle, but probably that is all what can be done without active polling.
>   
>   Reviewed by:ken
>   Sponsored by:   iXsystems, Inc.
> 
> Modified:
>   head/sys/cam/cam_periph.c
>   head/sys/cam/scsi/scsi_all.c
>   head/sys/cam/scsi/scsi_all.h
> 
> Modified: head/sys/cam/cam_periph.c
> ==
> @@ -1761,12 +1759,25 @@ cam_periph_error(union ccb *ccb, cam_fla
>   xpt_async(AC_LOST_DEVICE, newpath, NULL);
>   xpt_free_path(newpath);
>   }
> + }
>  
>   /* Broadcast UNIT ATTENTIONs to all periphs. */
> - } else if (scsi_extract_sense_ccb(ccb,
> - &error_code, &sense_key, &asc, &ascq) &&
> - sense_key == SSD_KEY_UNIT_ATTENTION) {
> + if ((action & SSQ_UA) != 0)
>   xpt_async(AC_UNIT_ATTENTION, orig_ccb->ccb_h.path, orig_ccb);
> +
> + /* Rescan target on "Reported LUNs data has changed" */
> + if ((action & SSQ_RESCAN) != 0) {
> + if (xpt_create_path(&newpath, NULL,
> + xpt_path_path_id(ccb->ccb_h.path),
> + xpt_path_target_id(ccb->ccb_h.path),
> + -1) == CAM_REQ_CMP) {
> +
> + scan_ccb = xpt_alloc_ccb_nowait();
> + scan_ccb->ccb_h.path = newpath;
> + scan_ccb->ccb_h.func_CODe = XPT_SCAN_BUS;
> + scan_ccb->crcn.flags = 0;
> + xpt_rescan(scan_ccb);
> + }
>   }
>  
>   /* Attempt a retry */
> 

This introduces a possible NULL dereference. xpt_alloc_ccb_nowait() may
return NULL. Coverity reports that this is checked for NULL returns 31
out of 36 times. Please grep over the tree and fix this plus the other 4
locations where this is not being null-checked. Thanks!

This has no CID yet (they run a background check that merges and
assigns CIDs, and this is a fresh run ...)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253362 - head/share/man/man4

2013-07-15 Thread Sergey Kandaurov
Author: pluknet
Date: Mon Jul 15 14:28:59 2013
New Revision: 253362
URL: http://svnweb.freebsd.org/changeset/base/253362

Log:
  Add IBM ServeRAID M5110 to the hardware list.
  This is a rebranded MegaRAID SAS 2208 [Thunderbolt] found e.g. on x3550 M4.
  
  Reported by:  Ilia Noskov 
  MFC after:3 days

Modified:
  head/share/man/man4/mfi.4

Modified: head/share/man/man4/mfi.4
==
--- head/share/man/man4/mfi.4   Mon Jul 15 12:18:36 2013(r253361)
+++ head/share/man/man4/mfi.4   Mon Jul 15 14:28:59 2013(r253362)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 24, 2013
+.Dd July 15, 2013
 .Dt MFI 4
 .Os
 .Sh NAME
@@ -99,6 +99,8 @@ IBM ServeRAID M1115 SAS/SATA
 .It
 IBM ServeRAID M5015 SAS/SATA
 .It
+IBM ServeRAID M5110 SAS/SATA
+.It
 IBM ServeRAID-MR10i
 .It
 Intel RAID Controller SRCSAS18E
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253361 - in head/sys: i386/i386 kern sys

2013-07-15 Thread Gleb Smirnoff
Author: glebius
Date: Mon Jul 15 12:18:36 2013
New Revision: 253361
URL: http://svnweb.freebsd.org/changeset/base/253361

Log:
  Nuke mbstat. It wasn't used for mbuf statistics since FreeBSD 5.
  
  Now that r253351 moved sendfile() stats to a separate struct, the
  last field used in mbstat is m_mcfail, which is updated, but never
  read or obtained from userland.

Modified:
  head/sys/i386/i386/symbols.raw
  head/sys/kern/kern_mbuf.c
  head/sys/kern/uipc_mbuf.c
  head/sys/sys/mbuf.h

Modified: head/sys/i386/i386/symbols.raw
==
--- head/sys/i386/i386/symbols.raw  Mon Jul 15 12:15:14 2013
(r253360)
+++ head/sys/i386/i386/symbols.raw  Mon Jul 15 12:18:36 2013
(r253361)
@@ -43,7 +43,6 @@
_averunnable
_boottime
 #netstat
-   _mbstat
_ipstat
_tcb
_tcpstat

Modified: head/sys/kern/kern_mbuf.c
==
--- head/sys/kern/kern_mbuf.c   Mon Jul 15 12:15:14 2013(r253360)
+++ head/sys/kern/kern_mbuf.c   Mon Jul 15 12:18:36 2013(r253361)
@@ -102,7 +102,6 @@ int nmbclusters;/* limits number of mb
 int nmbjumbop; /* limits number of page size jumbo clusters */
 int nmbjumbo9; /* limits number of 9k jumbo clusters */
 int nmbjumbo16;/* limits number of 16k jumbo clusters 
*/
-struct mbstat mbstat;
 
 static quad_t maxmbufmem;  /* overall real memory limit for all mbufs */
 
@@ -262,9 +261,6 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbufs,
 &nmbufs, 0, sysctl_nmbufs, "IU",
 "Maximum number of mbufs allowed");
 
-SYSCTL_STRUCT(_kern_ipc, OID_AUTO, mbstat, CTLFLAG_RD, &mbstat, mbstat,
-"Mbuf general information and statistics");
-
 /*
  * Zones from which we allocate.
  */
@@ -384,23 +380,6 @@ mbuf_init(void *dummy)
 */
EVENTHANDLER_REGISTER(vm_lowmem, mb_reclaim, NULL,
EVENTHANDLER_PRI_FIRST);
-
-   /*
-* [Re]set counters and local statistics knobs.
-* XXX Some of these should go and be replaced, but UMA stat
-* gathering needs to be revised.
-*/
-   mbstat.m_mbufs = 0;
-   mbstat.m_mclusts = 0;
-   mbstat.m_drain = 0;
-   mbstat.m_msize = MSIZE;
-   mbstat.m_mclbytes = MCLBYTES;
-   mbstat.m_minclsize = MINCLSIZE;
-   mbstat.m_mlen = MLEN;
-   mbstat.m_mhlen = MHLEN;
-   mbstat.m_numtypes = MT_NTYPES;
-
-   mbstat.m_mcfail = mbstat.m_mpfail = 0;
 }
 SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL);
 

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Mon Jul 15 12:15:14 2013(r253360)
+++ head/sys/kern/uipc_mbuf.c   Mon Jul 15 12:18:36 2013(r253361)
@@ -649,13 +649,10 @@ m_copym(struct mbuf *m, int off0, int le
m = m->m_next;
np = &n->m_next;
}
-   if (top == NULL)
-   mbstat.m_mcfail++;  /* XXX: No consistency. */
 
return (top);
 nospace:
m_freem(top);
-   mbstat.m_mcfail++;  /* XXX: No consistency. */
return (NULL);
 }
 
@@ -860,7 +857,6 @@ m_copypacket(struct mbuf *m, int how)
return top;
 nospace:
m_freem(top);
-   mbstat.m_mcfail++;  /* XXX: No consistency. */ 
return (NULL);
 }
 
@@ -964,7 +960,6 @@ m_dup(struct mbuf *m, int how)
 
 nospace:
m_freem(top);
-   mbstat.m_mcfail++;  /* XXX: No consistency. */
return (NULL);
 }
 
@@ -1124,7 +1119,6 @@ m_pullup(struct mbuf *n, int len)
return (m);
 bad:
m_freem(n);
-   mbstat.m_mpfail++;  /* XXX: No consistency. */
return (NULL);
 }
 

Modified: head/sys/sys/mbuf.h
==
--- head/sys/sys/mbuf.h Mon Jul 15 12:15:14 2013(r253360)
+++ head/sys/sys/mbuf.h Mon Jul 15 12:18:36 2013(r253361)
@@ -317,31 +317,6 @@ struct mbuf {
 #define MB_NOTAGS  0x1UL   /* no tags attached to mbuf */
 
 /*
- * General mbuf allocator statistics structure.
- *
- * Many of these statistics are no longer used; we instead track many
- * allocator statistics through UMA's built in statistics mechanism.
- */
-struct mbstat {
-   u_long  m_mbufs;/* XXX */
-   u_long  m_mclusts;  /* XXX */
-
-   u_long  m_drain;/* times drained protocols for space */
-   u_long  m_mcfail;   /* XXX: times m_copym failed */
-   u_long  m_mpfail;   /* XXX: times m_pullup failed */
-   u_long  m_msize;/* length of an mbuf */
-   u_long  m_mclbytes; /* length of an mbuf cluster */
-   u_long  m_minclsize;/* min length of data to allocate a cluster */
-   u_long  m_mlen; /* length of data in an mbuf */
-   u_long  m_mhlen;/* length of dat

svn commit: r253360 - head/usr.bin/systat

2013-07-15 Thread Gleb Smirnoff
Author: glebius
Date: Mon Jul 15 12:15:14 2013
New Revision: 253360
URL: http://svnweb.freebsd.org/changeset/base/253360

Log:
  Nuke "systat -mbuf". It was broken since FreeBSD 5, and since there
  haven't been any complaints, no one used it.

Deleted:
  head/usr.bin/systat/mbufs.c
Modified:
  head/usr.bin/systat/Makefile
  head/usr.bin/systat/cmdtab.c
  head/usr.bin/systat/extern.h
  head/usr.bin/systat/systat.1

Modified: head/usr.bin/systat/Makefile
==
--- head/usr.bin/systat/MakefileMon Jul 15 11:45:58 2013
(r253359)
+++ head/usr.bin/systat/MakefileMon Jul 15 12:15:14 2013
(r253360)
@@ -5,7 +5,7 @@
 
 PROG=  systat
 SRCS=  cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c \
-   mbufs.c netcmds.c netstat.c pigs.c swap.c icmp.c \
+   netcmds.c netstat.c pigs.c swap.c icmp.c \
mode.c ip.c tcp.c \
vmstat.c convtbl.c ifcmds.c ifstat.c
 

Modified: head/usr.bin/systat/cmdtab.c
==
--- head/usr.bin/systat/cmdtab.cMon Jul 15 11:45:58 2013
(r253359)
+++ head/usr.bin/systat/cmdtab.cMon Jul 15 12:15:14 2013
(r253360)
@@ -46,9 +46,6 @@ structcmdtab cmdtab[] = {
{ "swap",   showswap,   fetchswap,  labelswap,
  initswap, openswap,   closeswap,  0,
  0,CF_LOADAV },
-   { "mbufs",  showmbufs,  fetchmbufs, labelmbufs,
- initmbufs,openmbufs,  closembufs, 0,
- 0,CF_LOADAV },
{ "iostat", showiostat, fetchiostat,labeliostat,
  initiostat,   openiostat, closeiostat,cmdiostat,
  0,CF_LOADAV },

Modified: head/usr.bin/systat/extern.h
==
--- head/usr.bin/systat/extern.hMon Jul 15 11:45:58 2013
(r253359)
+++ head/usr.bin/systat/extern.hMon Jul 15 12:15:14 2013
(r253360)
@@ -76,7 +76,6 @@ void   closeiostat(WINDOW *);
 voidcloseip(WINDOW *);
 voidcloseip6(WINDOW *);
 voidclosekre(WINDOW *);
-voidclosembufs(WINDOW *);
 voidclosenetstat(WINDOW *);
 voidclosepigs(WINDOW *);
 voidcloseswap(WINDOW *);
@@ -99,7 +98,6 @@ void   fetchip(void);
 voidfetchip6(void);
 voidfetchiostat(void);
 voidfetchkre(void);
-voidfetchmbufs(void);
 voidfetchnetstat(void);
 voidfetchpigs(void);
 voidfetchswap(void);
@@ -113,7 +111,6 @@ int  initip(void);
 int initip6(void);
 int initiostat(void);
 int initkre(void);
-int initmbufs(void);
 int initnetstat(void);
 int initpigs(void);
 int initswap(void);
@@ -127,7 +124,6 @@ void labelip(void);
 voidlabelip6(void);
 voidlabeliostat(void);
 voidlabelkre(void);
-voidlabelmbufs(void);
 voidlabelnetstat(void);
 voidlabelpigs(void);
 voidlabels(void);
@@ -143,7 +139,6 @@ WINDOW  *openip(void);
 WINDOW *openip6(void);
 WINDOW *openiostat(void);
 WINDOW *openkre(void);
-WINDOW *openmbufs(void);
 WINDOW *opennetstat(void);
 WINDOW *openpigs(void);
 WINDOW *openswap(void);
@@ -161,7 +156,6 @@ void showip(void);
 voidshowip6(void);
 voidshowiostat(void);
 voidshowkre(void);
-voidshowmbufs(void);
 voidshownetstat(void);
 voidshowpigs(void);
 voidshowswap(void);

Modified: head/usr.bin/systat/systat.1
==
--- head/usr.bin/systat/systat.1Mon Jul 15 11:45:58 2013
(r253359)
+++ head/usr.bin/systat/systat.1Mon Jul 15 12:15:14 2013
(r253360)
@@ -28,7 +28,7 @@
 .\"@(#)systat.18.2 (Berkeley) 12/30/93
 .\" $FreeBSD$
 .\"
-.Dd February 20, 2013
+.Dd July 15, 2013
 .Dt SYSTAT 1
 .Os
 .Sh NAME
@@ -67,7 +67,6 @@ statistics (a la
 .Xr iostat 8 ) ,
 virtual memory statistics (a la
 .Xr vmstat 8 ) ,
-network ``mbuf'' utilization,
 .Tn TCP/IP
 statistics,
 and network connections (a la
@@ -94,7 +93,6 @@ to be one of:
 .Ic iostat ,
 .Ic ip ,
 .Ic ip6 ,
-.Ic mbufs ,
 .Ic netstat ,
 .Ic pigs ,
 .Ic swap ,
@@ -280,9 +278,6 @@ the graph shows the percentage of space 
 If there are more than one swap partition in use,
 a total line is also shown.
 Areas known to the kernel, but not in use are shown as not available.
-.It Ic mbufs
-Display, in the lower window, the number of mbufs allocated
-for particular uses, i.e., data, socket structures, etc.
 .It Ic vmstat
 Take over the entire display and show a (rather crowded) compendium
 of statistics related to virtual memory usage, process scheduling,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r253314 - head/sys/net

2013-07-15 Thread Gleb Smirnoff
On Sat, Jul 13, 2013 at 04:25:03AM +, Adrian Chadd wrote:
A> Author: adrian
A> Date: Sat Jul 13 04:25:03 2013
A> New Revision: 253314
A> URL: http://svnweb.freebsd.org/changeset/base/253314
A> 
A> Log:
A>   Bring over some link aggregation / LACP protocol improvements and debugging
A>   additions.
A>   
A>   * Add some new tracing events to aid in debugging.
A>   * Add in a debugging mode to drop transmit and received frames, 
specifically
A> to test whether seeing or hearing heartbeats correctly cause LACP to
A> drop the port.
A>   * Add in (and make default) a strict LACP mode, which requires the
A> heartbeat on a port to be heard before it's used.  Sometimes vendor ports
A> will hang but the link layer stays up, resulting in hung traffic.
A>   * Add logging the number of link status flaps, again to aid in debugging
A> badly behaving switch ports.
A>   * Calculate the lagg interface port speed as the multiple of the
A> configured ports, rather than the largest.

Having the txtest, rxtest and lacp_strict a global sysctls makes them
useless on a box that has more than one aggregate interface. Turning
test on will down all laggs on a box.

IMO, these should be ioctls that can be configured per-interface via
ifconfig, and in perfect case documented in ifconfig.8.

-- 
Totus tuus, Glebius.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r253210 - in head/sys: conf netinet

2013-07-15 Thread Ulrich Spörlein
Hey Andre,

I don't see why this commit triggers it, but Coverity Scan found a new
resource leak in this file. syncache_expand() will leak *s when line
1071 is reached. The "failed:" case below correctly frees the resources.

1068/* how do we find the inp for the new socket? */
22. Condition "sc != &scs", taking true branch
1069if (sc != &scs)
1070syncache_free(sc);

CID null (#1 of 1): Resource leak (RESOURCE_LEAK)
23. leaked_storage: Variable "s" going out of scope leaks the storage it points 
to.
1071return (1);
1072failed:
1073if (sc != NULL && sc != &scs)
1074syncache_free(sc);
1075if (s != NULL)
1076free(s, M_TCPLOG);
1077*lsop = NULL;
1078return (0);
1079}

This has no CID yet ...

Cheers,
Uli
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253357 - head/etc/rc.d

2013-07-15 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Jul 15 08:48:45 2013
New Revision: 253357
URL: http://svnweb.freebsd.org/changeset/base/253357

Log:
  When stopping pfsync, remove the pfsync interface's syncpeer setting.
  
  MFC after:3 days

Modified:
  head/etc/rc.d/pfsync

Modified: head/etc/rc.d/pfsync
==
--- head/etc/rc.d/pfsyncMon Jul 15 07:26:41 2013(r253356)
+++ head/etc/rc.d/pfsyncMon Jul 15 08:48:45 2013(r253357)
@@ -42,7 +42,7 @@ pfsync_start()
 pfsync_stop()
 {
echo "Disabling pfsync."
-   ifconfig pfsync0 -syncdev down
+   ifconfig pfsync0 -syncdev -syncpeer down
 }
 
 load_rc_config $name
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253355 - in head/sys/arm: broadcom/bcm2835 conf

2013-07-15 Thread Rui Paulo
Author: rpaulo
Date: Mon Jul 15 07:01:30 2013
New Revision: 253355
URL: http://svnweb.freebsd.org/changeset/base/253355

Log:
  Move the Raspberry Pi low level options out of the kernel config and into
  std.rpi + std.bcm2835.
  
  Reviewed by:  imp

Added:
  head/sys/arm/broadcom/bcm2835/std.bcm2835   (contents, props changed)
  head/sys/arm/broadcom/bcm2835/std.rpi   (contents, props changed)
Modified:
  head/sys/arm/conf/RPI-B

Added: head/sys/arm/broadcom/bcm2835/std.bcm2835
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/broadcom/bcm2835/std.bcm2835   Mon Jul 15 07:01:30 2013
(r253355)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+machinearm armv6
+cpuCPU_ARM1176
+
+files  "../broadcom/bcm2835/files.bcm2835"
+

Added: head/sys/arm/broadcom/bcm2835/std.rpi
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/broadcom/bcm2835/std.rpi   Mon Jul 15 07:01:30 2013
(r253355)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+include"../broadcom/bcm2835/std.bcm2835"
+
+optionsKERNVIRTADDR=0xc010
+makeoptionsKERNVIRTADDR=0xc010
+optionsKERNPHYSADDR=0x0010
+makeoptionsKERNPHYSADDR=0x0010
+optionsPHYSADDR=0x
+optionsSTARTUP_PAGETABLE_ADDR=0x0100
+optionsFREEBSD_BOOT_LOADER
+optionsLINUX_BOOT_ABI

Modified: head/sys/arm/conf/RPI-B
==
--- head/sys/arm/conf/RPI-B Mon Jul 15 07:00:19 2013(r253354)
+++ head/sys/arm/conf/RPI-B Mon Jul 15 07:01:30 2013(r253355)
@@ -18,21 +18,10 @@
 # $FreeBSD$
 
 ident  RPI-B
-machinearm armv6
-cpuCPU_ARM1176
 
-files  "../broadcom/bcm2835/files.bcm2835"
+include"../broadcom/bcm2835/std.rpi"
 makeoptionsMODULES_OVERRIDE=""
 
-optionsKERNVIRTADDR=0xc010
-makeoptionsKERNVIRTADDR=0xc010
-optionsKERNPHYSADDR=0x0010
-makeoptionsKERNPHYSADDR=0x0010
-optionsPHYSADDR=0x
-optionsSTARTUP_PAGETABLE_ADDR=0x0100
-optionsFREEBSD_BOOT_LOADER
-optionsLINUX_BOOT_ABI
-
 makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols
 optionsHZ=100
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"