Re: svn commit: r363568 - stable/12/sys/net

2020-07-26 Thread mike tancsa
Hi Kristof,

    First off, thank you for all your efforts in pf and if_bridge.  I
have trying to track down a problem with a golang app (sysutils/zrepl)
that started acting up around the time the if_bridge stuff was commited
(june 26th).  The problem would manifest in stalls of the daemon and am
wondering this might have played a role.  The june 10th kernel I had
seemed to work just fine with the app, although I just rebooted to that
to confirm as around that time we added more RAM to the server in
question and put the app under slightly higher load too. I have yet to
boot to a kernel post this being reverted.  But apart from the panics
some people saw could other 'odd' things pop up as well if traffic was
coming in a bridge interface using an igb0 nic ?

    ---Mike

On 7/26/2020 1:44 PM, Kristof Provost wrote:
> Author: kp
> Date: Sun Jul 26 17:44:03 2020
> New Revision: 363568
> URL: https://svnweb.freebsd.org/changeset/base/363568
>
> Log:
>   Revert bridge epochification
>   
>   Revert r363492, r363491, r363430, r363429 and r362650.
>   
>   The introduction of epoch in the network stack is incomplete in stable/12, 
> and
>   there are simply too many limitations to make the bridge epoch code work 
> there.
>   
>   The final problem is capability configuration of the bridge member 
> interfaces.
>   if_bridge needs to enable promiscuous mode, which for certain drivers (e1000
>   for example) can sleep. In stable/12 we may not sleep within epoch.
>
> Modified:
>   stable/12/sys/net/if_bridge.c
>
> Modified: stable/12/sys/net/if_bridge.c
> ==
> --- stable/12/sys/net/if_bridge.c Sun Jul 26 17:21:24 2020
> (r363567)
> +++ stable/12/sys/net/if_bridge.c Sun Jul 26 17:44:03 2020
> (r363568)
> @@ -189,14 +189,41 @@ extern void nd6_setmtu(struct ifnet *);
>   */
>  #define BRIDGE_LOCK_INIT(_sc)do {\
>   mtx_init(&(_sc)->sc_mtx, "if_bridge", NULL, MTX_DEF);   \
> + cv_init(&(_sc)->sc_cv, "if_bridge_cv"); \
>  } while (0)
>  #define BRIDGE_LOCK_DESTROY(_sc) do {\
>   mtx_destroy(&(_sc)->sc_mtx);\
> + cv_destroy(&(_sc)->sc_cv);  \
>  } while (0)
>  #define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
>  #define BRIDGE_UNLOCK(_sc)   mtx_unlock(&(_sc)->sc_mtx)
>  #define BRIDGE_LOCK_ASSERT(_sc)  mtx_assert(&(_sc)->sc_mtx, 
> MA_OWNED)
>  #define BRIDGE_UNLOCK_ASSERT(_sc)mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED)
> +#define  BRIDGE_LOCK2REF(_sc, _err)  do {\
> + mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
> + if ((_sc)->sc_iflist_xcnt > 0)  \
> + (_err) = EBUSY; \
> + else\
> + (_sc)->sc_iflist_ref++; \
> + mtx_unlock(&(_sc)->sc_mtx); \
> +} while (0)
> +#define  BRIDGE_UNREF(_sc)   do {
> \
> + mtx_lock(&(_sc)->sc_mtx);   \
> + (_sc)->sc_iflist_ref--; \
> + if (((_sc)->sc_iflist_xcnt > 0) && ((_sc)->sc_iflist_ref == 0)) \
> + cv_broadcast(&(_sc)->sc_cv);\
> + mtx_unlock(&(_sc)->sc_mtx); \
> +} while (0)
> +#define  BRIDGE_XLOCK(_sc)   do {\
> + mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
> + (_sc)->sc_iflist_xcnt++;\
> + while ((_sc)->sc_iflist_ref > 0)\
> + cv_wait(&(_sc)->sc_cv, &(_sc)->sc_mtx); \
> +} while (0)
> +#define  BRIDGE_XDROP(_sc)   do {\
> + mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
> + (_sc)->sc_iflist_xcnt--;\
> +} while (0)
>  
>  /*
>   * Bridge interface list entry.
> @@ -210,8 +237,6 @@ struct bridge_iflist {
>   uint32_tbif_addrmax;/* max # of addresses */
>   uint32_tbif_addrcnt;/* cur. # of addresses */
>   uint32_tbif_addrexceeded;/* # of address violations */
> -
> - struct epoch_contextbif_epoch_ctx;
>  };
>  
>  /*
> @@ -225,9 +250,6 @@ struct bridge_rtnode {
>   uint8_t brt_flags;  /* address flags */
>   uint8_t brt_addr[ETHER_ADDR_LEN];
>   uint16_tbrt_vlan;   /* vlan id */
> -
> - struct  vnet*brt_vnet;
> - struct  epoch_context   brt_epoch_ctx;
>  };
>  #define  brt_ifp brt_dst->bif_ifp
>  
> @@ -238,10 +260,13 @@ struct bridge_softc {
>   struct ifnet*sc_ifp;/* make this an interface */
>   LIST_ENTRY(bridge_softc) sc_list;
>   struct mtx  sc_mtx;
> + struct cv   sc_cv;
>   uint32_tsc_brtmax;  /* max # of 

Re: svn commit: r334152 - in stable/11/sys: amd64/amd64 amd64/include dev/cpuctl i386/include x86/acpica x86/include x86/x86

2018-05-25 Thread Mike Tancsa
On 5/25/2018 1:47 PM, Konstantin Belousov wrote:
>> cpu I586_CPU
>> options CPU_GEODE
>> ident   ALIX_DSK
> You do not have the SMP option in the config, right ?

Sorry, yes, you are correct. This config is for a single core CPU.

I have these 3 commented out as well.

#optionsSMP
#device apic
#optionsEARLY_AP_STARTUP

---Mike

-- 
-------
Mike Tancsa, tel +1 519 651 3400 x203
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r334152 - in stable/11/sys: amd64/amd64 amd64/include dev/cpuctl i386/include x86/acpica x86/include x86/x86

2018-05-25 Thread Mike Tancsa
o-sse -msoft-float
-ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign
-D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function
-Wno-error-pointer-sign -Wno-error-shift-negative-value
-Wno-error-address-of-packed-member  -mno-aes -mno-avx
-std=iso9899:1999 -Werror  /usr/src/sys/x86/x86/bus_machdep.c
ctfconvert -L VERSION bus_machdep.o
ERROR: ctfconvert: bus_machdep.o doesn't have type data to convert
cc -target i386-unknown-freebsd11.2 --sysroot=/usr/obj/usr/src/tmp
-B/usr/obj/usr/src/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing
-nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/libfdt -D_KERNEL
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -MD
-MF.depend.busdma_bounce.o -MTbusdma_bounce.o -mno-mmx -mno-sse
-msoft-float -ffreestanding -fwrapv -fstack-protector -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=__freebsd_kprintf__
-Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function
-Wno-error-pointer-sign -Wno-error-shift-negative-value
-Wno-error-address-of-packed-member  -mno-aes -mno-avx
-std=iso9899:1999 -Werror  /usr/src/sys/x86/x86/busdma_bounce.c
ctfconvert -L VERSION busdma_bounce.o
ERROR: ctfconvert: busdma_bounce.o doesn't have type data to convert
cc -target i386-unknown-freebsd11.2 --sysroot=/usr/obj/usr/src/tmp
-B/usr/obj/usr/src/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing
-nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/libfdt -D_KERNEL
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -MD
-MF.depend.busdma_machdep.o -MTbusdma_machdep.o -mno-mmx -mno-sse
-msoft-float -ffreestanding -fwrapv -fstack-protector -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=__freebsd_kprintf__
-Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function
-Wno-error-pointer-sign -Wno-error-shift-negative-value
-Wno-error-address-of-packed-member  -mno-aes -mno-avx
-std=iso9899:1999 -Werror  /usr/src/sys/x86/x86/busdma_machdep.c
ctfconvert -L VERSION busdma_machdep.o
ERROR: ctfconvert: busdma_machdep.o doesn't have type data to convert
cc -target i386-unknown-freebsd11.2 --sysroot=/usr/obj/usr/src/tmp
-B/usr/obj/usr/src/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing
-nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/libfdt -D_KERNEL
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -MD
-MF.depend.cpu_machdep.o -MTcpu_machdep.o -mno-mmx -mno-sse -msoft-float
-ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign
-D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function
-Wno-error-pointer-sign -Wno-error-shift-negative-value
-Wno-error-address-of-packed-member  -mno-aes -mno-avx
-std=iso9899:1999 -Werror  /usr/src/sys/x86/x86/cpu_machdep.c
/usr/src/sys/x86/x86/cpu_machdep.c:890:3: error: implicit declaration of
function 'CPU_FOREACH' is invalid in C99
  [-Werror,-Wimplicit-function-declaration]
CPU_FOREACH(i) {
^
/usr/src/sys/x86/x86/cpu_machdep.c:890:3: error: this function
declaration is not a prototype
  [-Werror,-Wstrict-prototypes]
/usr/src/sys/x86/x86/cpu_machdep.c:890:17: error: expected ';' after
expression
CPU_FOREACH(i) {
  ^
  ;
3 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/sys/nano5501
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
1(releng11-i386)#



-- 
---
Mike Tancsa, tel +1 519 651 3400 x203
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r328944 - stable/11/sys/kern

2018-02-06 Thread Mike Tancsa
On 2/6/2018 2:13 PM, Kirk McKusick wrote:
> Author: mckusick
> Date: Tue Feb  6 19:13:44 2018
> New Revision: 328944
> URL: https://svnweb.freebsd.org/changeset/base/328944
> 
> Log:
>   MFC of 328643.
>   
>   fix vn_printf listing of its union

Hi,
I am getting a buildfailure with this commit, I think

--
>>> stage 3.1: building everything
--
cd /usr/obj/usr/src/sys/server; COMPILER_VERSION=50001
COMPILER_FEATURES=c++11  COMPILER_TYPE=clang
COMPILER_FREEBSD_VERSION=1100505 MAKEOBJDIRPREFIX=/usr/obj
MACHINE_ARCH=amd64  MACHINE=amd64  CPUTYPE=
GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin
GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font
GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac CC="cc
-target x86_64-unknown-freebsd11.1 --sysroot=/usr/obj/usr/src/tmp
-B/usr/obj/usr/src/tmp/usr/bin" CXX="c++  -target
x86_64-unknown-freebsd11.1 --sysroot=/usr/obj/usr/src/tmp
-B/usr/obj/usr/src/tmp/usr/bin"  CPP="cpp -target
x86_64-unknown-freebsd11.1 --sysroot=/usr/obj/usr/src/tmp
-B/usr/obj/usr/src/tmp/usr/bin"  AS="as" AR="ar" LD="ld" NM=nm
OBJDUMP=objdump OBJCOPY="objcopy"  RANLIB=ranlib STRINGS=  SIZE="size"
INSTALL="sh /usr/src/tools/install.sh"
PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin
make  -D NO_KERNELCLEAN -m /usr/src/share/mk  KERNEL=kernel all
-DNO_MODULES_OBJ
cc -target x86_64-unknown-freebsd11.1 --sysroot=/usr/obj/usr/src/tmp
-B/usr/obj/usr/src/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing  -g
-nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/libfdt -D_KERNEL
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD
-MF.depend.vfs_subr.o -MTvfs_subr.o -mcmodel=kernel -mno-red-zone
-mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables
-ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=__freebsd_kprintf__
-Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function
-Wno-error-pointer-sign -Wno-error-shift-negative-value
-Wno-error-address-of-packed-member  -mno-aes -mno-avx
-std=iso9899:1999 -Werror  /usr/src/sys/kern/vfs_subr.c
/usr/src/sys/kern/vfs_subr.c:3368:30: error: no member named 'v_unpcb'
in 'struct vnode'
printf(" socket %p\n", vp->v_unpcb);
   ~~  ^
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/sys/server
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.


> 
> Modified:
>   stable/11/sys/kern/vfs_subr.c
> Directory Properties:
>   stable/11/   (props changed)
> 
> Modified: stable/11/sys/kern/vfs_subr.c
> ==
> --- stable/11/sys/kern/vfs_subr.c Tue Feb  6 19:09:49 2018
> (r328943)
> +++ stable/11/sys/kern/vfs_subr.c Tue Feb  6 19:13:44 2018
> (r328944)
> @@ -3355,8 +3355,25 @@ vn_printf(struct vnode *vp, const char *fmt, ...)
>   va_end(ap);
>   printf("%p: ", (void *)vp);
>   printf("tag %s, type %s\n", vp->v_tag, typename[vp->v_type]);
> - printf("usecount %d, writecount %d, refcount %d mountedhere %p\n",
> - vp->v_usecount, vp->v_writecount, vp->v_holdcnt, vp->v_mountedhere);
> + printf("usecount %d, writecount %d, refcount %d",
> + vp->v_usecount, vp->v_writecount, vp->v_holdcnt);
> + switch (vp->v_type) {
> + case VDIR:
> + printf(" mountedhere %p\n", vp->v_mountedhere);
> + break;
> + case VCHR:
> + printf(" rdev %p\n", vp->v_rdev);
> + break;
> + case VSOCK:
> + printf(" socket %p\n", vp->v_unpcb);
> + break;
> + case VFIFO:
> + printf(" fifoinfo %p\n", vp->v_fifoinfo);
> + break;
> + default:
> + printf("\n");
> +     break;
> + }
>   buf[0] = '\0';
>   buf[1] = '\0';
>   if (vp->v_vflag & VV_ROOT)
> ___
> svn-src-stable...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listin

Re: svn commit: r320897 - in stable/11/sys: conf dev/ixgbe modules/ix modules/ixv

2017-07-12 Thread Mike Tancsa
Hi Eric,
For stable users, can the loader.conf variable not be the original one
? Especially for servers that are physically remote, a sysadmin might
expect (wrongly or not) for the name not the change in a stable branch.
If the box is remote, they would not be able to see the new dmesg error.
Rather than change the name, perhaps a deprecation warning saying "In
FreeBSD 12, this will be hw.ix.allow_unsupported_sfp" ?

---Mike


On 7/12/2017 12:35 PM, Eric Joyner wrote:
> Olivier,
> 
> There is a message about it in dmesg, right? For the error code, there's
> not much we can do there aside from adding a new unsupported SFP+ code to
> errno.h, which doesn't seem appropriate.
> 
> On Wed, Jul 12, 2017 at 9:27 AM Olivier Cochard-Labbé <oliv...@freebsd.org>
> wrote:
> 
>> On Wed, Jul 12, 2017 at 5:39 PM, Eric Joyner <e...@freebsd.org> wrote:
>>
>>> I think it may have been silently renamed to "allow_unsupported_sfp"
>>> instead of "unsupported_sfp". Could you try changing the name of that
>>> tunable in your config?
>>>
>>>
>> ​Thanks Eric!
>>
>> Replacing this previous line into my /boot/loader.conf
>> hw.ix.unsupported_sfp="1"
>> by this new one:
>> hw.ix.allow_unsupported_sfp="1"​
>>
>>
>> ​solved the problem: -) but this broke POLA :-(
>>
>> And the default behavior is not very sysadmin friendly:
>> How, with the message "device_attach: ix0 attach returned 5" and no more
>> ix interface detected, can I know it just came from using unsupported SFP ?
>>
>>
> _______
> svn-src-stable...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11
> To unsubscribe, send any mail to "svn-src-stable-11-unsubscr...@freebsd.org"
> 
> 


-- 
---
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r276076 - in stable/10/sys: amd64/amd64 i386/i386 i386/include i386/xen pc98/pc98 x86/x86

2015-01-16 Thread Mike Tancsa
/pmap.h

  #include x86/apicreg.h
-#include machine/cpu.h
  #include machine/cputypes.h
  #include machine/frame.h
  #include machine/intr_machdep.h
@@ -1264,9 +1263,6 @@ static void
  apic_init(void *dummy __unused)
  {
struct apic_enumerator *enumerator;
-#ifndef __amd64__
-   uint64_t apic_base;
-#endif
int retval, best;

/* We only support built in local APICs. */
@@ -1308,12 +1304,7 @@ apic_init(void *dummy __unused)
 * CPUs during early startup.  We need to turn the local APIC back
 * on on such CPUs now.
 */
-   if (cpu == CPU_686  cpu_vendor_id == CPU_VENDOR_INTEL 
-   (cpu_id  0xff0) == 0x610) {
-   apic_base = rdmsr(MSR_APICBASE);
-   apic_base |= APICBASE_ENABLED;
-   wrmsr(MSR_APICBASE, apic_base);
-   }
+   ppro_reenable_apic();
  #endif

/* Probe the CPU's in the system. */
___
svn-src-stable...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org





--
---
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254626 - stable/9/usr.bin/yacc

2013-08-22 Thread Mike Tancsa
On 8/22/2013 7:56 AM, Dag-Erling Smørgrav wrote:
 
 So what do you suggest?  Revert David's change, or keep it (minus
 extern) and remove the prototype from expr.y?
 
 I favor the latter option, since yyparse() is auto-generated and expr.y
 can therefore (strictly speaking) not know what the correct prototype
 looks like.


Is it safe to buildworld with this change ?

---Mike


-- 
---
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org