Re: svn commit: r319874 - head/sys/kern

2017-06-14 Thread Warner Losh
On Wed, Jun 14, 2017 at 11:04 PM, Gleb Smirnoff  wrote:

> On Tue, Jun 13, 2017 at 03:06:43PM +0300, Konstantin Belousov wrote:
> K> On Mon, Jun 12, 2017 at 04:43:56PM -0700, Gleb Smirnoff wrote:
> K> > On Mon, Jun 12, 2017 at 09:11:11PM +, Konstantin Belousov wrote:
> K> > K> Author: kib
> K> > K> Date: Mon Jun 12 21:11:11 2017
> K> > K> New Revision: 319874
> K> > K> URL: https://svnweb.freebsd.org/changeset/base/319874
> K> > K>
> K> > K> Log:
> K> > K>   Print unimplemented syscall number to the ctty on SIGSYS, if
> enabled
> K> > K>   by the knob kern.lognosys.
> K> >
> K> > Why is it off by default?
> K> In some (non-default) situation it may cause lot of ctty output.
> K> I made the knob tunable to allow it to be set very early (init)
> K> if needed.
>
> I remember myself being a beginner UNIX user, and all this
> "bad system call, core dumped" messages were so annoyingly
> uninformative for me, and I had no idea how to track to the
> actual problem. This feature gives a lot of clue for a beginner
> user, but having it default to off, devaluates its value.
>

We can also rate limit the messages. We have the technology.

Warner

>
> To avoid possible tty spam for an application that produces ton
> of bad syscalls, but ignores SIGSYS, we can enable the feature
> for those processes, who doesn't ignore SIGSYS.
>
> --
> Totus tuus, Glebius.
>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r319874 - head/sys/kern

2017-06-14 Thread Gleb Smirnoff
On Tue, Jun 13, 2017 at 03:06:43PM +0300, Konstantin Belousov wrote:
K> On Mon, Jun 12, 2017 at 04:43:56PM -0700, Gleb Smirnoff wrote:
K> > On Mon, Jun 12, 2017 at 09:11:11PM +, Konstantin Belousov wrote:
K> > K> Author: kib
K> > K> Date: Mon Jun 12 21:11:11 2017
K> > K> New Revision: 319874
K> > K> URL: https://svnweb.freebsd.org/changeset/base/319874
K> > K> 
K> > K> Log:
K> > K>   Print unimplemented syscall number to the ctty on SIGSYS, if enabled
K> > K>   by the knob kern.lognosys.
K> > 
K> > Why is it off by default?
K> In some (non-default) situation it may cause lot of ctty output.
K> I made the knob tunable to allow it to be set very early (init)
K> if needed.

I remember myself being a beginner UNIX user, and all this
"bad system call, core dumped" messages were so annoyingly
uninformative for me, and I had no idea how to track to the
actual problem. This feature gives a lot of clue for a beginner
user, but having it default to off, devaluates its value.

To avoid possible tty spam for an application that produces ton
of bad syscalls, but ignores SIGSYS, we can enable the feature
for those processes, who doesn't ignore SIGSYS.

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


Re: svn commit: r319722 - in head: sys/cam/ctl sys/dev/iscsi sys/kern sys/netgraph sys/netgraph/bluetooth/socket sys/netinet sys/ofed/drivers/infiniband/core sys/ofed/drivers/infiniband/ulp/sdp sys/rp

2017-06-14 Thread Gleb Smirnoff
  Hi,

On Wed, Jun 14, 2017 at 09:59:50AM +0200, Andreas Tobler wrote:
A> with this revision I get either a kernel panic or a hang. This happens 
A> on powerpc (32-bit). The powerpc64 looks stable.
A> 
A> Here you can see the backtrace in case of the panic:
A> https://people.freebsd.org/~andreast/r319722_ppc32_1.jpg
A> 
A> In the source code I see a comment with XXXGL...
A> Is this powerpc specific or do you think that there are some issues in 
A> the uipc_socket.c code?

The comment has nothing to do with arch or 32-bit. Is
it possible to understand what is the actual instruction
at soisconnected()+0x21c ?

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


svn commit: r319967 - head/sys/kern

2017-06-14 Thread Ryan Libby
Author: rlibby
Date: Thu Jun 15 04:49:12 2017
New Revision: 319967
URL: https://svnweb.freebsd.org/changeset/base/319967

Log:
  ddb show socket debugging
  
  Display the mbuf/cluster count for a sockbuf and fix a couple whitespace
  issues in the output.
  
  Reviewed by:  jhb, markj (both previous version)
  Approved by:  markj (mentor)
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D11062

Modified:
  head/sys/kern/uipc_debug.c

Modified: head/sys/kern/uipc_debug.c
==
--- head/sys/kern/uipc_debug.c  Thu Jun 15 04:37:23 2017(r319966)
+++ head/sys/kern/uipc_debug.c  Thu Jun 15 04:49:12 2017(r319967)
@@ -333,8 +333,6 @@ db_print_protosw(struct protosw *pr, const char *prnam
db_printf("pr_fasttimo: %p   ", pr->pr_fasttimo);
db_printf("pr_slowtimo: %p   ", pr->pr_slowtimo);
db_printf("pr_drain: %p\n", pr->pr_drain);
-
-   db_print_indent(indent);
 }
 
 static void
@@ -408,6 +406,8 @@ db_print_sockbuf(struct sockbuf *sb, const char *sockb
db_printf("sb_mbmax: %u\n", sb->sb_mbmax);
 
db_print_indent(indent);
+   db_printf("sb_mcnt: %u   ", sb->sb_mcnt);
+   db_printf("sb_ccnt: %u   ", sb->sb_ccnt);
db_printf("sb_ctl: %u   ", sb->sb_ctl);
db_printf("sb_lowat: %d   ", sb->sb_lowat);
db_printf("sb_timeo: %jd\n", sb->sb_timeo);
@@ -448,7 +448,6 @@ db_print_socket(struct socket *so, const char *socketn
db_printf(")\n");
 
db_print_indent(indent);
-   db_printf(")   ");
db_printf("so_pcb: %p   ", so->so_pcb);
db_printf("so_proto: %p\n", so->so_proto);
 
@@ -466,6 +465,7 @@ db_print_socket(struct socket *so, const char *socketn
} else {
db_printf("so_qstate: 0x%x (", so->so_qstate);
db_print_soqstate(so->so_qstate);
+   db_printf(")   ");
db_printf("so_listen: %p   ", so->so_listen);
/* so_list skipped */
db_printf("so_timeo: %d   ", so->so_timeo);
@@ -473,7 +473,7 @@ db_print_socket(struct socket *so, const char *socketn
 
db_print_indent(indent);
db_printf("so_sigio: %p   ", so->so_sigio);
-   db_printf("so_oobmark: %lu   ", so->so_oobmark);
+   db_printf("so_oobmark: %lu\n", so->so_oobmark);
 
db_print_sockbuf(>so_rcv, "so_rcv", indent);
db_print_sockbuf(>so_snd, "so_snd", indent);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r319964 - head/sys/dev/qlnx/qlnxe

2017-06-14 Thread Cy Schubert
In message <201706150245.v5f2jhna021...@repo.freebsd.org>, David C 
Somayajulu w
rites:
> Author: davidcs
> Date: Thu Jun 15 02:45:43 2017
> New Revision: 319964
> URL: https://svnweb.freebsd.org/changeset/base/319964
> 
> Log:
>   Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0
>   Add support for pci deviceID 0x8070 for QLE41xxx product line which
>   supports 10GbE/25GbE/40GbE
>   
>   MFC after:5 days
> 
> Modified:
>   head/sys/dev/qlnx/qlnxe/bcm_osal.h
>   head/sys/dev/qlnx/qlnxe/common_hsi.h
>   head/sys/dev/qlnx/qlnxe/ecore.h
>   head/sys/dev/qlnx/qlnxe/ecore_chain.h
>   head/sys/dev/qlnx/qlnxe/ecore_cxt.c
>   head/sys/dev/qlnx/qlnxe/ecore_cxt.h
>   head/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
>   head/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
>   head/sys/dev/qlnx/qlnxe/ecore_dbg_values.h
>   head/sys/dev/qlnx/qlnxe/ecore_dcbx.c
>   head/sys/dev/qlnx/qlnxe/ecore_dcbx.h
>   head/sys/dev/qlnx/qlnxe/ecore_dev.c
>   head/sys/dev/qlnx/qlnxe/ecore_dev_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_gtt_reg_addr.h
>   head/sys/dev/qlnx/qlnxe/ecore_hsi_common.h
>   head/sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h
>   head/sys/dev/qlnx/qlnxe/ecore_hsi_eth.h
>   head/sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h
>   head/sys/dev/qlnx/qlnxe/ecore_hsi_iscsi.h
>   head/sys/dev/qlnx/qlnxe/ecore_hsi_iwarp.h
>   head/sys/dev/qlnx/qlnxe/ecore_hsi_rdma.h
>   head/sys/dev/qlnx/qlnxe/ecore_hsi_roce.h
>   head/sys/dev/qlnx/qlnxe/ecore_hw.c
>   head/sys/dev/qlnx/qlnxe/ecore_hw.h
>   head/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
>   head/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
>   head/sys/dev/qlnx/qlnxe/ecore_init_ops.c
>   head/sys/dev/qlnx/qlnxe/ecore_init_ops.h
>   head/sys/dev/qlnx/qlnxe/ecore_init_values.h
>   head/sys/dev/qlnx/qlnxe/ecore_int.c
>   head/sys/dev/qlnx/qlnxe/ecore_int.h
>   head/sys/dev/qlnx/qlnxe/ecore_int_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_iov_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_iro.h
>   head/sys/dev/qlnx/qlnxe/ecore_iro_values.h
>   head/sys/dev/qlnx/qlnxe/ecore_iscsi.h
>   head/sys/dev/qlnx/qlnxe/ecore_iscsi_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_l2.c
>   head/sys/dev/qlnx/qlnxe/ecore_l2.h
>   head/sys/dev/qlnx/qlnxe/ecore_l2_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_ll2.h
>   head/sys/dev/qlnx/qlnxe/ecore_ll2_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_mcp.c
>   head/sys/dev/qlnx/qlnxe/ecore_mcp.h
>   head/sys/dev/qlnx/qlnxe/ecore_mcp_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_ooo.h
>   head/sys/dev/qlnx/qlnxe/ecore_proto_if.h
>   head/sys/dev/qlnx/qlnxe/ecore_roce.h
>   head/sys/dev/qlnx/qlnxe/ecore_roce_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_rt_defs.h
>   head/sys/dev/qlnx/qlnxe/ecore_sp_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_sp_commands.c
>   head/sys/dev/qlnx/qlnxe/ecore_sp_commands.h
>   head/sys/dev/qlnx/qlnxe/ecore_spq.c
>   head/sys/dev/qlnx/qlnxe/ecore_sriov.h
>   head/sys/dev/qlnx/qlnxe/ecore_vf.h
>   head/sys/dev/qlnx/qlnxe/ecore_vf_api.h
>   head/sys/dev/qlnx/qlnxe/ecore_vfpf_if.h
>   head/sys/dev/qlnx/qlnxe/eth_common.h
>   head/sys/dev/qlnx/qlnxe/fcoe_common.h
>   head/sys/dev/qlnx/qlnxe/iscsi_common.h
>   head/sys/dev/qlnx/qlnxe/mcp_private.h
>   head/sys/dev/qlnx/qlnxe/mcp_public.h
>   head/sys/dev/qlnx/qlnxe/mfw_hsi.h
>   head/sys/dev/qlnx/qlnxe/nvm_cfg.h
>   head/sys/dev/qlnx/qlnxe/nvm_map.h
>   head/sys/dev/qlnx/qlnxe/pcics_reg_driver.h
>   head/sys/dev/qlnx/qlnxe/qlnx_def.h
>   head/sys/dev/qlnx/qlnxe/qlnx_os.c
>   head/sys/dev/qlnx/qlnxe/qlnx_ver.h
>   head/sys/dev/qlnx/qlnxe/rdma_common.h
>   head/sys/dev/qlnx/qlnxe/reg_addr.h
>   head/sys/dev/qlnx/qlnxe/spad_layout.h
>   head/sys/dev/qlnx/qlnxe/storage_common.h
>   head/sys/dev/qlnx/qlnxe/tcp_common.h
> 
[...]

Hi David,

Tell me if I'm off base here but this driver comes directly from Cavium, 
right? Why was it never imported into vendor-sys and MFVed into head like 
other vendor source?


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


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


svn commit: r319964 - head/sys/dev/qlnx/qlnxe

2017-06-14 Thread David C Somayajulu
Author: davidcs
Date: Thu Jun 15 02:45:43 2017
New Revision: 319964
URL: https://svnweb.freebsd.org/changeset/base/319964

Log:
  Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0
  Add support for pci deviceID 0x8070 for QLE41xxx product line which
  supports 10GbE/25GbE/40GbE
  
  MFC after:5 days

Modified:
  head/sys/dev/qlnx/qlnxe/bcm_osal.h
  head/sys/dev/qlnx/qlnxe/common_hsi.h
  head/sys/dev/qlnx/qlnxe/ecore.h
  head/sys/dev/qlnx/qlnxe/ecore_chain.h
  head/sys/dev/qlnx/qlnxe/ecore_cxt.c
  head/sys/dev/qlnx/qlnxe/ecore_cxt.h
  head/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
  head/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
  head/sys/dev/qlnx/qlnxe/ecore_dbg_values.h
  head/sys/dev/qlnx/qlnxe/ecore_dcbx.c
  head/sys/dev/qlnx/qlnxe/ecore_dcbx.h
  head/sys/dev/qlnx/qlnxe/ecore_dev.c
  head/sys/dev/qlnx/qlnxe/ecore_dev_api.h
  head/sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
  head/sys/dev/qlnx/qlnxe/ecore_gtt_reg_addr.h
  head/sys/dev/qlnx/qlnxe/ecore_hsi_common.h
  head/sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h
  head/sys/dev/qlnx/qlnxe/ecore_hsi_eth.h
  head/sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h
  head/sys/dev/qlnx/qlnxe/ecore_hsi_iscsi.h
  head/sys/dev/qlnx/qlnxe/ecore_hsi_iwarp.h
  head/sys/dev/qlnx/qlnxe/ecore_hsi_rdma.h
  head/sys/dev/qlnx/qlnxe/ecore_hsi_roce.h
  head/sys/dev/qlnx/qlnxe/ecore_hw.c
  head/sys/dev/qlnx/qlnxe/ecore_hw.h
  head/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
  head/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
  head/sys/dev/qlnx/qlnxe/ecore_init_ops.c
  head/sys/dev/qlnx/qlnxe/ecore_init_ops.h
  head/sys/dev/qlnx/qlnxe/ecore_init_values.h
  head/sys/dev/qlnx/qlnxe/ecore_int.c
  head/sys/dev/qlnx/qlnxe/ecore_int.h
  head/sys/dev/qlnx/qlnxe/ecore_int_api.h
  head/sys/dev/qlnx/qlnxe/ecore_iov_api.h
  head/sys/dev/qlnx/qlnxe/ecore_iro.h
  head/sys/dev/qlnx/qlnxe/ecore_iro_values.h
  head/sys/dev/qlnx/qlnxe/ecore_iscsi.h
  head/sys/dev/qlnx/qlnxe/ecore_iscsi_api.h
  head/sys/dev/qlnx/qlnxe/ecore_l2.c
  head/sys/dev/qlnx/qlnxe/ecore_l2.h
  head/sys/dev/qlnx/qlnxe/ecore_l2_api.h
  head/sys/dev/qlnx/qlnxe/ecore_ll2.h
  head/sys/dev/qlnx/qlnxe/ecore_ll2_api.h
  head/sys/dev/qlnx/qlnxe/ecore_mcp.c
  head/sys/dev/qlnx/qlnxe/ecore_mcp.h
  head/sys/dev/qlnx/qlnxe/ecore_mcp_api.h
  head/sys/dev/qlnx/qlnxe/ecore_ooo.h
  head/sys/dev/qlnx/qlnxe/ecore_proto_if.h
  head/sys/dev/qlnx/qlnxe/ecore_roce.h
  head/sys/dev/qlnx/qlnxe/ecore_roce_api.h
  head/sys/dev/qlnx/qlnxe/ecore_rt_defs.h
  head/sys/dev/qlnx/qlnxe/ecore_sp_api.h
  head/sys/dev/qlnx/qlnxe/ecore_sp_commands.c
  head/sys/dev/qlnx/qlnxe/ecore_sp_commands.h
  head/sys/dev/qlnx/qlnxe/ecore_spq.c
  head/sys/dev/qlnx/qlnxe/ecore_sriov.h
  head/sys/dev/qlnx/qlnxe/ecore_vf.h
  head/sys/dev/qlnx/qlnxe/ecore_vf_api.h
  head/sys/dev/qlnx/qlnxe/ecore_vfpf_if.h
  head/sys/dev/qlnx/qlnxe/eth_common.h
  head/sys/dev/qlnx/qlnxe/fcoe_common.h
  head/sys/dev/qlnx/qlnxe/iscsi_common.h
  head/sys/dev/qlnx/qlnxe/mcp_private.h
  head/sys/dev/qlnx/qlnxe/mcp_public.h
  head/sys/dev/qlnx/qlnxe/mfw_hsi.h
  head/sys/dev/qlnx/qlnxe/nvm_cfg.h
  head/sys/dev/qlnx/qlnxe/nvm_map.h
  head/sys/dev/qlnx/qlnxe/pcics_reg_driver.h
  head/sys/dev/qlnx/qlnxe/qlnx_def.h
  head/sys/dev/qlnx/qlnxe/qlnx_os.c
  head/sys/dev/qlnx/qlnxe/qlnx_ver.h
  head/sys/dev/qlnx/qlnxe/rdma_common.h
  head/sys/dev/qlnx/qlnxe/reg_addr.h
  head/sys/dev/qlnx/qlnxe/spad_layout.h
  head/sys/dev/qlnx/qlnxe/storage_common.h
  head/sys/dev/qlnx/qlnxe/tcp_common.h

Modified: head/sys/dev/qlnx/qlnxe/bcm_osal.h
==
--- head/sys/dev/qlnx/qlnxe/bcm_osal.h  Thu Jun 15 02:39:33 2017
(r319963)
+++ head/sys/dev/qlnx/qlnxe/bcm_osal.h  Thu Jun 15 02:45:43 2017
(r319964)
@@ -34,12 +34,17 @@
 #include "ecore_status.h"
 #include 
 
-#if __FreeBSD_version >= 1100090
+#if __FreeBSD_version >= 120
 #include 
 #else
+#if __FreeBSD_version >= 1100090
+#include 
+#else
 #include 
 #endif
+#endif
 
+#define OSAL_NUM_CPUS()mp_ncpus
 /*
  * prototypes of freebsd specific functions required by ecore
  */
@@ -60,6 +65,7 @@ extern int qlnx_pci_find_capability(void *ecore_dev, i
 
 extern uint32_t qlnx_direct_reg_rd32(void *p_hwfn, uint32_t *reg_addr);
 extern void qlnx_direct_reg_wr32(void *p_hwfn, void *reg_addr, uint32_t value);
+extern void qlnx_direct_reg_wr64(void *p_hwfn, void *reg_addr, uint64_t value);
 
 extern uint32_t qlnx_reg_rd32(void *p_hwfn, uint32_t reg_addr);
 extern void qlnx_reg_wr32(void *p_hwfn, uint32_t reg_addr, uint32_t value);
@@ -129,6 +135,8 @@ rounddown_pow_of_two(unsigned long x)
 
 #endif /* #ifndef QLNX_RDMA */
 
+#define OSAL_UNUSED
+
 #define OSAL_CPU_TO_BE64(val) htobe64(val)
 #define OSAL_BE64_TO_CPU(val) be64toh(val)
 
@@ -199,6 +207,8 @@ typedef struct osal_list_t
 #define REG_WR(hwfn, addr, val)  qlnx_reg_wr32(hwfn, addr, val)
 #define REG_WR16(hwfn, addr, val) qlnx_reg_wr16(hwfn, addr, val)
 #define DIRECT_REG_WR(p_hwfn, addr, value) qlnx_direct_reg_wr32(p_hwfn, addr, 
value)
+#define 

svn commit: r319962 - head/contrib/ipfilter/man

2017-06-14 Thread Cy Schubert
Author: cy
Date: Thu Jun 15 00:59:02 2017
New Revision: 319962
URL: https://svnweb.freebsd.org/changeset/base/319962

Log:
  Correct example directory location.
  
  Submitted by: olivier@
  MFC after:3 days

Modified:
  head/contrib/ipfilter/man/ipf.5

Modified: head/contrib/ipfilter/man/ipf.5
==
--- head/contrib/ipfilter/man/ipf.5 Thu Jun 15 00:32:01 2017
(r319961)
+++ head/contrib/ipfilter/man/ipf.5 Thu Jun 15 00:59:02 2017
(r319962)
@@ -1693,6 +1693,6 @@ environment.
 /dev/ipf
 /etc/ipf.conf
 .br
-/usr/share/examples/ipf  Directory with examples.
+/usr/share/examples/ipfilter  Directory with examples.
 .SH SEE ALSO
 ipf(8), ipfstat(8), ippool.conf(5), ippool(8)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r319897 - head/usr.bin/yes

2017-06-14 Thread Alexey Dokuchaev
On Tue, Jun 13, 2017 at 12:35:01PM +, Pietro Cerutti wrote:
> New Revision: 319897
> URL: https://svnweb.freebsd.org/changeset/base/319897
> 
> Log:
>   Improve yes' throughput
>   
>   On my system, this brings up the throughput from ~20 to ~600 MiB/s.

Nice.

>   Inspired by: 
> https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/

So, how does it now compares with GNU's on the same hardware?

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


Re: svn commit: r319722 - in head: sys/cam/ctl sys/dev/iscsi sys/kern sys/netgraph sys/netgraph/bluetooth/socket sys/netinet sys/ofed/drivers/infiniband/core sys/ofed/drivers/infiniband/ulp/sdp sys/

2017-06-14 Thread Mark Millard
Andreas Tobler andreast at FreeBSD.org wrote on
Wed Jun 14 08:00:03 UTC 2017:

> Hi Gleb,
> 
> with this revision I get either a kernel panic or a hang. This happens 
> on powerpc (32-bit). The powerpc64 looks stable.
> 
> Here you can see the backtrace in case of the panic:
> 
> https://people.freebsd.org/~andreast/r319722_ppc32_1.jpg
> 
> 
> In the source code I see a comment with XXXGL...
> Is this powerpc specific or do you think that there are some issues in 
> the uipc_socket.c code?

I'm not so sure that the specific change in
question will turn out to be the cause. Below
is about why I say that: similar problems
back in the likes of -r317820 and before.
(I'd frozen at -r317820 for weeks. That
is why I've no claims about later.)

TARGET=powerpc TARGET_ARCH=powerpc context. . .
(Not observed anywhere else. Also only
being used on a old PowerMac G5 so-called
"Quad Core".)

I've spent weeks trying to get evidence of crashes
that include jumps to non-code (and so illegal
instructions and such). This would happen if
busy or if sitting idle. Usually taking hours
to happen but could happen in minutes after
booting.

This goes back to -r317820 where I finally froze
the status for a while to focus on attempted
problem isolation or at least evidence. It goes
back farther as well but most of my effort was
on -r317820.

I found that the results were very memory layout
dependent. Inserting:

void HACKISH_EXTRA_CODE {}

into any one of a variety of source files
would change the resultant behavior. (No
calles to the routine but externally
accessible so not eliminate by the tool
chain.)

Adding any code to detect a observed failure
earlier also changed the type of failure seen,
making the change not directly effective.

In some cases the result was that I was
not able to identify a problem as happening
even with waiting well over 24 hours. (Longest
time to observed failure: 11 hours. A couple
around 8. The rest under 7). But something still
might have been trashed, just with less obvious
consequences.

In other cases other addressing errors occurred
or other out of bounds accesses occurred or
locks would spin too long or . . . You
probably get the idea.

All my effort basically only seemed to
show one thing: occasionally something
stomps on register values. It almost
has to be some interrupt activity that
does not restore context correctly. But
I never found anything that I could
identify as evidence of the prior
interrupt that might have happened.

I was completely unable to come up with
any useful identification of what specific
code was doing that trashing.

I recently gave up and am starting to work
on taking the machines that I have access
to past -r317820. That will eventually
include TARGET_ARCH=powerpc . 




Note: I eventually modified the kernel to
prevent execution of most kernel pages that
are from loading the file that also have no
code in the page. So this was PowerMac G5
specific but at least prevented executing
most potential garbage and should catch
jumping out of code areas more reliably
and sooner. (Not that it got me the answer
I was looking for.)


===
Mark Millard
markmi at dsl-only.net

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


Re: svn commit: r319897 - head/usr.bin/yes

2017-06-14 Thread Ngie Cooper
On Wed, Jun 14, 2017 at 7:27 AM, Bryan Drewery  wrote:

...

> The code has become more complex.  I think capsicum does make sense now
> in case there is an unseen overflow in the new optimized code.

Can we add SCTP support to it? I think we could totally make this
into a performant network service, e.g., an echo server that always
says, "yes". I don't think TCP would be performant enough, and I think
UDP's unreliable'ness doesn't have enough protocol guarantees to make
sure the sender-receiver pairs can submit streams of infinite
"yes"'es.
-Ngie
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r319957 - head/contrib/llvm/tools/lld/ELF

2017-06-14 Thread Ed Maste
Author: emaste
Date: Wed Jun 14 19:36:28 2017
New Revision: 319957
URL: https://svnweb.freebsd.org/changeset/base/319957

Log:
  lld: Add armelf emulation mode
  
  Obtained from:LLD r305375

Modified:
  head/contrib/llvm/tools/lld/ELF/Driver.cpp

Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp
==
--- head/contrib/llvm/tools/lld/ELF/Driver.cpp  Wed Jun 14 18:56:33 2017
(r319956)
+++ head/contrib/llvm/tools/lld/ELF/Driver.cpp  Wed Jun 14 19:36:28 2017
(r319957)
@@ -76,7 +76,7 @@ static std::tuple parseEmu
   std::pair Ret =
   StringSwitch>(S)
   .Cases("aarch64elf", "aarch64linux", {ELF64LEKind, EM_AARCH64})
-  .Case("armelf_linux_eabi", {ELF32LEKind, EM_ARM})
+  .Cases("armelf", "armelf_linux_eabi", {ELF32LEKind, EM_ARM})
   .Case("elf32_x86_64", {ELF32LEKind, EM_X86_64})
   .Case("elf32btsmip", {ELF32BEKind, EM_MIPS})
   .Case("elf32ltsmip", {ELF32LEKind, EM_MIPS})
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r319956 - head/contrib/llvm/tools/lld/ELF

2017-06-14 Thread Ed Maste
Author: emaste
Date: Wed Jun 14 18:56:33 2017
New Revision: 319956
URL: https://svnweb.freebsd.org/changeset/base/319956

Log:
  lld: Fix weak symbols on arm and aarch64
  
  Given
  
  .weak target
   .global _start
  _start:
   b target
  
  The intention is that the branch goes to the instruction after the
  branch, effectively turning it on a nop.  The branch adds the runtime
  PC, but we were adding it statically too.
  
  I noticed the oddity by inspection, but llvm-objdump seems to agree,
  since it now prints things like:
  
  b   #-4 <_start+0x4>
  
  Obtained from:  LLD commit r305212
  Differential Revision:  https://reviews.freebsd.org/D11191
  
  Reviewed by:  dim, Rafael EspĂ­ndola
  Obtained from:LLD r305212
  MFC after:3 days

Modified:
  head/contrib/llvm/tools/lld/ELF/InputSection.cpp

Modified: head/contrib/llvm/tools/lld/ELF/InputSection.cpp
==
--- head/contrib/llvm/tools/lld/ELF/InputSection.cppWed Jun 14 18:53:33 
2017(r319955)
+++ head/contrib/llvm/tools/lld/ELF/InputSection.cppWed Jun 14 18:56:33 
2017(r319956)
@@ -255,7 +255,7 @@ static uint32_t getARMUndefinedRelativeWeakVA(uint32_t
   uint32_t P) {
   switch (Type) {
   case R_ARM_THM_JUMP11:
-return P + 2;
+return P + 2 + A;
   case R_ARM_CALL:
   case R_ARM_JUMP24:
   case R_ARM_PC24:
@@ -263,12 +263,12 @@ static uint32_t getARMUndefinedRelativeWeakVA(uint32_t
   case R_ARM_PREL31:
   case R_ARM_THM_JUMP19:
   case R_ARM_THM_JUMP24:
-return P + 4;
+return P + 4 + A;
   case R_ARM_THM_CALL:
 // We don't want an interworking BLX to ARM
-return P + 5;
+return P + 5 + A;
   default:
-return A;
+return P + A;
   }
 }
 
@@ -279,9 +279,9 @@ static uint64_t getAArch64UndefinedRelativeWeakVA(uint
   case R_AARCH64_CONDBR19:
   case R_AARCH64_JUMP26:
   case R_AARCH64_TSTBR14:
-return P + 4;
+return P + 4 + A;
   default:
-return A;
+return P + A;
   }
 }
 
@@ -344,20 +344,30 @@ getRelocTargetVA(uint32_t Type, typename ELFT::uint A,
 return In::MipsGot->getVA() + In::MipsGot->getTlsOffset() +
In::MipsGot->getTlsIndexOff() - In::MipsGot->getGp();
   case R_PAGE_PC:
-  case R_PLT_PAGE_PC:
+  case R_PLT_PAGE_PC: {
+uint64_t Dest;
 if (Body.isUndefined() && !Body.isLocal() && Body.symbol()->isWeak())
-  return getAArch64Page(A);
-return getAArch64Page(Body.getVA(A)) - getAArch64Page(P);
-  case R_PC:
+  Dest = getAArch64Page(A);
+else
+  Dest = getAArch64Page(Body.getVA(A));
+return Dest - getAArch64Page(P);
+  }
+  case R_PC: {
+uint64_t Dest;
 if (Body.isUndefined() && !Body.isLocal() && Body.symbol()->isWeak()) {
   // On ARM and AArch64 a branch to an undefined weak resolves to the
   // next instruction, otherwise the place.
   if (Config->EMachine == EM_ARM)
-return getARMUndefinedRelativeWeakVA(Type, A, P);
-  if (Config->EMachine == EM_AARCH64)
-return getAArch64UndefinedRelativeWeakVA(Type, A, P);
+Dest = getARMUndefinedRelativeWeakVA(Type, A, P);
+  else if (Config->EMachine == EM_AARCH64)
+Dest = getAArch64UndefinedRelativeWeakVA(Type, A, P);
+  else
+Dest = Body.getVA(A);
+} else {
+  Dest = Body.getVA(A);
 }
-return Body.getVA(A) - P;
+return Dest - P;
+  }
   case R_PLT:
 return Body.getPltVA() + A;
   case R_PLT_PC:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r319955 - head/contrib/llvm/tools/lld/ELF

2017-06-14 Thread Ed Maste
Author: emaste
Date: Wed Jun 14 18:53:33 2017
New Revision: 319955
URL: https://svnweb.freebsd.org/changeset/base/319955

Log:
  lld: sort relocations
  
  No functional change; applied to facilitate merge of later LLD commit.
  
  Reviewed by:  dim, Rafael EspĂ­ndola
  Obtained from:LLD r298797
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D11190

Modified:
  head/contrib/llvm/tools/lld/ELF/InputSection.cpp
  head/contrib/llvm/tools/lld/ELF/Relocations.h

Modified: head/contrib/llvm/tools/lld/ELF/InputSection.cpp
==
--- head/contrib/llvm/tools/lld/ELF/InputSection.cppWed Jun 14 18:34:22 
2017(r319954)
+++ head/contrib/llvm/tools/lld/ELF/InputSection.cppWed Jun 14 18:53:33 
2017(r319955)
@@ -290,82 +290,37 @@ static typename ELFT::uint
 getRelocTargetVA(uint32_t Type, typename ELFT::uint A, typename ELFT::uint P,
  const SymbolBody , RelExpr Expr) {
   switch (Expr) {
-  case R_HINT:
-  case R_TLSDESC_CALL:
-llvm_unreachable("cannot relocate hint relocs");
-  case R_TLSLD:
-return In::Got->getTlsIndexOff() + A - In::Got->getSize();
-  case R_TLSLD_PC:
-return In::Got->getTlsIndexVA() + A - P;
-  case R_THUNK_ABS:
-return Body.getThunkVA() + A;
-  case R_THUNK_PC:
-  case R_THUNK_PLT_PC:
-return Body.getThunkVA() + A - P;
-  case R_PPC_TOC:
-return getPPC64TocBase() + A;
-  case R_TLSGD:
-return In::Got->getGlobalDynOffset(Body) + A -
-   In::Got->getSize();
-  case R_TLSGD_PC:
-return In::Got->getGlobalDynAddr(Body) + A - P;
-  case R_TLSDESC:
-return In::Got->getGlobalDynAddr(Body) + A;
-  case R_TLSDESC_PAGE:
-return getAArch64Page(In::Got->getGlobalDynAddr(Body) + A) -
-   getAArch64Page(P);
-  case R_PLT:
-return Body.getPltVA() + A;
-  case R_PLT_PC:
-  case R_PPC_PLT_OPD:
-return Body.getPltVA() + A - P;
-  case R_SIZE:
-return Body.getSize() + A;
+  case R_ABS:
+  case R_RELAX_GOT_PC_NOPIC:
+return Body.getVA(A);
+  case R_GOT:
+  case R_RELAX_TLS_GD_TO_IE_ABS:
+return Body.getGotVA() + A;
+  case R_GOTONLY_PC:
+return In::Got->getVA() + A - P;
+  case R_GOTONLY_PC_FROM_END:
+return In::Got->getVA() + A - P + In::Got->getSize();
   case R_GOTREL:
 return Body.getVA(A) - In::Got->getVA();
   case R_GOTREL_FROM_END:
 return Body.getVA(A) - In::Got->getVA() -
In::Got->getSize();
-  case R_RELAX_TLS_GD_TO_IE_END:
   case R_GOT_FROM_END:
+  case R_RELAX_TLS_GD_TO_IE_END:
 return Body.getGotOffset() + A - In::Got->getSize();
-  case R_RELAX_TLS_GD_TO_IE_ABS:
-  case R_GOT:
-return Body.getGotVA() + A;
-  case R_RELAX_TLS_GD_TO_IE_PAGE_PC:
+  case R_GOT_OFF:
+return Body.getGotOffset() + A;
   case R_GOT_PAGE_PC:
+  case R_RELAX_TLS_GD_TO_IE_PAGE_PC:
 return getAArch64Page(Body.getGotVA() + A) - getAArch64Page(P);
-  case R_RELAX_TLS_GD_TO_IE:
   case R_GOT_PC:
+  case R_RELAX_TLS_GD_TO_IE:
 return Body.getGotVA() + A - P;
-  case R_GOTONLY_PC:
-return In::Got->getVA() + A - P;
-  case R_GOTONLY_PC_FROM_END:
-return In::Got->getVA() + A - P + In::Got->getSize();
-  case R_RELAX_TLS_LD_TO_LE:
-  case R_RELAX_TLS_IE_TO_LE:
-  case R_RELAX_TLS_GD_TO_LE:
-  case R_TLS:
-// A weak undefined TLS symbol resolves to the base of the TLS
-// block, i.e. gets a value of zero. If we pass --gc-sections to
-// lld and .tbss is not referenced, it gets reclaimed and we don't
-// create a TLS program header. Therefore, we resolve this
-// statically to zero.
-if (Body.isTls() && (Body.isLazy() || Body.isUndefined()) &&
-Body.symbol()->isWeak())
-  return 0;
-if (Target->TcbSize)
-  return Body.getVA(A) +
- alignTo(Target->TcbSize, Out::TlsPhdr->p_align);
-return Body.getVA(A) - Out::TlsPhdr->p_memsz;
-  case R_RELAX_TLS_GD_TO_LE_NEG:
-  case R_NEG_TLS:
-return Out::TlsPhdr->p_memsz - Body.getVA(A);
-  case R_ABS:
-  case R_RELAX_GOT_PC_NOPIC:
-return Body.getVA(A);
-  case R_GOT_OFF:
-return Body.getGotOffset() + A;
+  case R_HINT:
+  case R_TLSDESC_CALL:
+llvm_unreachable("cannot relocate hint relocs");
+  case R_MIPS_GOTREL:
+return Body.getVA(A) - In::MipsGot->getGp();
   case R_MIPS_GOT_LOCAL_PAGE:
 // If relocation against MIPS local symbol requires GOT entry, this entry
 // should be initialized by 'page address'. This address is high 16-bits
@@ -381,8 +336,6 @@ getRelocTargetVA(uint32_t Type, typename ELFT::uint A,
 return In::MipsGot->getVA() +
In::MipsGot->getBodyEntryOffset(Body, A) -
In::MipsGot->getGp();
-  case R_MIPS_GOTREL:
-return Body.getVA(A) - In::MipsGot->getGp();
   case R_MIPS_TLSGD:
 return In::MipsGot->getVA() + In::MipsGot->getTlsOffset() +
In::MipsGot->getGlobalDynOffset(Body) -
@@ -390,6 +343,26 @@ getRelocTargetVA(uint32_t Type, typename ELFT::uint A,
   case R_MIPS_TLSLD:
  

svn commit: r319954 - head/usr.sbin/freebsd-update

2017-06-14 Thread Glen Barber
Author: gjb
Date: Wed Jun 14 18:34:22 2017
New Revision: 319954
URL: https://svnweb.freebsd.org/changeset/base/319954

Log:
  Modernize FreeBSD version numbers in freebsd-update(8).
  While here, expand a contraction to make textproc/igor happy.
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/freebsd-update/freebsd-update.8

Modified: head/usr.sbin/freebsd-update/freebsd-update.8
==
--- head/usr.sbin/freebsd-update/freebsd-update.8   Wed Jun 14 16:55:47 
2017(r319953)
+++ head/usr.sbin/freebsd-update/freebsd-update.8   Wed Jun 14 18:34:22 
2017(r319954)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 2, 2015
+.Dd June 14, 2017
 .Dt FREEBSD-UPDATE 8
 .Os FreeBSD
 .Sh NAME
@@ -56,13 +56,13 @@ by the
 .Fx
 Release Engineering Team, e.g.,
 .Fx
-9.3-RELEASE and
+10.3-RELEASE and
 .Fx
-10.1-RELEASE, but not
+11.0-RELEASE, but not
 .Fx
-9.3-STABLE or
+10.3-STABLE or
 .Fx
-11-CURRENT.
+12-CURRENT.
 .Sh OPTIONS
 The following options are supported:
 .Bl -tag -width "-r newrelease"
@@ -114,7 +114,7 @@ Please do not run
 from crontab or similar using this flag, see:
 .Nm Cm cron
 .It Fl -currently-running Ar release
-Don't detect the currently-running release; instead, assume that the
+Do not detect the currently-running release; instead, assume that the
 system is running the specified
 .Ar release .
 This is most likely to be useful when upgrading jails.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r319953 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2017-06-14 Thread Andriy Gapon
Author: avg
Date: Wed Jun 14 16:55:47 2017
New Revision: 319953
URL: https://svnweb.freebsd.org/changeset/base/319953

Log:
  MFV r319951: 8311 ZFS_READONLY is a little too strict
  
  illumos/illumos-gate@2889ec41c05e9ffe1890b529b3111354da325aeb
  
https://github.com/illumos/illumos-gate/commit/2889ec41c05e9ffe1890b529b3111354da325aeb
  
  https://www.illumos.org/issues/8311
Description:
There was a misunderstanding about the enforcement details of the 
"Read-only"
flag introduced for SMB/CIFS compatibility, way back in 2007 in the Sun 
PSARC
2007/315 case.
The original authors thought enforcement of the READONLY flag should work
similarly as the IMMUTABLE flag. Unfortunately, that enforcement is
incompatible with the expectations of Windows applications using this 
feature
through the SMB service. Applications assume (and the MS File System 
Algorithms
MS-FSA confirms they should) that an SMB client can:
(a) Open an SMB handle on a file with read/write access,
(b) Set the DOS attributes to include the READONLY flag,
(c) continue to have write access via that handle.
This access model is essentially the same as a Unix/POSIX application that
creates a file (with read/write access), uses fchmod() to change the file 
mode
to something not granting write access (i.e. 0444), and then continues to 
write
that file using the open handle it got before the mode change.
Currently, the SMB server works-around this problem in a way that will 
become
difficult to maintain as we implement support for SMB3 persistent handles, 
so
SMB depends on this fix.
I've written a test program that can be used to demonstrate this problem, 
and
added it to zfs-tests (tests/functional/acl/cifs/cifs_attr_004_pos).
It currently fails, but will pass when this problem fixed.
Steps to Reproduce:
  Run the test program on a ZFS file system.
Expected Results:
  Pass
Actual Results:
  Fail.
  
  Reviewed by: Sanjay Nadkarni 
  Reviewed by: Yuri Pankov 
  Reviewed by: Andrew Stormont 
  Reviewed by: Matt Ahrens 
  Reviewed by: John Kennedy 
  Approved by: Prakash Surya 
  Author: Gordon Ross 
  MFC after:2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c   Wed Jun 
14 16:55:23 2017(r319952)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c   Wed Jun 
14 16:55:47 2017(r319953)
@@ -20,8 +20,8 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  */
 
 #include 
@@ -2017,13 +2017,11 @@ zfs_zaccess_dataset_check(znode_t *zp, uint32_t v4_mod
}
 
/*
-* Only check for READONLY on non-directories.
+* Intentionally allow ZFS_READONLY through here.
+* See zfs_zaccess_common().
 */
if ((v4_mode & WRITE_MASK_DATA) &&
-   (((ZTOV(zp)->v_type != VDIR) &&
-   (zp->z_pflags & (ZFS_READONLY | ZFS_IMMUTABLE))) ||
-   (ZTOV(zp)->v_type == VDIR &&
-   (zp->z_pflags & ZFS_IMMUTABLE {
+   (zp->z_pflags & ZFS_IMMUTABLE)) {
return (SET_ERROR(EPERM));
}
 
@@ -2246,6 +2244,24 @@ zfs_zaccess_common(znode_t *zp, uint32_t v4_mode, uint
if (skipaclchk) {
*working_mode = 0;
return (0);
+   }
+
+   /*
+* Note: ZFS_READONLY represents the "DOS R/O" attribute.
+* When that flag is set, we should behave as if write access
+* were not granted by anything in the ACL.  In particular:
+* We _must_ allow writes after opening the file r/w, then
+* setting the DOS R/O attribute, and writing some more.
+* (Similar to how you can write after fchmod(fd, 0444).)
+*
+* Therefore ZFS_READONLY is ignored in the dataset check
+* above, and checked here as if part of the ACL check.
+* Also note: DOS R/O is ignored for directories.
+*/
+   if ((v4_mode & WRITE_MASK_DATA) &&
+   (ZTOV(zp)->v_type != VDIR) &&
+   (zp->z_pflags & ZFS_READONLY)) {
+   return (SET_ERROR(EPERM));
}
 
return (zfs_zaccess_aces_check(zp, working_mode, B_FALSE, cr));

Modified: 

svn commit: r319952 - head/sys/ofed/drivers/infiniband/core

2017-06-14 Thread Mark Johnston
Author: markj
Date: Wed Jun 14 16:55:23 2017
New Revision: 319952
URL: https://svnweb.freebsd.org/changeset/base/319952

Log:
  Fix indentation.
  
  MFC after:1 week

Modified:
  head/sys/ofed/drivers/infiniband/core/mad.c

Modified: head/sys/ofed/drivers/infiniband/core/mad.c
==
--- head/sys/ofed/drivers/infiniband/core/mad.c Wed Jun 14 16:46:49 2017
(r319951)
+++ head/sys/ofed/drivers/infiniband/core/mad.c Wed Jun 14 16:55:23 2017
(r319952)
@@ -1702,28 +1702,28 @@ int ib_post_send_mad(struct ib_mad_send_buf *send_buf,
if (ret < 0)
goto error;
} else {
-   /* Reference MAD agent until send completes */
-   atomic_inc(_agent_priv->refcount);
-   spin_lock_irqsave(_agent_priv->lock, flags);
-   list_add_tail(_send_wr->agent_list,
- _agent_priv->send_list);
-   spin_unlock_irqrestore(_agent_priv->lock, flags);
-
-   if (mad_agent_priv->agent.rmpp_version) {
-   ret = ib_send_rmpp_mad(mad_send_wr);
-   if (ret >= 0 && ret != IB_RMPP_RESULT_CONSUMED)
-   ret = ib_send_mad(mad_send_wr);
-   } else
-   ret = ib_send_mad(mad_send_wr);
-   if (ret < 0) {
-   /* Fail send request */
+   /* Reference MAD agent until send completes */
+   atomic_inc(_agent_priv->refcount);
spin_lock_irqsave(_agent_priv->lock, flags);
-   list_del(_send_wr->agent_list);
+   list_add_tail(_send_wr->agent_list,
+ _agent_priv->send_list);
spin_unlock_irqrestore(_agent_priv->lock, flags);
-   atomic_dec(_agent_priv->refcount);
-   goto error;
+
+   if (mad_agent_priv->agent.rmpp_version) {
+   ret = ib_send_rmpp_mad(mad_send_wr);
+   if (ret >= 0 && ret != IB_RMPP_RESULT_CONSUMED)
+   ret = ib_send_mad(mad_send_wr);
+   } else
+   ret = ib_send_mad(mad_send_wr);
+   if (ret < 0) {
+   /* Fail send request */
+   spin_lock_irqsave(_agent_priv->lock, flags);
+   list_del(_send_wr->agent_list);
+   spin_unlock_irqrestore(_agent_priv->lock, 
flags);
+   atomic_dec(_agent_priv->refcount);
+   goto error;
+   }
}
-   }
}
return 0;
 error:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r319949 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2017-06-14 Thread Andriy Gapon
Author: avg
Date: Wed Jun 14 16:42:38 2017
New Revision: 319949
URL: https://svnweb.freebsd.org/changeset/base/319949

Log:
  MFV r319948: 5428 provide fts(), reallocarray(), and strtonum()
  
  illumos/illumos-gate@4585130b259133a26efae68275dbe56b08366deb
  
https://github.com/illumos/illumos-gate/commit/4585130b259133a26efae68275dbe56b08366deb
  
  https://www.illumos.org/issues/5428
  
  Most of the upstream change is not applicable to FreeBSD.
  Only the renaming of strtonum to zfs_strtonum is relevant to us.
  And we already had it partially done.
  
  Reviewed by: Robert Mustacchi 
  Approved by: Joshua M. Clulow 
  Author: Yuri Pankov 
  MFC after:1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c  Wed Jun 
14 16:36:01 2017(r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c  Wed Jun 
14 16:42:38 2017(r319949)
@@ -85,7 +85,7 @@ dsl_deadlist_load_tree(dsl_deadlist_t *dl)
zap_cursor_retrieve(, ) == 0;
zap_cursor_advance()) {
dsl_deadlist_entry_t *dle = kmem_alloc(sizeof (*dle), KM_SLEEP);
-   dle->dle_mintxg = strtonum(za.za_name, NULL);
+   dle->dle_mintxg = zfs_strtonum(za.za_name, NULL);
VERIFY3U(0, ==, bpobj_open(>dle_bpobj, dl->dl_os,
za.za_first_integer));
avl_add(>dl_tree, dle);
@@ -490,7 +490,7 @@ dsl_deadlist_merge(dsl_deadlist_t *dl, uint64_t obj, d
for (zap_cursor_init(, dl->dl_os, obj);
zap_cursor_retrieve(, ) == 0;
zap_cursor_advance()) {
-   uint64_t mintxg = strtonum(za.za_name, NULL);
+   uint64_t mintxg = zfs_strtonum(za.za_name, NULL);
dsl_deadlist_insert_bpobj(dl, za.za_first_integer, mintxg, tx);
VERIFY3U(0, ==, zap_remove_int(dl->dl_os, obj, mintxg, tx));
}

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c  Wed Jun 
14 16:36:01 2017(r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c  Wed Jun 
14 16:42:38 2017(r319949)
@@ -1389,7 +1389,7 @@ dsl_scan_visit(dsl_scan_t *scn, dmu_tx_t *tx)
dsl_dataset_t *ds;
uint64_t dsobj;
 
-   dsobj = strtonum(za.za_name, NULL);
+   dsobj = zfs_strtonum(za.za_name, NULL);
VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
scn->scn_phys.scn_queue_obj, dsobj, tx));
 

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c  Wed Jun 
14 16:36:01 2017(r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c  Wed Jun 
14 16:42:38 2017(r319949)
@@ -340,7 +340,7 @@ static int
 dsl_dataset_hold_obj_string(dsl_pool_t *dp, const char *dsobj, void *tag,
 dsl_dataset_t **dsp)
 {
-   return (dsl_dataset_hold_obj(dp, strtonum(dsobj, NULL), tag, dsp));
+   return (dsl_dataset_hold_obj(dp, zfs_strtonum(dsobj, NULL), tag, dsp));
 }
 
 static int

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.cWed Jun 
14 16:36:01 2017(r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.cWed Jun 
14 16:42:38 2017(r319949)
@@ -73,13 +73,13 @@ bookmark_to_name(zbookmark_phys_t *zb, char *buf, size
 static void
 name_to_bookmark(char *buf, zbookmark_phys_t *zb)
 {
-   zb->zb_objset = strtonum(buf, );
+   zb->zb_objset = zfs_strtonum(buf, );
ASSERT(*buf == ':');
-   zb->zb_object = strtonum(buf + 1, );
+   zb->zb_object = zfs_strtonum(buf + 1, );
ASSERT(*buf == ':');
-   zb->zb_level = (int)strtonum(buf + 1, );
+   zb->zb_level = (int)zfs_strtonum(buf + 1, );
ASSERT(*buf == ':');
-   zb->zb_blkid = strtonum(buf + 1, );
+  

svn commit: r319947 - in head: cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2017-06-14 Thread Andriy Gapon
Author: avg
Date: Wed Jun 14 16:31:36 2017
New Revision: 319947
URL: https://svnweb.freebsd.org/changeset/base/319947

Log:
  MFV r319945,r319946: 8264 want support for promoting datasets in libzfs_core
  
  illumos/illumos-gate@a4b8c9aa65a0a735aba318024a424a90d7b06c37
  
https://github.com/illumos/illumos-gate/commit/a4b8c9aa65a0a735aba318024a424a90d7b06c37
  
  https://www.illumos.org/issues/8264
Oddly there is a lzc_clone function, but no lzc_promote function.
  
  Reviewed by: Andriy Gapon 
  Reviewed by: Matthew Ahrens 
  Reviewed by: Dan McDonald 
  Approved by: Dan McDonald 
  Author: Andrew Stormont 
  MFC after:1 week

Modified:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
  head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
  head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
==
--- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cWed Jun 
14 16:27:54 2017(r319946)
+++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cWed Jun 
14 16:31:36 2017(r319947)
@@ -30,6 +30,7 @@
  * Copyright (c) 2014 Integros [integros.com]
  * Copyright 2016 Nexenta Systems, Inc.
  * Copyright 2016 Igor Kozhukhov 
+ * Copyright 2017 RackTop Systems.
  */
 
 #include 
@@ -3675,8 +3676,7 @@ int
 zfs_promote(zfs_handle_t *zhp)
 {
libzfs_handle_t *hdl = zhp->zfs_hdl;
-   zfs_cmd_t zc = { 0 };
-   char parent[MAXPATHLEN];
+   char snapname[ZFS_MAX_DATASET_NAME_LEN];
int ret;
char errbuf[1024];
 
@@ -3689,31 +3689,25 @@ zfs_promote(zfs_handle_t *zhp)
return (zfs_error(hdl, EZFS_BADTYPE, errbuf));
}
 
-   (void) strlcpy(parent, zhp->zfs_dmustats.dds_origin, sizeof (parent));
-   if (parent[0] == '\0') {
+   if (zhp->zfs_dmustats.dds_origin[0] == '\0') {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"not a cloned filesystem"));
return (zfs_error(hdl, EZFS_BADTYPE, errbuf));
}
 
-   (void) strlcpy(zc.zc_value, zhp->zfs_dmustats.dds_origin,
-   sizeof (zc.zc_value));
-   (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
-   ret = zfs_ioctl(hdl, ZFS_IOC_PROMOTE, );
+   ret = lzc_promote(zhp->zfs_name, snapname, sizeof (snapname));
 
if (ret != 0) {
-   int save_errno = errno;
-
-   switch (save_errno) {
+   switch (ret) {
case EEXIST:
/* There is a conflicting snapshot name. */
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"conflicting snapshot '%s' from parent '%s'"),
-   zc.zc_string, parent);
+   snapname, zhp->zfs_dmustats.dds_origin);
return (zfs_error(hdl, EZFS_EXISTS, errbuf));
 
default:
-   return (zfs_standard_error(hdl, save_errno, errbuf));
+   return (zfs_standard_error(hdl, ret, errbuf));
}
}
return (ret);

Modified: head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
==
--- head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c  Wed Jun 
14 16:27:54 2017(r319946)
+++ head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c  Wed Jun 
14 16:31:36 2017(r319947)
@@ -23,6 +23,7 @@
  * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  * Copyright (c) 2013 Steven Hartland. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2017 RackTop Systems.
  */
 
 /*
@@ -244,6 +245,28 @@ lzc_clone(const char *fsname, const char *origin,
return (error);
 }
 
+int
+lzc_promote(const char *fsname, char *snapnamebuf, int snapnamelen)
+{
+   /*
+* The promote ioctl is still legacy, so we need to construct our
+* own zfs_cmd_t rather than using lzc_ioctl().
+*/
+   zfs_cmd_t zc = { 0 };
+
+   ASSERT3S(g_refcount, >, 0);
+   VERIFY3S(g_fd, !=, -1);
+
+   (void) strlcpy(zc.zc_name, fsname, sizeof (zc.zc_name));
+   if (ioctl(g_fd, ZFS_IOC_PROMOTE, ) != 0) {
+   int error = errno;
+   if (error == EEXIST && snapnamebuf != NULL)
+   (void) strlcpy(snapnamebuf, zc.zc_string, snapnamelen);
+

svn commit: r319944 - head/sys/netgraph

2017-06-14 Thread Gleb Smirnoff
Author: glebius
Date: Wed Jun 14 16:13:20 2017
New Revision: 319944
URL: https://svnweb.freebsd.org/changeset/base/319944

Log:
  Check return value from soaccept().
  
  Coverity: 1376209

Modified:
  head/sys/netgraph/ng_ksocket.c

Modified: head/sys/netgraph/ng_ksocket.c
==
--- head/sys/netgraph/ng_ksocket.c  Wed Jun 14 13:44:32 2017
(r319943)
+++ head/sys/netgraph/ng_ksocket.c  Wed Jun 14 16:13:20 2017
(r319944)
@@ -1184,7 +1184,8 @@ ng_ksocket_accept(priv_p priv)
if (error)
return (error);
 
-   soaccept(so, );
+   if ((error = soaccept(so, )) != 0)
+   return (error);
 
len = OFFSETOF(struct ng_ksocket_accept, addr);
if (sa != NULL)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r319905 - in head/sys: kern sys

2017-06-14 Thread Alan Cox
On 06/14/2017 10:52, Rodney W. Grimes wrote:
> [ Charset UTF-8 unsupported, converting... ]
>> On 06/14/2017 06:04, Hans Petter Selasky wrote:
>>> On 06/13/17 19:49, Alan Cox wrote:
 +#definebitcount64(x)__bitcount64((uint64_t)(x))
>>> bitcount64() is already defined by sys/libkern.h - use that? 
>> This snippet appears in code that is only used when compiling this file
>> as a user-space application for testing.  Attempting to use
>> sys/libkern.h in the user-space compilation provoked warnings.
> Could we please add a comment to this define indicating this?
>
This snippet is enclosed in the #else of an #ifdef _KERNEL, where the
entire #ifdef _KERNEL is not that long, so if you're looking at the
actual file rather than a diff, it's pretty clear.  And just a few lines
above the #ifdef _KERNEL is the comment:

 *  
   

 *  This code can be compiled stand-alone for
debugging.   
 */


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


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

2017-06-14 Thread Peter Holm
On Wed, Jun 14, 2017 at 09:21:30AM -0600, Sean Bruno wrote:
> 
> 
> On 06/14/17 08:46, Peter Holm wrote:
> > On Wed, Jun 14, 2017 at 08:38:36AM -0600, Sean Bruno wrote:
> >>
> >>
> >> On 06/14/17 03:17, Peter Holm wrote:
> >>> On Tue, Jun 13, 2017 at 11:16:39PM +, Sean Bruno wrote:
>  Author: sbruno
>  Date: Tue Jun 13 23:16:38 2017
>  New Revision: 319921
>  URL: https://svnweb.freebsd.org/changeset/base/319921
> 
>  Log:
>    Add new sysctl to allow changing of timing of the txq timers.
>    
>    Add new sysctl to override use of busdma in the driver.
>    
>    Submitted by:  Drew Gallitin 
> 
>  Modified:
>    head/sys/net/iflib.c
> 
>  Modified: head/sys/net/iflib.c
>  ==
>  --- head/sys/net/iflib.c Tue Jun 13 22:57:57 2017(r319920)
> >>>
> >>> Could this be yours?
> >>>
> >>> panic: Assertion ifsd_m[next] == NULL failed at ../../../net/iflib.c:2927
> >>> cpuid = 12
> >>> time = 1497431647
> >>> KDB: stack backtrace:
> >>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
> >>> 0xfe104fa993d0
> >>> vpanic() at vpanic+0x19c/frame 0xfe104fa99450
> >>> kassert_panic() at kassert_panic+0x126/frame 0xfe104fa994c0
> >>> iflib_txq_drain() at iflib_txq_drain+0xdf0/frame 0xfe104fa99640
> >>> drain_ring_lockless() at drain_ring_lockless+0xc0/frame 0xfe104fa996a0
> >>> ifmp_ring_enqueue() at ifmp_ring_enqueue+0x32e/frame 0xfe104fa99710
> >>> iflib_if_transmit() at iflib_if_transmit+0xb0/frame 0xfe104fa99750
> >>> ether_output() at ether_output+0x750/frame 0xfe104fa997f0
> >>> ip_output() at ip_output+0x14c3/frame 0xfe104fa99930
> >>> tcp_output() at tcp_output+0xf8c/frame 0xfe104fa99ad0
> >>> tcp_usr_send() at tcp_usr_send+0x3bd/frame 0xfe104fa99b40
> >>> sosend_generic() at sosend_generic+0x3ba/frame 0xfe104fa99bf0
> >>> clnt_vc_call() at clnt_vc_call+0x4b8/frame 0xfe104fa99d40
> >>> clnt_reconnect_call() at clnt_reconnect_call+0xe8/frame 0xfe104fa99de0
> >>> newnfs_request() at newnfs_request+0x1092/frame 0xfe104fa99f60
> >>> nfscl_request() at nfscl_request+0x5b/frame 0xfe104fa99fb0
> >>> nfsrpc_lookup() at nfsrpc_lookup+0x211/frame 0xfe104fa9a120
> >>> nfs_lookup() at nfs_lookup+0x463/frame 0xfe104fa9a460
> >>> VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0xfe/frame 0xfe104fa9a490
> >>> lookup() at lookup+0x6e2/frame 0xfe104fa9a530
> >>> namei() at namei+0x534/frame 0xfe104fa9a5f0
> >>> kern_statat() at kern_statat+0x9b/frame 0xfe104fa9a800
> >>> freebsd11_lstat() at freebsd11_lstat+0x33/frame 0xfe104fa9a980
> >>> amd64_syscall() at amd64_syscall+0x564/frame 0xfe104fa9aab0
> >>> Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe104fa9aab0
> >>> --- syscall (190, FreeBSD ELF64, freebsd11_lstat), rip = 0x800910c7a, rsp 
> >>> = 0x7fffaed8, rbp = 0x7fffaf00 --
> >>>
> >>> - Peter
> >>>
> >>>
> >>
> >>
> >> Is this new of this morning (after I committed updates yesterday)?
> >>
> >> sean
> >>
> > 
> > It's with r319940M. I'm now using r319919 without this issue.
> > 
> > Here's the full boot log: https://people.freebsd.org/~pho/iflib.txt
> > 
> > - Peter
> > 
> 
> 
> Did you have to run any tests or anything to get this to happen?
> 

It varied slightly when I could get the panic. The one in the log was
from just booting:

Starting sshd.
Starting sendmail_submit.
Starting sendmail_msp_queue.
Starting cron.
Local package initialization:Jun 14 11:14:05 t1 ntpd[771]: leapsecond file 
('/var/db/ntpd.leap-seconds.list'): expired less than 14 days ago
panic: Assertion ifsd_m[next] == NULL failed at ../../../net/iflib.c:2927

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


Re: svn commit: r319905 - in head/sys: kern sys

2017-06-14 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On 06/14/2017 06:04, Hans Petter Selasky wrote:
> > On 06/13/17 19:49, Alan Cox wrote:
> >> +#definebitcount64(x)__bitcount64((uint64_t)(x))
> >
> > bitcount64() is already defined by sys/libkern.h - use that? 
> 
> This snippet appears in code that is only used when compiling this file
> as a user-space application for testing.  Attempting to use
> sys/libkern.h in the user-space compilation provoked warnings.

Could we please add a comment to this define indicating this?

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


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

2017-06-14 Thread Sean Bruno


On 06/14/17 08:46, Peter Holm wrote:
> On Wed, Jun 14, 2017 at 08:38:36AM -0600, Sean Bruno wrote:
>>
>>
>> On 06/14/17 03:17, Peter Holm wrote:
>>> On Tue, Jun 13, 2017 at 11:16:39PM +, Sean Bruno wrote:
 Author: sbruno
 Date: Tue Jun 13 23:16:38 2017
 New Revision: 319921
 URL: https://svnweb.freebsd.org/changeset/base/319921

 Log:
   Add new sysctl to allow changing of timing of the txq timers.
   
   Add new sysctl to override use of busdma in the driver.
   
   Submitted by:Drew Gallitin 

 Modified:
   head/sys/net/iflib.c

 Modified: head/sys/net/iflib.c
 ==
 --- head/sys/net/iflib.c   Tue Jun 13 22:57:57 2017(r319920)
>>>
>>> Could this be yours?
>>>
>>> panic: Assertion ifsd_m[next] == NULL failed at ../../../net/iflib.c:2927
>>> cpuid = 12
>>> time = 1497431647
>>> KDB: stack backtrace:
>>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
>>> 0xfe104fa993d0
>>> vpanic() at vpanic+0x19c/frame 0xfe104fa99450
>>> kassert_panic() at kassert_panic+0x126/frame 0xfe104fa994c0
>>> iflib_txq_drain() at iflib_txq_drain+0xdf0/frame 0xfe104fa99640
>>> drain_ring_lockless() at drain_ring_lockless+0xc0/frame 0xfe104fa996a0
>>> ifmp_ring_enqueue() at ifmp_ring_enqueue+0x32e/frame 0xfe104fa99710
>>> iflib_if_transmit() at iflib_if_transmit+0xb0/frame 0xfe104fa99750
>>> ether_output() at ether_output+0x750/frame 0xfe104fa997f0
>>> ip_output() at ip_output+0x14c3/frame 0xfe104fa99930
>>> tcp_output() at tcp_output+0xf8c/frame 0xfe104fa99ad0
>>> tcp_usr_send() at tcp_usr_send+0x3bd/frame 0xfe104fa99b40
>>> sosend_generic() at sosend_generic+0x3ba/frame 0xfe104fa99bf0
>>> clnt_vc_call() at clnt_vc_call+0x4b8/frame 0xfe104fa99d40
>>> clnt_reconnect_call() at clnt_reconnect_call+0xe8/frame 0xfe104fa99de0
>>> newnfs_request() at newnfs_request+0x1092/frame 0xfe104fa99f60
>>> nfscl_request() at nfscl_request+0x5b/frame 0xfe104fa99fb0
>>> nfsrpc_lookup() at nfsrpc_lookup+0x211/frame 0xfe104fa9a120
>>> nfs_lookup() at nfs_lookup+0x463/frame 0xfe104fa9a460
>>> VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0xfe/frame 0xfe104fa9a490
>>> lookup() at lookup+0x6e2/frame 0xfe104fa9a530
>>> namei() at namei+0x534/frame 0xfe104fa9a5f0
>>> kern_statat() at kern_statat+0x9b/frame 0xfe104fa9a800
>>> freebsd11_lstat() at freebsd11_lstat+0x33/frame 0xfe104fa9a980
>>> amd64_syscall() at amd64_syscall+0x564/frame 0xfe104fa9aab0
>>> Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe104fa9aab0
>>> --- syscall (190, FreeBSD ELF64, freebsd11_lstat), rip = 0x800910c7a, rsp = 
>>> 0x7fffaed8, rbp = 0x7fffaf00 --
>>>
>>> - Peter
>>>
>>>
>>
>>
>> Is this new of this morning (after I committed updates yesterday)?
>>
>> sean
>>
> 
> It's with r319940M. I'm now using r319919 without this issue.
> 
> Here's the full boot log: https://people.freebsd.org/~pho/iflib.txt
> 
> - Peter
> 


Did you have to run any tests or anything to get this to happen?

sean



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r319905 - in head/sys: kern sys

2017-06-14 Thread Alan Cox
On 06/14/2017 06:04, Hans Petter Selasky wrote:
> On 06/13/17 19:49, Alan Cox wrote:
>> +#definebitcount64(x)__bitcount64((uint64_t)(x))
>
> bitcount64() is already defined by sys/libkern.h - use that? 

This snippet appears in code that is only used when compiling this file
as a user-space application for testing.  Attempting to use
sys/libkern.h in the user-space compilation provoked warnings.

Alan


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


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

2017-06-14 Thread Peter Holm
On Wed, Jun 14, 2017 at 08:38:36AM -0600, Sean Bruno wrote:
> 
> 
> On 06/14/17 03:17, Peter Holm wrote:
> > On Tue, Jun 13, 2017 at 11:16:39PM +, Sean Bruno wrote:
> >> Author: sbruno
> >> Date: Tue Jun 13 23:16:38 2017
> >> New Revision: 319921
> >> URL: https://svnweb.freebsd.org/changeset/base/319921
> >>
> >> Log:
> >>   Add new sysctl to allow changing of timing of the txq timers.
> >>   
> >>   Add new sysctl to override use of busdma in the driver.
> >>   
> >>   Submitted by:Drew Gallitin 
> >>
> >> Modified:
> >>   head/sys/net/iflib.c
> >>
> >> Modified: head/sys/net/iflib.c
> >> ==
> >> --- head/sys/net/iflib.c   Tue Jun 13 22:57:57 2017(r319920)
> > 
> > Could this be yours?
> > 
> > panic: Assertion ifsd_m[next] == NULL failed at ../../../net/iflib.c:2927
> > cpuid = 12
> > time = 1497431647
> > KDB: stack backtrace:
> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
> > 0xfe104fa993d0
> > vpanic() at vpanic+0x19c/frame 0xfe104fa99450
> > kassert_panic() at kassert_panic+0x126/frame 0xfe104fa994c0
> > iflib_txq_drain() at iflib_txq_drain+0xdf0/frame 0xfe104fa99640
> > drain_ring_lockless() at drain_ring_lockless+0xc0/frame 0xfe104fa996a0
> > ifmp_ring_enqueue() at ifmp_ring_enqueue+0x32e/frame 0xfe104fa99710
> > iflib_if_transmit() at iflib_if_transmit+0xb0/frame 0xfe104fa99750
> > ether_output() at ether_output+0x750/frame 0xfe104fa997f0
> > ip_output() at ip_output+0x14c3/frame 0xfe104fa99930
> > tcp_output() at tcp_output+0xf8c/frame 0xfe104fa99ad0
> > tcp_usr_send() at tcp_usr_send+0x3bd/frame 0xfe104fa99b40
> > sosend_generic() at sosend_generic+0x3ba/frame 0xfe104fa99bf0
> > clnt_vc_call() at clnt_vc_call+0x4b8/frame 0xfe104fa99d40
> > clnt_reconnect_call() at clnt_reconnect_call+0xe8/frame 0xfe104fa99de0
> > newnfs_request() at newnfs_request+0x1092/frame 0xfe104fa99f60
> > nfscl_request() at nfscl_request+0x5b/frame 0xfe104fa99fb0
> > nfsrpc_lookup() at nfsrpc_lookup+0x211/frame 0xfe104fa9a120
> > nfs_lookup() at nfs_lookup+0x463/frame 0xfe104fa9a460
> > VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0xfe/frame 0xfe104fa9a490
> > lookup() at lookup+0x6e2/frame 0xfe104fa9a530
> > namei() at namei+0x534/frame 0xfe104fa9a5f0
> > kern_statat() at kern_statat+0x9b/frame 0xfe104fa9a800
> > freebsd11_lstat() at freebsd11_lstat+0x33/frame 0xfe104fa9a980
> > amd64_syscall() at amd64_syscall+0x564/frame 0xfe104fa9aab0
> > Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe104fa9aab0
> > --- syscall (190, FreeBSD ELF64, freebsd11_lstat), rip = 0x800910c7a, rsp = 
> > 0x7fffaed8, rbp = 0x7fffaf00 --
> > 
> > - Peter
> > 
> > 
> 
> 
> Is this new of this morning (after I committed updates yesterday)?
> 
> sean
> 

It's with r319940M. I'm now using r319919 without this issue.

Here's the full boot log: https://people.freebsd.org/~pho/iflib.txt

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


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

2017-06-14 Thread Sean Bruno


On 06/14/17 03:17, Peter Holm wrote:
> On Tue, Jun 13, 2017 at 11:16:39PM +, Sean Bruno wrote:
>> Author: sbruno
>> Date: Tue Jun 13 23:16:38 2017
>> New Revision: 319921
>> URL: https://svnweb.freebsd.org/changeset/base/319921
>>
>> Log:
>>   Add new sysctl to allow changing of timing of the txq timers.
>>   
>>   Add new sysctl to override use of busdma in the driver.
>>   
>>   Submitted by:  Drew Gallitin 
>>
>> Modified:
>>   head/sys/net/iflib.c
>>
>> Modified: head/sys/net/iflib.c
>> ==
>> --- head/sys/net/iflib.c Tue Jun 13 22:57:57 2017(r319920)
> 
> Could this be yours?
> 
> panic: Assertion ifsd_m[next] == NULL failed at ../../../net/iflib.c:2927
> cpuid = 12
> time = 1497431647
> KDB: stack backtrace:
> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe104fa993d0
> vpanic() at vpanic+0x19c/frame 0xfe104fa99450
> kassert_panic() at kassert_panic+0x126/frame 0xfe104fa994c0
> iflib_txq_drain() at iflib_txq_drain+0xdf0/frame 0xfe104fa99640
> drain_ring_lockless() at drain_ring_lockless+0xc0/frame 0xfe104fa996a0
> ifmp_ring_enqueue() at ifmp_ring_enqueue+0x32e/frame 0xfe104fa99710
> iflib_if_transmit() at iflib_if_transmit+0xb0/frame 0xfe104fa99750
> ether_output() at ether_output+0x750/frame 0xfe104fa997f0
> ip_output() at ip_output+0x14c3/frame 0xfe104fa99930
> tcp_output() at tcp_output+0xf8c/frame 0xfe104fa99ad0
> tcp_usr_send() at tcp_usr_send+0x3bd/frame 0xfe104fa99b40
> sosend_generic() at sosend_generic+0x3ba/frame 0xfe104fa99bf0
> clnt_vc_call() at clnt_vc_call+0x4b8/frame 0xfe104fa99d40
> clnt_reconnect_call() at clnt_reconnect_call+0xe8/frame 0xfe104fa99de0
> newnfs_request() at newnfs_request+0x1092/frame 0xfe104fa99f60
> nfscl_request() at nfscl_request+0x5b/frame 0xfe104fa99fb0
> nfsrpc_lookup() at nfsrpc_lookup+0x211/frame 0xfe104fa9a120
> nfs_lookup() at nfs_lookup+0x463/frame 0xfe104fa9a460
> VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0xfe/frame 0xfe104fa9a490
> lookup() at lookup+0x6e2/frame 0xfe104fa9a530
> namei() at namei+0x534/frame 0xfe104fa9a5f0
> kern_statat() at kern_statat+0x9b/frame 0xfe104fa9a800
> freebsd11_lstat() at freebsd11_lstat+0x33/frame 0xfe104fa9a980
> amd64_syscall() at amd64_syscall+0x564/frame 0xfe104fa9aab0
> Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe104fa9aab0
> --- syscall (190, FreeBSD ELF64, freebsd11_lstat), rip = 0x800910c7a, rsp = 
> 0x7fffaed8, rbp = 0x7fffaf00 --
> 
> - Peter
> 
> 


Is this new of this morning (after I committed updates yesterday)?

sean



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r319897 - head/usr.bin/yes

2017-06-14 Thread Bryan Drewery
On 6/14/2017 7:26 AM, Justin Hibbits wrote:
> On Wed, Jun 14, 2017 at 9:19 AM, Bryan Drewery  wrote:
>> On 6/13/2017 5:35 AM, Pietro Cerutti wrote:
>>> Author: gahr (ports committer)
>>> Date: Tue Jun 13 12:35:01 2017
>>> New Revision: 319897
>>> URL: https://svnweb.freebsd.org/changeset/base/319897
>>>
>>> Log:
>>>   Improve yes' throughput
>>>
>>>   On my system, this brings up the throughput from ~20 to ~600 MiB/s.
>>>
>>>   Inspired by: 
>>> https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/
>>>
>>>   Reviewed by:cognet
>>>   Approved by:cognet
>>>
>>> Modified:
>>>   head/usr.bin/yes/yes.c
>>
>>
>> While here we should add libxo support.
>>
>> --
>> Regards,
>> Bryan Drewery
>>
> 
> I think before we add libxo, we need to capsicumize it.  After all, it
> does accept arbitrary arguments.

The code has become more complex.  I think capsicum does make sense now
in case there is an unseen overflow in the new optimized code.


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r319897 - head/usr.bin/yes

2017-06-14 Thread Justin Hibbits
On Wed, Jun 14, 2017 at 9:19 AM, Bryan Drewery  wrote:
> On 6/13/2017 5:35 AM, Pietro Cerutti wrote:
>> Author: gahr (ports committer)
>> Date: Tue Jun 13 12:35:01 2017
>> New Revision: 319897
>> URL: https://svnweb.freebsd.org/changeset/base/319897
>>
>> Log:
>>   Improve yes' throughput
>>
>>   On my system, this brings up the throughput from ~20 to ~600 MiB/s.
>>
>>   Inspired by: 
>> https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/
>>
>>   Reviewed by:cognet
>>   Approved by:cognet
>>
>> Modified:
>>   head/usr.bin/yes/yes.c
>
>
> While here we should add libxo support.
>
> --
> Regards,
> Bryan Drewery
>

I think before we add libxo, we need to capsicumize it.  After all, it
does accept arbitrary arguments.

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


Re: svn commit: r319897 - head/usr.bin/yes

2017-06-14 Thread Bryan Drewery
On 6/13/2017 5:35 AM, Pietro Cerutti wrote:
> Author: gahr (ports committer)
> Date: Tue Jun 13 12:35:01 2017
> New Revision: 319897
> URL: https://svnweb.freebsd.org/changeset/base/319897
> 
> Log:
>   Improve yes' throughput
>   
>   On my system, this brings up the throughput from ~20 to ~600 MiB/s.
>   
>   Inspired by: 
> https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/
>   
>   Reviewed by:cognet
>   Approved by:cognet
> 
> Modified:
>   head/usr.bin/yes/yes.c


While here we should add libxo support.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r319942 - head/sys/x86/x86

2017-06-14 Thread John Baldwin
Author: jhb
Date: Wed Jun 14 13:34:09 2017
New Revision: 319942
URL: https://svnweb.freebsd.org/changeset/base/319942

Log:
  Don't try to assign interrupts to a CPU on single-CPU systems.
  
  All interrupts are routed to the sole CPU in that case implicitly.
  This is a regression in EARLY_AP_STARTUP.  Previously the 'assign_cpu'
  variable was only set when a multi-CPU system finished booting, so
  it's value both meant that interrupts could be assigned and that
  there was more than one CPU.
  
  PR:   219882
  Reported by:  o...@j.email.ne.jp
  MFC after:3 days

Modified:
  head/sys/x86/x86/intr_machdep.c

Modified: head/sys/x86/x86/intr_machdep.c
==
--- head/sys/x86/x86/intr_machdep.c Wed Jun 14 13:23:40 2017
(r319941)
+++ head/sys/x86/x86/intr_machdep.c Wed Jun 14 13:34:09 2017
(r319942)
@@ -312,7 +312,9 @@ intr_assign_cpu(void *arg, int cpu)
 
 #ifdef EARLY_AP_STARTUP
MPASS(mp_ncpus == 1 || smp_started);
-   if (cpu != NOCPU) {
+
+   /* Nothing to do if there is only a single CPU. */
+   if (mp_ncpus > 1 && cpu != NOCPU) {
 #else
/*
 * Don't do anything during early boot.  We will pick up the
@@ -500,6 +502,8 @@ intr_next_cpu(void)
 
 #ifdef EARLY_AP_STARTUP
MPASS(mp_ncpus == 1 || smp_started);
+   if (mp_ncpus == 1)
+   return (PCPU_GET(apic_id));
 #else
/* Leave all interrupts on the BSP during boot. */
if (!assign_cpu)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r319905 - in head/sys: kern sys

2017-06-14 Thread Hans Petter Selasky

On 06/13/17 19:49, Alan Cox wrote:

+#definebitcount64(x)   __bitcount64((uint64_t)(x))


bitcount64() is already defined by sys/libkern.h - use that?

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


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

2017-06-14 Thread Peter Holm
On Tue, Jun 13, 2017 at 11:16:39PM +, Sean Bruno wrote:
> Author: sbruno
> Date: Tue Jun 13 23:16:38 2017
> New Revision: 319921
> URL: https://svnweb.freebsd.org/changeset/base/319921
> 
> Log:
>   Add new sysctl to allow changing of timing of the txq timers.
>   
>   Add new sysctl to override use of busdma in the driver.
>   
>   Submitted by:   Drew Gallitin 
> 
> Modified:
>   head/sys/net/iflib.c
> 
> Modified: head/sys/net/iflib.c
> ==
> --- head/sys/net/iflib.c  Tue Jun 13 22:57:57 2017(r319920)

Could this be yours?

panic: Assertion ifsd_m[next] == NULL failed at ../../../net/iflib.c:2927
cpuid = 12
time = 1497431647
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe104fa993d0
vpanic() at vpanic+0x19c/frame 0xfe104fa99450
kassert_panic() at kassert_panic+0x126/frame 0xfe104fa994c0
iflib_txq_drain() at iflib_txq_drain+0xdf0/frame 0xfe104fa99640
drain_ring_lockless() at drain_ring_lockless+0xc0/frame 0xfe104fa996a0
ifmp_ring_enqueue() at ifmp_ring_enqueue+0x32e/frame 0xfe104fa99710
iflib_if_transmit() at iflib_if_transmit+0xb0/frame 0xfe104fa99750
ether_output() at ether_output+0x750/frame 0xfe104fa997f0
ip_output() at ip_output+0x14c3/frame 0xfe104fa99930
tcp_output() at tcp_output+0xf8c/frame 0xfe104fa99ad0
tcp_usr_send() at tcp_usr_send+0x3bd/frame 0xfe104fa99b40
sosend_generic() at sosend_generic+0x3ba/frame 0xfe104fa99bf0
clnt_vc_call() at clnt_vc_call+0x4b8/frame 0xfe104fa99d40
clnt_reconnect_call() at clnt_reconnect_call+0xe8/frame 0xfe104fa99de0
newnfs_request() at newnfs_request+0x1092/frame 0xfe104fa99f60
nfscl_request() at nfscl_request+0x5b/frame 0xfe104fa99fb0
nfsrpc_lookup() at nfsrpc_lookup+0x211/frame 0xfe104fa9a120
nfs_lookup() at nfs_lookup+0x463/frame 0xfe104fa9a460
VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0xfe/frame 0xfe104fa9a490
lookup() at lookup+0x6e2/frame 0xfe104fa9a530
namei() at namei+0x534/frame 0xfe104fa9a5f0
kern_statat() at kern_statat+0x9b/frame 0xfe104fa9a800
freebsd11_lstat() at freebsd11_lstat+0x33/frame 0xfe104fa9a980
amd64_syscall() at amd64_syscall+0x564/frame 0xfe104fa9aab0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe104fa9aab0
--- syscall (190, FreeBSD ELF64, freebsd11_lstat), rip = 0x800910c7a, rsp = 
0x7fffaed8, rbp = 0x7fffaf00 --

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


Re: svn commit: r319722 - in head: sys/cam/ctl sys/dev/iscsi sys/kern sys/netgraph sys/netgraph/bluetooth/socket sys/netinet sys/ofed/drivers/infiniband/core sys/ofed/drivers/infiniband/ulp/sdp sys/rp

2017-06-14 Thread Andreas Tobler

Hi Gleb,

with this revision I get either a kernel panic or a hang. This happens 
on powerpc (32-bit). The powerpc64 looks stable.


Here you can see the backtrace in case of the panic:
https://people.freebsd.org/~andreast/r319722_ppc32_1.jpg

In the source code I see a comment with XXXGL...
Is this powerpc specific or do you think that there are some issues in 
the uipc_socket.c code?


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


svn commit: r319938 - head/sys/kern

2017-06-14 Thread Ryan Libby
Author: rlibby
Date: Wed Jun 14 07:46:52 2017
New Revision: 319938
URL: https://svnweb.freebsd.org/changeset/base/319938

Log:
  ddb show files: fix up file types and whitespace
  
  This makes ddb show files more descriptive and also adjusts the
  whitespace to align the columns for non-32-bit architectures.
  
  Reviewed by:  cem (previous version), jhb
  Approved by:  markj (mentor)
  Differential Revision:https://reviews.freebsd.org/D11061

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cWed Jun 14 05:12:09 2017
(r319937)
+++ head/sys/kern/kern_descrip.cWed Jun 14 07:46:52 2017
(r319938)
@@ -3821,23 +3821,33 @@ file_type_to_name(short type)
case 0:
return ("zero");
case DTYPE_VNODE:
-   return ("vnod");
+   return ("vnode");
case DTYPE_SOCKET:
-   return ("sock");
+   return ("socket");
case DTYPE_PIPE:
return ("pipe");
case DTYPE_FIFO:
return ("fifo");
case DTYPE_KQUEUE:
-   return ("kque");
+   return ("kqueue");
case DTYPE_CRYPTO:
-   return ("crpt");
+   return ("crypto");
case DTYPE_MQUEUE:
-   return ("mque");
+   return ("mqueue");
case DTYPE_SHM:
return ("shm");
case DTYPE_SEM:
return ("ksem");
+   case DTYPE_PTS:
+   return ("pts");
+   case DTYPE_DEV:
+   return ("dev");
+   case DTYPE_PROCDESC:
+   return ("proc");
+   case DTYPE_LINUXEFD:
+   return ("levent");
+   case DTYPE_LINUXTFD:
+   return ("ltimer");
default:
return ("unkn");
}
@@ -3872,17 +3882,21 @@ file_to_first_proc(struct file *fp)
 static void
 db_print_file(struct file *fp, int header)
 {
+#define XPTRWIDTH ((int)howmany(sizeof(void *) * NBBY, 4))
struct proc *p;
 
if (header)
-   db_printf("%8s %4s %8s %8s %4s %5s %6s %8s %5s %12s\n",
-   "File", "Type", "Data", "Flag", "GCFl", "Count",
-   "MCount", "Vnode", "FPID", "FCmd");
+   db_printf("%*s %6s %*s %8s %4s %5s %6s %*s %5s %s\n",
+   XPTRWIDTH, "File", "Type", XPTRWIDTH, "Data", "Flag",
+   "GCFl", "Count", "MCount", XPTRWIDTH, "Vnode", "FPID",
+   "FCmd");
p = file_to_first_proc(fp);
-   db_printf("%8p %4s %8p %08x %04x %5d %6d %8p %5d %12s\n", fp,
-   file_type_to_name(fp->f_type), fp->f_data, fp->f_flag,
-   0, fp->f_count, 0, fp->f_vnode,
+   db_printf("%*p %6s %*p %08x %04x %5d %6d %*p %5d %s\n", XPTRWIDTH,
+   fp, file_type_to_name(fp->f_type), XPTRWIDTH, fp->f_data,
+   fp->f_flag, 0, fp->f_count, 0, XPTRWIDTH, fp->f_vnode,
p != NULL ? p->p_pid : -1, p != NULL ? p->p_comm : "-");
+
+#undef XPTRWIDTH
 }
 
 DB_SHOW_COMMAND(file, db_show_file)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"