svn commit: r280208 - head/sys/ofed/include/linux

2015-03-18 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Mar 18 08:46:08 2015
New Revision: 280208
URL: https://svnweb.freebsd.org/changeset/base/280208

Log:
  Declare missing symbol and inline macro which is only used once.
  
  MFC after:2 weeks
  Sponsored by: Mellanox Technologies
  Submitted by: glebius@

Modified:
  head/sys/ofed/include/linux/linux_compat.c

Modified: head/sys/ofed/include/linux/linux_compat.c
==
--- head/sys/ofed/include/linux/linux_compat.c  Wed Mar 18 06:09:37 2015
(r280207)
+++ head/sys/ofed/include/linux/linux_compat.c  Wed Mar 18 08:46:08 2015
(r280208)
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -67,18 +68,13 @@ MALLOC_DEFINE(M_KMALLOC, "linux", "Linux
 #undef file
 #undef cdev
 #defineRB_ROOT(head)   (head)->rbh_root
-#undef LIST_HEAD
-/* From sys/queue.h */
-#define LIST_HEAD(name, type)  \
-struct name {  \
-   struct type *lh_first;  /* first element */ \
-}
 
 struct kobject class_root;
 struct device linux_rootdev;
 struct class miscclass;
 struct list_head pci_drivers;
 struct list_head pci_devices;
+struct net init_net;
 spinlock_t pci_lock;
 
 int
@@ -621,7 +617,9 @@ struct vmmap {
unsigned long   vm_size;
 };
 
-LIST_HEAD(vmmaphd, vmmap);
+struct vmmaphd {
+   struct vmmap *lh_first;
+};
 #defineVMMAP_HASH_SIZE 64
 #defineVMMAP_HASH_MASK (VMMAP_HASH_SIZE - 1)
 #defineVM_HASH(addr)   ((uintptr_t)(addr) >> PAGE_SHIFT) & 
VMMAP_HASH_MASK
___
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: r280210 - head/sys/ofed/include/linux

2015-03-18 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Mar 18 10:49:17 2015
New Revision: 280210
URL: https://svnweb.freebsd.org/changeset/base/280210

Log:
  Fix problems about 32-bit ticks wraparound and unsigned long
  conversion:
  - The linux compat API layer casts the ticks to unsigned long which
  might cause problems when the ticks value is negative.
  - Guard against already expired ticks values, by checking if the
  passed expiry tick is already elapsed.
  - While at it avoid referring the address of an inlined function.
  
  MFC after:3 days
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/linux/linux_compat.c
  head/sys/ofed/include/linux/timer.h

Modified: head/sys/ofed/include/linux/linux_compat.c
==
--- head/sys/ofed/include/linux/linux_compat.c  Wed Mar 18 09:39:31 2015
(r280209)
+++ head/sys/ofed/include/linux/linux_compat.c  Wed Mar 18 10:49:17 2015
(r280210)
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -77,6 +78,8 @@ struct list_head pci_devices;
 struct net init_net;
 spinlock_t pci_lock;
 
+unsigned long linux_timer_hz_mask;
+
 int
 panic_cmp(struct rb_node *one, struct rb_node *two)
 {
@@ -724,6 +727,60 @@ kasprintf(gfp_t gfp, const char *fmt, ..
return p;
 }
 
+static int
+linux_timer_jiffies_until(unsigned long expires)
+{
+   int delta = expires - jiffies;
+   /* guard against already expired values */
+   if (delta < 1)
+   delta = 1;
+   return (delta);
+}
+
+static void
+linux_timer_callback_wrapper(void *context)
+{
+   struct timer_list *timer;
+
+   timer = context;
+   timer->function(timer->data);
+}
+
+void
+mod_timer(struct timer_list *timer, unsigned long expires)
+{
+
+   timer->expires = expires;
+   callout_reset(&timer->timer_callout,  
+   linux_timer_jiffies_until(expires),
+   &linux_timer_callback_wrapper, timer);
+}
+
+void
+add_timer(struct timer_list *timer)
+{
+
+   callout_reset(&timer->timer_callout,
+   linux_timer_jiffies_until(timer->expires),
+   &linux_timer_callback_wrapper, timer);
+}
+
+static void
+linux_timer_init(void *arg)
+{
+
+   /*
+* Compute an internal HZ value which can divide 2**32 to
+* avoid timer rounding problems when the tick value wraps
+* around 2**32:
+*/
+   linux_timer_hz_mask = 1;
+   while (linux_timer_hz_mask < (unsigned long)hz)
+   linux_timer_hz_mask *= 2;
+   linux_timer_hz_mask--;
+}
+SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL);
+
 static void
 linux_compat_init(void)
 {

Modified: head/sys/ofed/include/linux/timer.h
==
--- head/sys/ofed/include/linux/timer.h Wed Mar 18 09:39:31 2015
(r280209)
+++ head/sys/ofed/include/linux/timer.h Wed Mar 18 10:49:17 2015
(r280210)
@@ -27,7 +27,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef _LINUX_TIMER_H_
-#define _LINUX_TIMER_H_
+#define_LINUX_TIMER_H_
 
 #include 
 
@@ -36,20 +36,13 @@
 #include 
 
 struct timer_list {
-   struct callout  timer_callout;
-   void(*function)(unsigned long);
-   unsigned long   data;
-   unsigned long   expires;
+   struct callout timer_callout;
+   void(*function) (unsigned long);
+   unsigned long data;
+   unsigned long expires;
 };
 
-static inline void
-_timer_fn(void *context)
-{
-   struct timer_list *timer;
-
-   timer = context;
-   timer->function(timer->data);
-}
+extern unsigned long linux_timer_hz_mask;
 
 #definesetup_timer(timer, func, dat)   
\
 do {   \
@@ -65,28 +58,15 @@ do {
\
callout_init(&(timer)->timer_callout, CALLOUT_MPSAFE);  \
 } while (0)
 
-#definemod_timer(timer, exp)   
\
-do {   \
-   (timer)->expires = (exp);   \
-   callout_reset(&(timer)->timer_callout, (exp) - jiffies, \
-   _timer_fn, (timer));\
-} while (0)
-
-#defineadd_timer(timer)
\
-   callout_reset(&(timer)->timer_callout,  \
-   (timer)->expires - jiffies, _timer_fn, (timer))
+extern void mod_timer(struct timer_list *, unsigned long);
+extern void add_timer(struct timer_list *);
 
 #definedel_timer(timer)callout_stop(&(timer)->timer_callout)
 #definedel_timer_sync(timer)   callout_drain(&(timer)->timer_callout)
-
 #define

svn commit: r280211 - head/sys/ofed/include/linux

2015-03-18 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Mar 18 10:50:10 2015
New Revision: 280211
URL: https://svnweb.freebsd.org/changeset/base/280211

Log:
  Add missing void pointer argument to SYSINIT() functions.
  
  MFC after:3 days
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/linux/linux_compat.c

Modified: head/sys/ofed/include/linux/linux_compat.c
==
--- head/sys/ofed/include/linux/linux_compat.c  Wed Mar 18 10:49:17 2015
(r280210)
+++ head/sys/ofed/include/linux/linux_compat.c  Wed Mar 18 10:50:10 2015
(r280211)
@@ -782,7 +782,7 @@ linux_timer_init(void *arg)
 SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL);
 
 static void
-linux_compat_init(void)
+linux_compat_init(void *arg)
 {
struct sysctl_oid *rootoid;
int i;
@@ -811,7 +811,7 @@ linux_compat_init(void)
 SYSINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_init, 
NULL);
 
 static void
-linux_compat_uninit(void)
+linux_compat_uninit(void *arg)
 {
kobject_kfree_name(&class_root);
kobject_kfree_name(&linux_rootdev.kobj);
___
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: r280218 - head/usr.bin/xlint/lint1

2015-03-18 Thread Ed Maste
Author: emaste
Date: Wed Mar 18 13:07:19 2015
New Revision: 280218
URL: https://svnweb.freebsd.org/changeset/base/280218

Log:
  xlint: add arm64 #define
  
  Submitted by: andrew@
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.bin/xlint/lint1/param.h

Modified: head/usr.bin/xlint/lint1/param.h
==
--- head/usr.bin/xlint/lint1/param.hWed Mar 18 13:01:09 2015
(r280217)
+++ head/usr.bin/xlint/lint1/param.hWed Mar 18 13:07:19 2015
(r280218)
@@ -95,6 +95,9 @@
 #elif __mips__
 #define PTRDIFF_IS_LONG0
 #define SIZEOF_IS_ULONG0
+#elif __aarch64__
+#define PTRDIFF_IS_LONG1
+#define SIZEOF_IS_ULONG1
 #else
 #error unknown machine type
 #endif
___
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: r280219 - head/lib/libc/gen

2015-03-18 Thread Andrew Turner
Author: andrew
Date: Wed Mar 18 13:54:53 2015
New Revision: 280219
URL: https://svnweb.freebsd.org/changeset/base/280219

Log:
  We won't support a.out on arm64/aarch64. As such there will be no need to
  support it in nlist(3).
  
  Reviewed by:  emaste
  Sponsored by: The FreeBSD Foundation

Modified:
  head/lib/libc/gen/nlist.c

Modified: head/lib/libc/gen/nlist.c
==
--- head/lib/libc/gen/nlist.c   Wed Mar 18 13:07:19 2015(r280218)
+++ head/lib/libc/gen/nlist.c   Wed Mar 18 13:54:53 2015(r280219)
@@ -47,7 +47,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include "un-namespace.h"
 
+/* There is no a.out support on arm64 */
+#ifndef __aarch64__
 #define _NLIST_DO_AOUT
+#endif
 #define _NLIST_DO_ELF
 
 #ifdef _NLIST_DO_ELF
___
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: r280220 - head/usr.bin/ldd

2015-03-18 Thread Andrew Turner
Author: andrew
Date: Wed Mar 18 13:59:04 2015
New Revision: 280220
URL: https://svnweb.freebsd.org/changeset/base/280220

Log:
  Allowus to exclude a.out support from ldd and use it with arm64 as it won't
  support the a.out format.
  
  Reviewed by:  emaste
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.bin/ldd/ldd.c

Modified: head/usr.bin/ldd/ldd.c
==
--- head/usr.bin/ldd/ldd.c  Wed Mar 18 13:54:53 2015(r280219)
+++ head/usr.bin/ldd/ldd.c  Wed Mar 18 13:59:04 2015(r280220)
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -49,6 +48,12 @@ __FBSDID("$FreeBSD$");
 
 #include "extern.h"
 
+/* We don't support a.out executables on arm64 */
+#ifndef __aarch64__
+#include 
+#defineAOUT_SUPPORTED
+#endif
+
 /*
  * 32-bit ELF data structures can only be used if the system header[s] declare
  * them.  There is no official macro for determining whether they are declared,
@@ -274,7 +279,9 @@ static int
 is_executable(const char *fname, int fd, int *is_shlib, int *type)
 {
union {
+#ifdef AOUT_SUPPORTED
struct exec aout;
+#endif
 #if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED)
Elf32_Ehdr elf32;
 #endif
@@ -290,6 +297,7 @@ is_executable(const char *fname, int fd,
return (0);
}
 
+#ifdef AOUT_SUPPORTED
if ((size_t)n >= sizeof(hdr.aout) && !N_BADMAG(hdr.aout)) {
/* a.out file */
if ((N_GETFLAG(hdr.aout) & EX_DPMASK) != EX_DYNAMIC
@@ -303,6 +311,7 @@ is_executable(const char *fname, int fd,
*type = TYPE_AOUT;
return (1);
}
+#endif
 
 #if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED)
if ((size_t)n >= sizeof(hdr.elf32) && IS_ELF(hdr.elf32) &&
___
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: r280219 - head/lib/libc/gen

2015-03-18 Thread John Baldwin
On Wednesday, March 18, 2015 01:54:54 PM Andrew Turner wrote:
> Author: andrew
> Date: Wed Mar 18 13:54:53 2015
> New Revision: 280219
> URL: https://svnweb.freebsd.org/changeset/base/280219
> 
> Log:
>   We won't support a.out on arm64/aarch64. As such there will be no need to
>   support it in nlist(3).

I wonder if this should be #ifdef __i386__ instead?  We've only had a.out 
binaries
and kernels for FreeBSD/i386 (3.0 was the first release to use ELF by default, 
and
I don't think Alpha was supported until 4.0).

-- 
John Baldwin
___
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: r280220 - head/usr.bin/ldd

2015-03-18 Thread John Baldwin
On Wednesday, March 18, 2015 01:59:05 PM Andrew Turner wrote:
> Author: andrew
> Date: Wed Mar 18 13:59:04 2015
> New Revision: 280220
> URL: https://svnweb.freebsd.org/changeset/base/280220
> 
> Log:
>   Allowus to exclude a.out support from ldd and use it with arm64 as it won't
>   support the a.out format.

Similarly here.  Perhaps it could also be enabled for amd64 to support running
old FreeBSD/i386 binaries, but there's no need for it on other arm, mips,
powerpc, sparc64, etc.

-- 
John Baldwin
___
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: r280221 - head/share/man/man4

2015-03-18 Thread Ian Lepore
Author: ian
Date: Wed Mar 18 14:49:16 2015
New Revision: 280221
URL: https://svnweb.freebsd.org/changeset/base/280221

Log:
  Update ucom(4) with information about the new PPS capture abilities.
  
  Differential Revision:https://reviews.freebsd.org/D2049

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

Modified: head/share/man/man4/ucom.4
==
--- head/share/man/man4/ucom.4  Wed Mar 18 13:59:04 2015(r280220)
+++ head/share/man/man4/ucom.4  Wed Mar 18 14:49:16 2015(r280221)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 3, 2014
+.Dd March 11, 2015
 .Dt UCOM 4
 .Os
 .Sh NAME
@@ -63,11 +63,34 @@ This means that normal programs such as
 or
 .Xr ppp 8
 can be used to access the device.
+.Sh Pulse Per Second (PPS) Timing Interface
+The
+.Nm
+driver can capture PPS timing information as defined in RFC 2783.
+The API, accessed via
+.Xr ioctl 8 ,
+is available on the tty device.
+To use the PPS capture feature with
+.Xr ntpd 8 ,
+symlink the tty device to
+.Va /dev/pps0.
 .Pp
 The
-.Va portno
-locater can be used to decide which port to use for devices that have
-multiple external ports.
+.Va hw.usb.ucom.pps_mode
+sysctl configures the PPS capture mode.
+It can be set in
+.Xr loader.conf 5
+or
+.Xr sysctl.conf 5 .
+The following capture modes are available:
+.Bl -tag -compact -offset "" -width ""
+.It 0
+Capture disabled (default).
+.It 1
+Capture pulses on the CTS line.
+.It 2
+Capture pulses on the DCD line.
+.El
 .Sh FILES
 .Bl -tag -width ".Pa /dev/cuaU?"
 .It Pa /dev/cuaU?
___
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: r280222 - head/sys/sys

2015-03-18 Thread John Baldwin
Author: jhb
Date: Wed Mar 18 14:51:03 2015
New Revision: 280222
URL: https://svnweb.freebsd.org/changeset/base/280222

Log:
  Clear an mbuf's external storage flags in m_extaddref(). They are cleared
  in other places that set the external storage type (ext_type) such as
  m_cljset(), m_extadd(), mb_ctor_clust(), and vn_sendfile().
  
  Differential Revision:https://reviews.freebsd.org/D2080
  Reviewed by:  np, glebius
  MFC after:2 weeks

Modified:
  head/sys/sys/mbuf.h

Modified: head/sys/sys/mbuf.h
==
--- head/sys/sys/mbuf.h Wed Mar 18 14:49:16 2015(r280221)
+++ head/sys/sys/mbuf.h Wed Mar 18 14:51:03 2015(r280222)
@@ -578,6 +578,7 @@ m_extaddref(struct mbuf *m, caddr_t buf,
m->m_ext.ext_arg1 = arg1;
m->m_ext.ext_arg2 = arg2;
m->m_ext.ext_type = EXT_EXTREF;
+   m->m_ext.ext_flags = 0;
 }
 
 static __inline uma_zone_t
___
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: r280219 - head/lib/libc/gen

2015-03-18 Thread Andrew Turner
On Wed, 18 Mar 2015 10:32:33 -0400
John Baldwin  wrote:

> On Wednesday, March 18, 2015 01:54:54 PM Andrew Turner wrote:
> > Author: andrew
> > Date: Wed Mar 18 13:54:53 2015
> > New Revision: 280219
> > URL: https://svnweb.freebsd.org/changeset/base/280219
> > 
> > Log:
> >   We won't support a.out on arm64/aarch64. As such there will be no
> > need to support it in nlist(3).
> 
> I wonder if this should be #ifdef __i386__ instead?  We've only had
> a.out binaries and kernels for FreeBSD/i386 (3.0 was the first
> release to use ELF by default, and I don't think Alpha was supported
> until 4.0).

I will leave this to someone who knows more about each architecture
than I do to decide. I would have no problem removing the a.out support
on 32-bit ARM, and I expect we can also do this on MIPS, PowerPC, and
Sparc64.

It may also pay to import the NetBSD version of this as they have split
out the different executable file formats to separate source files.
They also have a header to select which formats to support on each
platform.

Andrew
___
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: r280220 - head/usr.bin/ldd

2015-03-18 Thread Konstantin Belousov
On Wed, Mar 18, 2015 at 10:33:45AM -0400, John Baldwin wrote:
> On Wednesday, March 18, 2015 01:59:05 PM Andrew Turner wrote:
> > Author: andrew
> > Date: Wed Mar 18 13:59:04 2015
> > New Revision: 280220
> > URL: https://svnweb.freebsd.org/changeset/base/280220
> > 
> > Log:
> >   Allowus to exclude a.out support from ldd and use it with arm64 as it 
> > won't
> >   support the a.out format.
> 
> Similarly here.  Perhaps it could also be enabled for amd64 to support running
> old FreeBSD/i386 binaries, but there's no need for it on other arm, mips,
> powerpc, sparc64, etc.
> 
I do not think amd64 binary needs a.out support.  Only kernel components
and ldd32 need this, and for ldd32 build, the __i386__ preprocessor
symbol should be defined.
___
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: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv

2015-03-18 Thread Nathan Whitehorn



On 03/17/15 11:32, Jack F Vogel wrote:

Author: jfv
Date: Tue Mar 17 18:32:28 2015
New Revision: 280182
URL: https://svnweb.freebsd.org/changeset/base/280182

Log:
   Update to the Intel ixgbe driver:
- Split the driver into independent pf and vf loadables. This is
  in preparation for SRIOV support which will be following shortly.
  This also allows us to keep a seperate revision control over the
  two parts, making for easier sustaining.
- Make the TX/RX code a shared/seperated file, in the old code base
  the ixv code would miss fixes that went into ixgbe, this model
  will eliminate that problem.
- The driver loadables will now match the device names, something that
  has been requested for some time.
- Rather than a modules/ixgbe there is now modules/ix and modules/ixv
- It will also be possible to make your static kernel with only one
  or the other for streamlined installs, or both.
   
   Enjoy!
   
   Submitted by: jfv and erj


Added:
   head/sys/dev/ixgbe/if_ix.c   (contents, props changed)
   head/sys/dev/ixgbe/if_ixv.c   (contents, props changed)
   head/sys/dev/ixgbe/ix_txrx.c   (contents, props changed)
   head/sys/modules/ix/
   head/sys/modules/ix/Makefile   (contents, props changed)
   head/sys/modules/ixv/
   head/sys/modules/ixv/Makefile   (contents, props changed)
Deleted:
   head/sys/dev/ixgbe/ixgbe.c
   head/sys/dev/ixgbe/ixv.c
   head/sys/dev/ixgbe/ixv.h
   head/sys/modules/ixgbe/
Modified:
   head/sys/amd64/conf/GENERIC


Note that the mips OCTEON1 and PowerPC GENERIC64 config files also need 
to be changed here and are currently unbuildable.

-Nathan


   head/sys/conf/NOTES
   head/sys/conf/files
   head/sys/dev/ixgbe/LICENSE
   head/sys/dev/ixgbe/ixgbe.h
   head/sys/dev/ixgbe/ixgbe_82598.c
   head/sys/dev/ixgbe/ixgbe_82598.h
   head/sys/dev/ixgbe/ixgbe_82599.c
   head/sys/dev/ixgbe/ixgbe_82599.h
   head/sys/dev/ixgbe/ixgbe_api.c
   head/sys/dev/ixgbe/ixgbe_api.h
   head/sys/dev/ixgbe/ixgbe_common.c
   head/sys/dev/ixgbe/ixgbe_common.h
   head/sys/dev/ixgbe/ixgbe_dcb.c
   head/sys/dev/ixgbe/ixgbe_dcb.h
   head/sys/dev/ixgbe/ixgbe_dcb_82598.c
   head/sys/dev/ixgbe/ixgbe_dcb_82598.h
   head/sys/dev/ixgbe/ixgbe_dcb_82599.c
   head/sys/dev/ixgbe/ixgbe_dcb_82599.h
   head/sys/dev/ixgbe/ixgbe_mbx.c
   head/sys/dev/ixgbe/ixgbe_mbx.h
   head/sys/dev/ixgbe/ixgbe_phy.c
   head/sys/dev/ixgbe/ixgbe_phy.h
   head/sys/dev/ixgbe/ixgbe_type.h
   head/sys/dev/ixgbe/ixgbe_vf.c
   head/sys/dev/ixgbe/ixgbe_vf.h
   head/sys/dev/ixgbe/ixgbe_x540.c
   head/sys/dev/ixgbe/ixgbe_x540.h

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Tue Mar 17 15:48:19 2015(r280181)
+++ head/sys/amd64/conf/GENERIC Tue Mar 17 18:32:28 2015(r280182)
@@ -216,7 +216,8 @@ device  bxe # Broadcom 
NetXtreme II BC
  devicede  # DEC/Intel DC21x4x (``Tulip'')
  deviceem  # Intel PRO/1000 Gigabit 
Ethernet Family
  deviceigb # Intel PRO/1000 PCIE Server 
Gigabit Family
-device ixgbe   # Intel PRO/10GbE PCIE Ethernet Family
+device ix  # Intel PRO/10GbE PCIE PF Ethernet
+device ixv # Intel PRO/10GbE PCIE VF Ethernet
  deviceixl # Intel XL710 40Gbe PCIE 
Ethernet
  deviceixlv# Intel XL710 40Gbe VF PCIE 
Ethernet
  devicele  # AMD Am7900 LANCE and Am79C9xx 
PCnet

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Tue Mar 17 15:48:19 2015(r280181)
+++ head/sys/conf/NOTES Tue Mar 17 18:32:28 2015(r280182)
@@ -2100,7 +2100,8 @@ devicede  # DEC/Intel DC21x4x 
(``Tulip
  deviceem  # Intel Pro/1000 Gigabit Ethernet
  deviceigb # Intel Pro/1000 PCIE Gigabit Ethernet
  deviceixgb# Intel Pro/10Gbe PCI-X Ethernet
-device ixgbe   # Intel Pro/10Gbe PCIE Ethernet
+device ix  # Intel Pro/10Gbe PCIE Ethernet
+device ixv # Intel Pro/10Gbe PCIE Ethernet VF
  devicele  # AMD Am7900 LANCE and Am79C9xx PCnet
  devicemxge# Myricom Myri-10G 10GbE NIC
  devicenxge# Neterion Xframe 10GbE Server/Storage 
Adapter

Modified: head/sys/conf/files
==
--- head/sys/conf/files Tue Mar 17 15:48:19 2015(r280181)
+++ head/sys/conf/files Tue Mar 17 18:32:28 2015(r280182)
@@ -1769,31 +1769,31 @@ iwn6050.fw  

Re: svn commit: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv

2015-03-18 Thread Jack Vogel
OK, thanks for pointing that out, I'll include them.

On Wed, Mar 18, 2015 at 8:20 AM, Nathan Whitehorn 
wrote:

>
>
> On 03/17/15 11:32, Jack F Vogel wrote:
>
>> Author: jfv
>> Date: Tue Mar 17 18:32:28 2015
>> New Revision: 280182
>> URL: https://svnweb.freebsd.org/changeset/base/280182
>>
>> Log:
>>Update to the Intel ixgbe driver:
>> - Split the driver into independent pf and vf loadables. This is
>>   in preparation for SRIOV support which will be following
>> shortly.
>>   This also allows us to keep a seperate revision control over the
>>   two parts, making for easier sustaining.
>> - Make the TX/RX code a shared/seperated file, in the old code
>> base
>>   the ixv code would miss fixes that went into ixgbe, this model
>>   will eliminate that problem.
>> - The driver loadables will now match the device names, something
>> that
>>   has been requested for some time.
>> - Rather than a modules/ixgbe there is now modules/ix and
>> modules/ixv
>> - It will also be possible to make your static kernel with only
>> one
>>   or the other for streamlined installs, or both.
>>   Enjoy!
>>   Submitted by: jfv and erj
>>
>> Added:
>>head/sys/dev/ixgbe/if_ix.c   (contents, props changed)
>>head/sys/dev/ixgbe/if_ixv.c   (contents, props changed)
>>head/sys/dev/ixgbe/ix_txrx.c   (contents, props changed)
>>head/sys/modules/ix/
>>head/sys/modules/ix/Makefile   (contents, props changed)
>>head/sys/modules/ixv/
>>head/sys/modules/ixv/Makefile   (contents, props changed)
>> Deleted:
>>head/sys/dev/ixgbe/ixgbe.c
>>head/sys/dev/ixgbe/ixv.c
>>head/sys/dev/ixgbe/ixv.h
>>head/sys/modules/ixgbe/
>> Modified:
>>head/sys/amd64/conf/GENERIC
>>
>
> Note that the mips OCTEON1 and PowerPC GENERIC64 config files also need to
> be changed here and are currently unbuildable.
> -Nathan
>
>
> head/sys/conf/NOTES
>>head/sys/conf/files
>>head/sys/dev/ixgbe/LICENSE
>>head/sys/dev/ixgbe/ixgbe.h
>>head/sys/dev/ixgbe/ixgbe_82598.c
>>head/sys/dev/ixgbe/ixgbe_82598.h
>>head/sys/dev/ixgbe/ixgbe_82599.c
>>head/sys/dev/ixgbe/ixgbe_82599.h
>>head/sys/dev/ixgbe/ixgbe_api.c
>>head/sys/dev/ixgbe/ixgbe_api.h
>>head/sys/dev/ixgbe/ixgbe_common.c
>>head/sys/dev/ixgbe/ixgbe_common.h
>>head/sys/dev/ixgbe/ixgbe_dcb.c
>>head/sys/dev/ixgbe/ixgbe_dcb.h
>>head/sys/dev/ixgbe/ixgbe_dcb_82598.c
>>head/sys/dev/ixgbe/ixgbe_dcb_82598.h
>>head/sys/dev/ixgbe/ixgbe_dcb_82599.c
>>head/sys/dev/ixgbe/ixgbe_dcb_82599.h
>>head/sys/dev/ixgbe/ixgbe_mbx.c
>>head/sys/dev/ixgbe/ixgbe_mbx.h
>>head/sys/dev/ixgbe/ixgbe_phy.c
>>head/sys/dev/ixgbe/ixgbe_phy.h
>>head/sys/dev/ixgbe/ixgbe_type.h
>>head/sys/dev/ixgbe/ixgbe_vf.c
>>head/sys/dev/ixgbe/ixgbe_vf.h
>>head/sys/dev/ixgbe/ixgbe_x540.c
>>head/sys/dev/ixgbe/ixgbe_x540.h
>>
>> Modified: head/sys/amd64/conf/GENERIC
>> 
>> ==
>> --- head/sys/amd64/conf/GENERIC Tue Mar 17 15:48:19 2015(r280181)
>> +++ head/sys/amd64/conf/GENERIC Tue Mar 17 18:32:28 2015(r280182)
>> @@ -216,7 +216,8 @@ device  bxe #
>> Broadcom NetXtreme II BC
>>   devicede  # DEC/Intel DC21x4x
>> (``Tulip'')
>>   deviceem  # Intel PRO/1000 Gigabit
>> Ethernet Family
>>   deviceigb # Intel PRO/1000 PCIE
>> Server Gigabit Family
>> -device ixgbe   # Intel PRO/10GbE PCIE Ethernet
>> Family
>> +device ix  # Intel PRO/10GbE PCIE PF Ethernet
>> +device ixv # Intel PRO/10GbE PCIE VF Ethernet
>>   deviceixl # Intel XL710 40Gbe PCIE
>> Ethernet
>>   deviceixlv# Intel XL710 40Gbe VF
>> PCIE Ethernet
>>   devicele  # AMD Am7900 LANCE and
>> Am79C9xx PCnet
>>
>> Modified: head/sys/conf/NOTES
>> 
>> ==
>> --- head/sys/conf/NOTES Tue Mar 17 15:48:19 2015(r280181)
>> +++ head/sys/conf/NOTES Tue Mar 17 18:32:28 2015(r280182)
>> @@ -2100,7 +2100,8 @@ devicede  # DEC/Intel
>> DC21x4x (``Tulip
>>   deviceem  # Intel Pro/1000 Gigabit Ethernet
>>   deviceigb # Intel Pro/1000 PCIE Gigabit
>> Ethernet
>>   deviceixgb# Intel Pro/10Gbe PCI-X Ethernet
>> -device ixgbe   # Intel Pro/10Gbe PCIE Ethernet
>> +device ix  # Intel Pro/10Gbe PCIE Ethernet
>> +device ixv # Intel Pro/10Gbe PCIE Ethernet VF
>>   devicele  # AMD Am7900 LANCE and Am79C9xx

Re: svn commit: r280220 - head/usr.bin/ldd

2015-03-18 Thread John Baldwin
On Wednesday, March 18, 2015 05:04:25 PM Konstantin Belousov wrote:
> On Wed, Mar 18, 2015 at 10:33:45AM -0400, John Baldwin wrote:
> > On Wednesday, March 18, 2015 01:59:05 PM Andrew Turner wrote:
> > > Author: andrew
> > > Date: Wed Mar 18 13:59:04 2015
> > > New Revision: 280220
> > > URL: https://svnweb.freebsd.org/changeset/base/280220
> > > 
> > > Log:
> > >   Allowus to exclude a.out support from ldd and use it with arm64 as it 
> > > won't
> > >   support the a.out format.
> > 
> > Similarly here.  Perhaps it could also be enabled for amd64 to support 
> > running
> > old FreeBSD/i386 binaries, but there's no need for it on other arm, mips,
> > powerpc, sparc64, etc.
> > 
> I do not think amd64 binary needs a.out support.  Only kernel components
> and ldd32 need this, and for ldd32 build, the __i386__ preprocessor
> symbol should be defined.

Even better then.

-- 
John Baldwin
___
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: r280226 - in head/sys: mips/conf modules powerpc/conf

2015-03-18 Thread Jack F Vogel
Author: jfv
Date: Wed Mar 18 16:54:03 2015
New Revision: 280226
URL: https://svnweb.freebsd.org/changeset/base/280226

Log:
  Correct the ixgbe entries in mips and powerpc, and add the module
  entries in i386/amd64 in the Makefile

Modified:
  head/sys/mips/conf/OCTEON1
  head/sys/modules/Makefile
  head/sys/powerpc/conf/GENERIC64

Modified: head/sys/mips/conf/OCTEON1
==
--- head/sys/mips/conf/OCTEON1  Wed Mar 18 16:06:04 2015(r280225)
+++ head/sys/mips/conf/OCTEON1  Wed Mar 18 16:54:03 2015(r280226)
@@ -196,7 +196,8 @@ device  octm
 device de  # DEC/Intel DC21x4x (``Tulip'')
 device em  # Intel PRO/1000 Gigabit Ethernet Family
 device igb # Intel PRO/1000 PCIE Server Gigabit Family
-device ixgbe   # Intel PRO/10GbE PCIE Ethernet Family
+device ix  # Intel PRO/10GbE PF PCIE Ethernet Family
+device ixv # Intel PRO/10GbE VF PCIE Ethernet Family
 device le  # AMD Am7900 LANCE and Am79C9xx PCnet
 device ti  # Alteon Networks Tigon I/II gigabit Ethernet
 device txp # 3Com 3cR990 (``Typhoon'')

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Wed Mar 18 16:06:04 2015(r280225)
+++ head/sys/modules/Makefile   Wed Mar 18 16:54:03 2015(r280226)
@@ -511,6 +511,8 @@ _io=io
 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
 _ipoib= ipoib
 .endif
+_ix=   ix
+_ixv=  ixv
 _linprocfs=linprocfs
 _linsysfs= linsysfs
 _linux=linux

Modified: head/sys/powerpc/conf/GENERIC64
==
--- head/sys/powerpc/conf/GENERIC64 Wed Mar 18 16:06:04 2015
(r280225)
+++ head/sys/powerpc/conf/GENERIC64 Wed Mar 18 16:54:03 2015
(r280226)
@@ -136,7 +136,8 @@ device  uart_z8530
 # Ethernet hardware
 device em  # Intel PRO/1000 Gigabit Ethernet Family
 device igb # Intel PRO/1000 PCIE Server Gigabit Family
-device ixgbe   # Intel PRO/10GbE PCIE Ethernet Family
+device ix  # Intel PRO/10GbE PCIE PF Ethernet Family
+device ixv # Intel PRO/10GbE PCIE VF Ethernet Family
 device glc # Sony Playstation 3 Ethernet
 device llan# IBM pSeries Virtual Ethernet
 
___
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: r280228 - head/sys/dev/ixgbe

2015-03-18 Thread Jack F Vogel
Author: jfv
Date: Wed Mar 18 20:11:59 2015
New Revision: 280228
URL: https://svnweb.freebsd.org/changeset/base/280228

Log:
  Fix i386 LINT build issues, and remove unused variable.

Modified:
  head/sys/dev/ixgbe/if_ixv.c
  head/sys/dev/ixgbe/ixgbe.h

Modified: head/sys/dev/ixgbe/if_ixv.c
==
--- head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 18:33:44 2015(r280227)
+++ head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 20:11:59 2015(r280228)
@@ -1979,13 +1979,13 @@ ixv_add_stats_sysctls(struct adapter *ad
struct sysctl_oid_list *stat_list, *queue_list;
 
/* Driver Statistics */
-   SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "dropped",
+   SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped",
CTLFLAG_RD, &adapter->dropped_pkts,
"Driver dropped packets");
-   SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "mbuf_defrag_failed",
+   SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "mbuf_defrag_failed",
CTLFLAG_RD, &adapter->mbuf_defrag_failed,
"m_defrag() failed");
-   SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "watchdog_events",
+   SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "watchdog_events",
CTLFLAG_RD, &adapter->watchdog_events,
"Watchdog timeouts");
 

Modified: head/sys/dev/ixgbe/ixgbe.h
==
--- head/sys/dev/ixgbe/ixgbe.h  Wed Mar 18 18:33:44 2015(r280227)
+++ head/sys/dev/ixgbe/ixgbe.h  Wed Mar 18 20:11:59 2015(r280228)
@@ -323,9 +323,8 @@ struct tx_ring {
u32 bytes;  /* used for AIM */
u32 packets;
/* Soft Stats */
-   unsigned long   tx_bytes;
+   u64 tx_bytes;
unsigned long   tso_tx;
-   unsigned long   no_tx_map_avail;
unsigned long   no_tx_dma_setup;
u64 no_desc_avail;
u64 total_packets;
___
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: r280230 - in head: sys/cam/scsi usr.bin/mt

2015-03-18 Thread Kenneth D. Merry
Author: ken
Date: Wed Mar 18 20:52:34 2015
New Revision: 280230
URL: https://svnweb.freebsd.org/changeset/base/280230

Log:
  Fix a couple of problems in the sa(4) media type reports.
  
  The only drives I have discovered so far that support medium type
  reports are newer HP LTO (LTO-5 and LTO-6) drives.  IBM drives
  only support the density reports.
  
  sys/cam/scsi/scsi_sa.h:
The number of possible density codes in the medium type
report is 9, not 8.  This caused problems parsing all of
the medium type report after this point in the structure.
  
  usr.bin/mt/mt.c:
Run the density codes returned in the medium type report
through denstostring(), just like the primary and secondary
density codes in the density report.  This will print the
density code in hex, and give a text description if it
is available.
  
  Thanks to Rudolf Cejka for doing extensive testing with HP LTO drives
  and Bacula and discovering these problems.
  
  Tested by:Rudolf Cejka 
  Sponsored by: Spectra Logic
  MFC after:4 days

Modified:
  head/sys/cam/scsi/scsi_sa.h
  head/usr.bin/mt/mt.c

Modified: head/sys/cam/scsi/scsi_sa.h
==
--- head/sys/cam/scsi/scsi_sa.h Wed Mar 18 20:40:42 2015(r280229)
+++ head/sys/cam/scsi/scsi_sa.h Wed Mar 18 20:52:34 2015(r280230)
@@ -477,7 +477,7 @@ struct scsi_medium_type_data {
u_int8_t length[2];
 #defineSMTD_DEFAULT_LENGTH 52
u_int8_t num_density_codes;
-   u_int8_t primary_density_codes[8];
+   u_int8_t primary_density_codes[9];
u_int8_t media_width[2];
u_int8_t medium_length[2];
u_int8_t reserved2[2];

Modified: head/usr.bin/mt/mt.c
==
--- head/usr.bin/mt/mt.cWed Mar 18 20:40:42 2015(r280229)
+++ head/usr.bin/mt/mt.cWed Mar 18 20:52:34 2015(r280230)
@@ -1406,9 +1406,9 @@ mt_print_density_entry(struct mt_status_
continue;
}
if ((strcmp(entry->entry_name, "primary_density_code") == 0)
-|| (strcmp(entry->entry_name, "secondary_density_code") == 0)){
+|| (strcmp(entry->entry_name, "secondary_density_code") == 0)
+|| (strcmp(entry->entry_name, "density_code") == 0)) {
 
-   /* XXX KDM this should really be unsigned */
printf("%*s%s (%s): %s\n", indent, "", entry->desc ?
entry->desc : "", entry->entry_name,
denstostring(entry->value_unsigned));
___
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: r280231 - head/usr.bin/mt

2015-03-18 Thread Kenneth D. Merry
Author: ken
Date: Wed Mar 18 20:54:54 2015
New Revision: 280231
URL: https://svnweb.freebsd.org/changeset/base/280231

Log:
  Improve the mt(1) rblim display.
  
  The granularity reported by READ BLOCK LIMITS is an exponent, not a
  byte value.  So a granularity of 0 means 2^0, or 1 byte.  A
  granularity of 1 means 2^1, or 2 bytes.
  
  Print out the individual block limits on separate lines to improve
  readability and avoid exceeding 80 columns.
  
  usr.bin/mt/mt.c:
Fix and improve the 'mt rblim' output.  Add a MT_PLURAL()
macro so we can print "byte" or "bytes" as appropriate.
  
  Sponsored by: Spectra Logic
  MFC after:4 days

Modified:
  head/usr.bin/mt/mt.c

Modified: head/usr.bin/mt/mt.c
==
--- head/usr.bin/mt/mt.cWed Mar 18 20:52:34 2015(r280230)
+++ head/usr.bin/mt/mt.cWed Mar 18 20:54:54 2015(r280231)
@@ -119,6 +119,7 @@ __FBSDID("$FreeBSD$");
 #ifndef MAX
 #defineMAX(a, b) (a > b) ? a : b
 #endif
+#define MT_PLURAL(a) (a == 1) ? "" : "s"
 
 typedef enum {
MT_CMD_NONE = MTLOAD + 1,
@@ -384,10 +385,16 @@ main(int argc, char *argv[])
 
if (ioctl(mtfd, MTIOCRBLIM, (caddr_t)&rblim) < 0)
err(2, "%s", tape);
-   (void)printf("%s: min blocksize %u bytes, "
-   "max blocksize %u bytes, granularity %u bytes\n",
+   (void)printf("%s:\n"
+   "min blocksize %u byte%s\n"
+   "max blocksize %u byte%s\n"
+   "granularity %u byte%s\n",
tape, rblim.min_block_length,
-   rblim.max_block_length, rblim.granularity);
+   MT_PLURAL(rblim.min_block_length),
+   rblim.max_block_length,
+   MT_PLURAL(rblim.max_block_length),
+   (1 << rblim.granularity),
+   MT_PLURAL((1 << rblim.granularity)));
exit(0);
/* NOTREACHED */
}
___
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: r280232 - head/tools/regression/sysvshm

2015-03-18 Thread Konstantin Belousov
Author: kib
Date: Wed Mar 18 22:05:15 2015
New Revision: 280232
URL: https://svnweb.freebsd.org/changeset/base/280232

Log:
  Cosmetics:
  - Move to ANSI definitions syntax, removing warnings about type promotions.
  - Remove __P().
  - Staticise everything.
  - Remove warnings about unused args for signal handlers.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/tools/regression/sysvshm/shmtest.c

Modified: head/tools/regression/sysvshm/shmtest.c
==
--- head/tools/regression/sysvshm/shmtest.c Wed Mar 18 20:54:54 2015
(r280231)
+++ head/tools/regression/sysvshm/shmtest.c Wed Mar 18 22:05:15 2015
(r280232)
@@ -49,27 +49,22 @@
 #include 
 #include 
 
-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-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: r280233 - in head: share/man/man4 sys/netinet

2015-03-18 Thread Hiren Panchasara
Author: hiren
Date: Wed Mar 18 23:24:25 2015
New Revision: 280233
URL: https://svnweb.freebsd.org/changeset/base/280233

Log:
  Add connection flowid to siftr(4).
  
  Reviewed by:  lstewart
  MFC after:1 week
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D2089

Modified:
  head/share/man/man4/siftr.4
  head/sys/netinet/siftr.c

Modified: head/share/man/man4/siftr.4
==
--- head/share/man/man4/siftr.4 Wed Mar 18 22:05:15 2015(r280232)
+++ head/share/man/man4/siftr.4 Wed Mar 18 23:24:25 2015(r280233)
@@ -30,7 +30,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 12, 2010
+.Dd March 18, 2015
 .Dt SIFTR 4
 .Os
 .Sh NAME
@@ -335,6 +335,13 @@ Bytes acknowledged via SACK are not excl
 .It Va 26
 The current number of segments in the reassembly queue.
 .El
+.Bl -tag -offset indent -width Va
+.It Va 27
+Flowid for the connection.
+A caveat: Zero '0' either represents a valid flowid or a default value when 
it's
+not being set. There is no easy way to differentiate without looking at actual
+network interface card and drivers being used.
+.El
 .Pp
 The third type of log message is written to the file when the module is 
disabled
 and ceases collecting data from the running kernel.

Modified: head/sys/netinet/siftr.c
==
--- head/sys/netinet/siftr.cWed Mar 18 22:05:15 2015(r280232)
+++ head/sys/netinet/siftr.cWed Mar 18 23:24:25 2015(r280233)
@@ -227,6 +227,8 @@ struct pkt_node {
u_int   sent_inflight_bytes;
/* Number of segments currently in the reassembly queue. */
int t_segqlen;
+   /* Flowid for the connection. */
+   u_int   flowid; 
/* Link to next pkt_node in the list. */
STAILQ_ENTRY(pkt_node)  nodes;
 };
@@ -485,7 +487,8 @@ siftr_process_pkt(struct pkt_node * pkt_
pkt_node->rcv_buf_hiwater,
pkt_node->rcv_buf_cc,
pkt_node->sent_inflight_bytes,
-   pkt_node->t_segqlen);
+   pkt_node->t_segqlen,
+   pkt_node->flowid);
} else { /* IPv4 packet */
pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]);
pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]);
@@ -501,7 +504,7 @@ siftr_process_pkt(struct pkt_node * pkt_
log_buf->ae_bytesused = snprintf(log_buf->ae_data,
MAX_LOG_MSG_LEN,
"%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld,"
-   "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u\n",
+   
"%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u\n",
direction[pkt_node->direction],
pkt_node->hash,
(intmax_t)pkt_node->tval.tv_sec,
@@ -534,7 +537,8 @@ siftr_process_pkt(struct pkt_node * pkt_
pkt_node->rcv_buf_hiwater,
pkt_node->rcv_buf_cc,
pkt_node->sent_inflight_bytes,
-   pkt_node->t_segqlen);
+   pkt_node->t_segqlen,
+   pkt_node->flowid);
 #ifdef SIFTR_IPV6
}
 #endif
@@ -787,6 +791,7 @@ siftr_siftdata(struct pkt_node *pn, stru
pn->rcv_buf_cc = sbused(&inp->inp_socket->so_rcv);
pn->sent_inflight_bytes = tp->snd_max - tp->snd_una;
pn->t_segqlen = tp->t_segqlen;
+   pn->flowid = inp->inp_flowid;
 
/* We've finished accessing the tcb so release the lock. */
if (inp_locally_locked)
___
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: r280234 - head/usr.sbin/bsdinstall/scripts

2015-03-18 Thread Allan Jude
Author: allanjude (doc committer)
Date: Wed Mar 18 23:24:38 2015
New Revision: 280234
URL: https://svnweb.freebsd.org/changeset/base/280234

Log:
  Fix the handbook install option in bsdinstall
  
  bsdconfig's f_package_add doesn't seem to support using the pkg repo from 
/etc/pkg/FreeBSD.conf, it also tries to run the commands on the installer 
image, not in the destination chroot
  
  Instead, manually bootstrap pkg in the chroot, and then install the requested 
packages (in the chroot)
  
  Doesn't use pkg -c, because pkg is not installed on the installer image
  
  PR:   196250
  Differential Revision:https://reviews.freebsd.org/D2026
  Approved by:  bapt
  Sponsored by: ScaleEngine Inc.

Modified:
  head/usr.sbin/bsdinstall/scripts/docsinstall

Modified: head/usr.sbin/bsdinstall/scripts/docsinstall
==
--- head/usr.sbin/bsdinstall/scripts/docsinstallWed Mar 18 23:24:25 
2015(r280233)
+++ head/usr.sbin/bsdinstall/scripts/docsinstallWed Mar 18 23:24:38 
2015(r280234)
@@ -151,13 +151,20 @@ f_dialog_menutag_fetch selected
 # Let pkg_add be able to use name servers
 f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/
 
+if [ ! -x $BSDINSTALL_CHROOT ]; then
+   ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg bootstrap
+fi
+
 #
 # Install each of the selected packages
 #
+docsets=""
 for lang in $selected; do
-   f_package_add $lang-freebsd-doc || return $FAILURE
+   docsets="$docsets $lang-freebsd-doc"
 done
 
+ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install $docsets || return 
$FAILURE
+
 

 # END
 

___
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: r280233 - in head: share/man/man4 sys/netinet

2015-03-18 Thread Adrian Chadd
Sorry I didn't add this earlier.

There's a flowtype field, right? You should log that too. It'll tell
you what the flowid field means.


-a


On 18 March 2015 at 16:24, Hiren Panchasara  wrote:
> Author: hiren
> Date: Wed Mar 18 23:24:25 2015
> New Revision: 280233
> URL: https://svnweb.freebsd.org/changeset/base/280233
>
> Log:
>   Add connection flowid to siftr(4).
>
>   Reviewed by:  lstewart
>   MFC after:1 week
>   Sponsored by: Limelight Networks
>   Differential Revision:https://reviews.freebsd.org/D2089
>
> Modified:
>   head/share/man/man4/siftr.4
>   head/sys/netinet/siftr.c
>
> Modified: head/share/man/man4/siftr.4
> ==
> --- head/share/man/man4/siftr.4 Wed Mar 18 22:05:15 2015(r280232)
> +++ head/share/man/man4/siftr.4 Wed Mar 18 23:24:25 2015(r280233)
> @@ -30,7 +30,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd November 12, 2010
> +.Dd March 18, 2015
>  .Dt SIFTR 4
>  .Os
>  .Sh NAME
> @@ -335,6 +335,13 @@ Bytes acknowledged via SACK are not excl
>  .It Va 26
>  The current number of segments in the reassembly queue.
>  .El
> +.Bl -tag -offset indent -width Va
> +.It Va 27
> +Flowid for the connection.
> +A caveat: Zero '0' either represents a valid flowid or a default value when 
> it's
> +not being set. There is no easy way to differentiate without looking at 
> actual
> +network interface card and drivers being used.
> +.El
>  .Pp
>  The third type of log message is written to the file when the module is 
> disabled
>  and ceases collecting data from the running kernel.
>
> Modified: head/sys/netinet/siftr.c
> ==
> --- head/sys/netinet/siftr.cWed Mar 18 22:05:15 2015(r280232)
> +++ head/sys/netinet/siftr.cWed Mar 18 23:24:25 2015(r280233)
> @@ -227,6 +227,8 @@ struct pkt_node {
> u_int   sent_inflight_bytes;
> /* Number of segments currently in the reassembly queue. */
> int t_segqlen;
> +   /* Flowid for the connection. */
> +   u_int   flowid;
> /* Link to next pkt_node in the list. */
> STAILQ_ENTRY(pkt_node)  nodes;
>  };
> @@ -485,7 +487,8 @@ siftr_process_pkt(struct pkt_node * pkt_
> pkt_node->rcv_buf_hiwater,
> pkt_node->rcv_buf_cc,
> pkt_node->sent_inflight_bytes,
> -   pkt_node->t_segqlen);
> +   pkt_node->t_segqlen,
> +   pkt_node->flowid);
> } else { /* IPv4 packet */
> pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]);
> pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]);
> @@ -501,7 +504,7 @@ siftr_process_pkt(struct pkt_node * pkt_
> log_buf->ae_bytesused = snprintf(log_buf->ae_data,
> MAX_LOG_MSG_LEN,
> 
> "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld,"
> -   "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u\n",
> +   
> "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u\n",
> direction[pkt_node->direction],
> pkt_node->hash,
> (intmax_t)pkt_node->tval.tv_sec,
> @@ -534,7 +537,8 @@ siftr_process_pkt(struct pkt_node * pkt_
> pkt_node->rcv_buf_hiwater,
> pkt_node->rcv_buf_cc,
> pkt_node->sent_inflight_bytes,
> -   pkt_node->t_segqlen);
> +   pkt_node->t_segqlen,
> +   pkt_node->flowid);
>  #ifdef SIFTR_IPV6
> }
>  #endif
> @@ -787,6 +791,7 @@ siftr_siftdata(struct pkt_node *pn, stru
> pn->rcv_buf_cc = sbused(&inp->inp_socket->so_rcv);
> pn->sent_inflight_bytes = tp->snd_max - tp->snd_una;
> pn->t_segqlen = tp->t_segqlen;
> +   pn->flowid = inp->inp_flowid;
>
> /* We've finished accessing the tcb so release the lock. */
> if (inp_locally_locked)
>
___
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: r280233 - in head: share/man/man4 sys/netinet

2015-03-18 Thread Hiren Panchasara
On 03/18/15 at 04:26P, Adrian Chadd wrote:
> Sorry I didn't add this earlier.
> 
> There's a flowtype field, right? You should log that too. It'll tell
> you what the flowid field means.

Yeah, you are right. I should have added that in this commit. I'll do
that now.

Cheers,
Hiren


pgpa1L1W7ZfK7.pgp
Description: PGP signature


svn commit: r280235 - head/usr.sbin/bsdinstall/scripts

2015-03-18 Thread Allan Jude
Author: allanjude (doc committer)
Date: Wed Mar 18 23:47:30 2015
New Revision: 280235
URL: https://svnweb.freebsd.org/changeset/base/280235

Log:
  Remove a non-required unsafe condition added in the previous commit
  
  Reviewed by:  bapt
  Approved by:  dteske
  Sponsored by: ScaleEngine Inc.

Modified:
  head/usr.sbin/bsdinstall/scripts/docsinstall

Modified: head/usr.sbin/bsdinstall/scripts/docsinstall
==
--- head/usr.sbin/bsdinstall/scripts/docsinstallWed Mar 18 23:24:38 
2015(r280234)
+++ head/usr.sbin/bsdinstall/scripts/docsinstallWed Mar 18 23:47:30 
2015(r280235)
@@ -151,10 +151,6 @@ f_dialog_menutag_fetch selected
 # Let pkg_add be able to use name servers
 f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/
 
-if [ ! -x $BSDINSTALL_CHROOT ]; then
-   ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg bootstrap
-fi
-
 #
 # Install each of the selected packages
 #
___
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: r280236 - head/sys/netinet6

2015-03-18 Thread Andrey V. Elsukov
Author: ae
Date: Thu Mar 19 00:04:25 2015
New Revision: 280236
URL: https://svnweb.freebsd.org/changeset/base/280236

Log:
  To avoid a possible race, release the reference to ifa after return
  from nd6_dad_na_input().
  
  Submitted by: Alexandre Martins
  MFC after:1 week

Modified:
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/netinet6/nd6_nbr.c
==
--- head/sys/netinet6/nd6_nbr.c Wed Mar 18 23:47:30 2015(r280235)
+++ head/sys/netinet6/nd6_nbr.c Thu Mar 19 00:04:25 2015(r280236)
@@ -747,8 +747,8 @@ nd6_na_input(struct mbuf *m, int off, in
 */
if (ifa
 && (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE)) {
-   ifa_free(ifa);
nd6_dad_na_input(ifa);
+   ifa_free(ifa);
goto freeit;
}
 
___
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: r280237 - in head: share/man/man4 sys/netinet

2015-03-18 Thread Hiren Panchasara
Author: hiren
Date: Thu Mar 19 00:23:16 2015
New Revision: 280237
URL: https://svnweb.freebsd.org/changeset/base/280237

Log:
  Add connection flow type to siftr(4).
  
  Suggested by: adrian
  Sponsored by: Limelight Networks

Modified:
  head/share/man/man4/siftr.4
  head/sys/netinet/siftr.c

Modified: head/share/man/man4/siftr.4
==
--- head/share/man/man4/siftr.4 Thu Mar 19 00:04:25 2015(r280236)
+++ head/share/man/man4/siftr.4 Thu Mar 19 00:23:16 2015(r280237)
@@ -342,6 +342,15 @@ A caveat: Zero '0' either represents a v
 not being set. There is no easy way to differentiate without looking at actual
 network interface card and drivers being used.
 .El
+.Bl -tag -offset indent -width Va
+.It Va 28
+Flow type for the connection.
+Flowtype defines which protocol fields are hashed to produce the flowid. 
+A complete listing is available in
+.Pa sys/mbuf.h
+under
+.Dv M_HASHTYPE_* .
+.El
 .Pp
 The third type of log message is written to the file when the module is 
disabled
 and ceases collecting data from the running kernel.

Modified: head/sys/netinet/siftr.c
==
--- head/sys/netinet/siftr.cThu Mar 19 00:04:25 2015(r280236)
+++ head/sys/netinet/siftr.cThu Mar 19 00:23:16 2015(r280237)
@@ -229,6 +229,8 @@ struct pkt_node {
int t_segqlen;
/* Flowid for the connection. */
u_int   flowid; 
+   /* Flow type for the connection. */
+   u_int   flowtype;   
/* Link to next pkt_node in the list. */
STAILQ_ENTRY(pkt_node)  nodes;
 };
@@ -488,7 +490,8 @@ siftr_process_pkt(struct pkt_node * pkt_
pkt_node->rcv_buf_cc,
pkt_node->sent_inflight_bytes,
pkt_node->t_segqlen,
-   pkt_node->flowid);
+   pkt_node->flowid,
+   pkt_node->flowtype);
} else { /* IPv4 packet */
pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]);
pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]);
@@ -504,7 +507,7 @@ siftr_process_pkt(struct pkt_node * pkt_
log_buf->ae_bytesused = snprintf(log_buf->ae_data,
MAX_LOG_MSG_LEN,
"%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld,"
-   
"%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u\n",
+   
"%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n",
direction[pkt_node->direction],
pkt_node->hash,
(intmax_t)pkt_node->tval.tv_sec,
@@ -538,7 +541,8 @@ siftr_process_pkt(struct pkt_node * pkt_
pkt_node->rcv_buf_cc,
pkt_node->sent_inflight_bytes,
pkt_node->t_segqlen,
-   pkt_node->flowid);
+   pkt_node->flowid,
+   pkt_node->flowtype);
 #ifdef SIFTR_IPV6
}
 #endif
@@ -792,6 +796,7 @@ siftr_siftdata(struct pkt_node *pn, stru
pn->sent_inflight_bytes = tp->snd_max - tp->snd_una;
pn->t_segqlen = tp->t_segqlen;
pn->flowid = inp->inp_flowid;
+   pn->flowtype = inp->inp_flowtype;
 
/* We've finished accessing the tcb so release the lock. */
if (inp_locally_locked)
___
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: r280233 - in head: share/man/man4 sys/netinet

2015-03-18 Thread Hiren Panchasara
On 03/18/15 at 04:36P, Hiren Panchasara wrote:
> On 03/18/15 at 04:26P, Adrian Chadd wrote:
> > Sorry I didn't add this earlier.
> > 
> > There's a flowtype field, right? You should log that too. It'll tell
> > you what the flowid field means.
> 
> Yeah, you are right. I should have added that in this commit. I'll do
> that now.
Added in r280237.

cheers,
Hiren


pgpDOgnTdZRV2.pgp
Description: PGP signature


svn commit: r280238 - head/sys/vm

2015-03-18 Thread Alan Cox
Author: alc
Date: Thu Mar 19 01:40:43 2015
New Revision: 280238
URL: https://svnweb.freebsd.org/changeset/base/280238

Log:
  Fix the root cause of the "vm_reserv_populate: reserv  is already
  promoted" panics.  The sequence of events that leads to a panic is rather
  long and circuitous.  First, suppose that process P has a promoted
  superpage S within vm object O that it can write to.  Then, suppose that P
  forks, which leads to S being write protected.  Now, before P's child
  exits, suppose that P writes to another virtual page within O.  Since the
  pages within O are copy on write, a shadow object for O is created to
  house the new physical copy of the faulted on virtual page.  Then, before
  P can fault on S, P's child exists.  Now, when P faults on S, it will
  follow the "optimized" path for copy-on-write faults in vm_fault(),
  wherein the underlying physical page is moved from O to its shadow object
  rather than allocating a new page and copying the new page's contents from
  the old page.  Moreover, suppose that every 4 KB physical page making up S
  is moved to the shadow object in this way.  However, the optimized path
  does not move the underlying superpage reservation, which is the root
  cause of the panics!  Ultimately, P performs vm_object_collapse() on O's
  shadow object, which destroys O and in doing so breaks any reservations
  still belonging to O.  This leaves the reservation underlying S in an
  inconsistent state: It's simultaneously not in use and promoted.  Breaking
  a reservation does not demote it because I never intended for a promoted
  reservation to be broken.  It makes little sense.  Finally, this
  inconsistency leads to an assertion failure the next time that the
  reservation is used.
  
  The failing assertion does not (currently) exist in FreeBSD 10.x or
  earlier.  There, we will quietly break the promoted reservation.  While
  illogical and unintended, breaking the reservation is essentially
  harmless.
  
  PR:   198163
  Reviewed by:  kib
  Tested by:pho
  X-MFC after:  r267213
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==
--- head/sys/vm/vm_fault.c  Thu Mar 19 00:23:16 2015(r280237)
+++ head/sys/vm/vm_fault.c  Thu Mar 19 01:40:43 2015(r280238)
@@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #define PFBAK 4
 #define PFFOR 4
@@ -858,6 +859,14 @@ vnode_locked:
unlock_and_deallocate(&fs);
goto RetryFault;
}
+#if VM_NRESERVLEVEL > 0
+   /*
+* Rename the reservation.
+*/
+   vm_reserv_rename(fs.m, fs.first_object,
+   fs.object, OFF_TO_IDX(
+   fs.first_object->backing_object_offset));
+#endif
vm_page_xbusy(fs.m);
fs.first_m = fs.m;
fs.m = 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: r280239 - head/sys/geom

2015-03-18 Thread Adrian Chadd
Author: adrian
Date: Thu Mar 19 03:58:25 2015
New Revision: 280239
URL: https://svnweb.freebsd.org/changeset/base/280239

Log:
  Fix the label search routine in geom_map to not trip up on '\0' bytes.
  
  * Just do the buf check early and fail out
  * If the offset being searched is:
  
  0011  00 b5 7e 45 61 e2 76 d3  c1 78 dd 15 95 cd 1f f1  |..~Ea.v..x..|
  
  .. and the match string is '.!/bin/sh'
  
  .. then it'll set the match string[0] to '\0', do a strncmp() against
  the read buffer, find it's matching two zero-length strings, and think
  that's where to start.
  
  MFC after:2 weeks

Modified:
  head/sys/geom/geom_map.c

Modified: head/sys/geom/geom_map.c
==
--- head/sys/geom/geom_map.cThu Mar 19 01:40:43 2015(r280238)
+++ head/sys/geom/geom_map.cThu Mar 19 03:58:25 2015(r280239)
@@ -171,6 +171,13 @@ find_marker(struct g_consumer *cp, const
roundup(strlen(search_key), sectorsize), NULL);
g_topology_lock();
 
+   /*
+* Don't bother doing the rest if buf==NULL; eg derefencing
+* to assemble 'key'.
+*/
+   if (buf == NULL)
+   continue;
+
/* Wildcard, replace '.' with byte from data */
/* TODO: add support wildcard escape '\.' */
 
@@ -183,7 +190,8 @@ find_marker(struct g_consumer *cp, const
}
}
 
-   if (buf != NULL && strncmp(buf + search_offset % sectorsize,
+   /* Assume buf != NULL here */
+   if (memcmp(buf + search_offset % sectorsize,
key, strlen(search_key)) == 0) {
g_free(buf);
/* Marker found, so return their offset */
___
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"