svn commit: r362929 - in head/sys/compat: linprocfs linsysfs
Author: trasz Date: Sat Jul 4 11:22:35 2020 New Revision: 362929 URL: https://svnweb.freebsd.org/changeset/base/362929 Log: Make linprocfs(5) create /proc/bus/pci/devices/, and linsysfs(5) create /sys/class/power_supply/. This silences some warnings from biology/linux-foldingathome. Reported by: 0mp MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D25557 Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linsysfs/linsysfs.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Sat Jul 4 09:18:19 2020 (r362928) +++ head/sys/compat/linprocfs/linprocfs.c Sat Jul 4 11:22:35 2020 (r362929) @@ -1746,6 +1746,11 @@ linprocfs_init(PFS_INIT_ARGS) pfs_create_file(root, "version", &linprocfs_doversion, NULL, NULL, NULL, PFS_RD); + /* /proc/bus/... */ + dir = pfs_create_dir(root, "bus", NULL, NULL, NULL, 0); + dir = pfs_create_dir(dir, "pci", NULL, NULL, NULL, 0); + dir = pfs_create_dir(dir, "devices", NULL, NULL, NULL, 0); + /* /proc/net/... */ dir = pfs_create_dir(root, "net", NULL, NULL, NULL, 0); pfs_create_file(dir, "dev", &linprocfs_donetdev, Modified: head/sys/compat/linsysfs/linsysfs.c == --- head/sys/compat/linsysfs/linsysfs.c Sat Jul 4 09:18:19 2020 (r362928) +++ head/sys/compat/linsysfs/linsysfs.c Sat Jul 4 11:22:35 2020 (r362929) @@ -622,6 +622,7 @@ linsysfs_init(PFS_INIT_ARGS) struct pfs_node *pci; struct pfs_node *scsi; struct pfs_node *net; + struct pfs_node *power_supply; struct pfs_node *devdir, *chardev; devclass_t devclass; device_t dev; @@ -634,6 +635,7 @@ linsysfs_init(PFS_INIT_ARGS) class = pfs_create_dir(root, "class", NULL, NULL, NULL, 0); scsi = pfs_create_dir(class, "scsi_host", NULL, NULL, NULL, 0); drm = pfs_create_dir(class, "drm", NULL, NULL, NULL, 0); + power_supply = pfs_create_dir(class, "power_supply", NULL, NULL, NULL, 0); /* /sys/class/net/.. */ net = pfs_create_dir(class, "net", NULL, NULL, NULL, 0); ___ 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: r362930 - head/sys/compat/linprocfs
Author: trasz Date: Sat Jul 4 11:26:03 2020 New Revision: 362930 URL: https://svnweb.freebsd.org/changeset/base/362930 Log: Add /proc/sys/kernel/tainted to linprocfs(5). Helps LTP. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D25556 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Sat Jul 4 11:22:35 2020 (r362929) +++ head/sys/compat/linprocfs/linprocfs.c Sat Jul 4 11:26:03 2020 (r362930) @@ -1414,6 +1414,17 @@ linprocfs_dosem(PFS_FILL_ARGS) } /* + * Filler function for proc/sys/kernel/tainted + */ +static int +linprocfs_dotainted(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "0\n"); + return (0); +} + +/* * Filler function for proc/sys/vm/min_free_kbytes * * This mirrors the approach in illumos to return zero for reads. Effectively, @@ -1814,6 +1825,8 @@ linprocfs_init(PFS_INIT_ARGS) pfs_create_file(dir, "pid_max", &linprocfs_dopid_max, NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, "sem", &linprocfs_dosem, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "tainted", &linprocfs_dotainted, NULL, NULL, NULL, PFS_RD); /* /proc/sys/kernel/random/... */ ___ 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: r362932 - head/sys/dev/ixl
Author: kaktus Date: Sat Jul 4 14:20:03 2020 New Revision: 362932 URL: https://svnweb.freebsd.org/changeset/base/362932 Log: dev.ixl..debug: mark as MPSAFE This node provides no handler, it's implicitly MPSAFE. Reviewed by: erj Sponsored by: Mysterious Code Ltd. Differential Revision:https://reviews.freebsd.org/D25408 Modified: head/sys/dev/ixl/if_iavf.c Modified: head/sys/dev/ixl/if_iavf.c == --- head/sys/dev/ixl/if_iavf.c Sat Jul 4 13:32:57 2020(r362931) +++ head/sys/dev/ixl/if_iavf.c Sat Jul 4 14:20:03 2020(r362932) @@ -2090,7 +2090,7 @@ iavf_add_device_sysctls(struct iavf_sc *sc) /* Add sysctls meant to print debug information, but don't list them * in "sysctl -a" output. */ debug_node = SYSCTL_ADD_NODE(ctx, ctx_list, - OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_NEEDGIANT, + OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, NULL, "Debug Sysctls"); debug_list = SYSCTL_CHILDREN(debug_node); ___ 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: r362935 - in head: libexec/rc/rc.d share/man/man4
Author: trasz Date: Sat Jul 4 18:01:29 2020 New Revision: 362935 URL: https://svnweb.freebsd.org/changeset/base/362935 Log: Make the linux rc script use linrdlnk by default. This fixes Linux gettyname(3), with caveats (see PR). PR: kern/240767 MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D25558 Modified: head/libexec/rc/rc.d/linux head/share/man/man4/linux.4 Modified: head/libexec/rc/rc.d/linux == --- head/libexec/rc/rc.d/linux Sat Jul 4 15:20:23 2020(r362934) +++ head/libexec/rc/rc.d/linux Sat Jul 4 18:01:29 2020(r362935) @@ -51,7 +51,7 @@ linux_start() mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc" mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys" mount -o nocover -t devfs devfs "${_emul_path}/dev" - mount -o nocover -t fdescfs fdescfs "${_emul_path}/dev/fd" + mount -o nocover,linrdlnk -t fdescfs fdescfs "${_emul_path}/dev/fd" mount -o nocover,mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm" fi } Modified: head/share/man/man4/linux.4 == --- head/share/man/man4/linux.4 Sat Jul 4 15:20:23 2020(r362934) +++ head/share/man/man4/linux.4 Sat Jul 4 18:01:29 2020(r362935) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 12, 2020 +.Dd July 4, 2020 .Dt LINUX 4 .Os .Sh NAME @@ -130,7 +130,9 @@ Defaults to 0. .It Pa /compat/linux minimal Linux run-time environment .It Pa /compat/linux/dev/fd -file-descriptor file system, see +file descriptor file system mounted with the +.Cm linrdlnk +option, see .Xr fdescfs 5 .It Pa /compat/linux/dev/shm in-memory file system, see ___ 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: r362936 - head/sbin/newfs_msdos
Author: delphij Date: Sat Jul 4 18:37:04 2020 New Revision: 362936 URL: https://svnweb.freebsd.org/changeset/base/362936 Log: Gather writes to larger chunks (MAXPHYS) instead of issuing them in sectors. On my SanDisk Cruzer Blade 16GB USB stick this made formatting much faster: x before + after +--+ |+ | |+ x | |+ x x| |A MA|| +--+ N Min MaxMedian AvgStddev x 3 15.89 16.3816 16.09 0.2570992 + 3 0.32 0.37 0.350.3467 0.025166115 Difference at 95.0% confidence -15.7433 +/- 0.414029 -97.8455% +/- 0.25668% (Student's t, pooled s = 0.182665) Reviewed by: emaste MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D24508 Modified: head/sbin/newfs_msdos/mkfs_msdos.c Modified: head/sbin/newfs_msdos/mkfs_msdos.c == --- head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:01:29 2020 (r362935) +++ head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:37:04 2020 (r362936) @@ -64,6 +64,7 @@ static const char rcsid[] = #defineDOSMAGIC 0xaa55/* DOS magic number */ #defineMINBPS512 /* minimum bytes per sector */ +#defineMAXBPS4096 /* maximum bytes per sector */ #defineMAXSPC128 /* maximum sectors per cluster */ #defineMAXNFT16/* maximum number of FATs */ #defineDEFBLK4096 /* default block size */ @@ -77,6 +78,25 @@ static const char rcsid[] = #defineMAXCLS16 0xfff4U /* maximum FAT16 clusters */ #defineMAXCLS32 0xff4U/* maximum FAT32 clusters */ +#ifndefCTASSERT +#defineCTASSERT(x) _CTASSERT(x, __LINE__) +#define_CTASSERT(x, y) __CTASSERT(x, y) +#define__CTASSERT(x, y)typedef char __assert_ ## y [(x) ? 1 : -1] +#endif + +/* + * For better performance, we want to write larger chunks instead of + * individual sectors (the size can only be 512, 1024, 2048 or 4096 + * bytes). Assert that MAXPHYS can always hold an integer number of + * sectors by asserting that both are power of two numbers and the + * MAXPHYS is greater than MAXBPS. + */ +CTASSERT(powerof2(MAXPHYS)); +CTASSERT(powerof2(MAXBPS)); +CTASSERT(MAXPHYS > MAXBPS); + +const static ssize_t chunksize = MAXPHYS; + #definemincls(fat) ((fat) == 12 ? MINCLS12 : \ (fat) == 16 ? MINCLS16 : \ MINCLS32) @@ -243,6 +263,7 @@ mkfs_msdos(const char *fname, const char *dtype, const struct bsx *bsx; struct de *de; u_int8_t *img; +u_int8_t *physbuf, *physbuf_end; const char *bname; ssize_t n; time_t now; @@ -252,7 +273,7 @@ mkfs_msdos(const char *fname, const char *dtype, const int fd, fd1, rv; struct msdos_options o = *op; -img = NULL; +physbuf = NULL; rv = -1; fd = fd1 = -1; @@ -343,15 +364,13 @@ mkfs_msdos(const char *fname, const char *dtype, const bpb.bpbSecPerClust = 64;/* otherwise 32k */ } } -if (!powerof2(bpb.bpbBytesPerSec)) { - warnx("bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); +if (bpb.bpbBytesPerSec < MINBPS || +bpb.bpbBytesPerSec > MAXBPS || + !powerof2(bpb.bpbBytesPerSec)) { + warnx("Invalid bytes/sector (%u): must be 512, 1024, 2048 or 4096", + bpb.bpbBytesPerSec); goto done; } -if (bpb.bpbBytesPerSec < MINBPS) { - warnx("bytes/sector (%u) is too small; minimum is %u", -bpb.bpbBytesPerSec, MINBPS); - goto done; -} if (o.volume_label && !oklabel(o.volume_label)) { warnx("%s: bad volume label", o.volume_label); @@ -621,11 +640,14 @@ mkfs_msdos(const char *fname, const char *dtype, const tm = localtime(&now); } - - if (!(img = malloc(bpb.bpbBytesPerSec))) { + physbuf = malloc(chunksize); + if (physbuf == NULL) { warn(NULL); goto done; } + physbuf_end = physbuf + chunksize; + img = physbuf; + dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs) * bpb.bpbFATs; memset(&si_sa, 0, sizeof(si_sa)); @@ -750,19 +772,37 @@ mkfs_msdos(const char *fname, const char *dtype,
Re: svn commit: r362936 - head/sbin/newfs_msdos
Hi Xin Li, Maybe we can use C11 static_assert instead of the CTASSERT array mechanism? Best, Conrad On Sat, Jul 4, 2020 at 11:37 Xin LI wrote: > Author: delphij > Date: Sat Jul 4 18:37:04 2020 > New Revision: 362936 > URL: https://svnweb.freebsd.org/changeset/base/362936 > > Log: > Gather writes to larger chunks (MAXPHYS) instead of issuing them in > sectors. > > On my SanDisk Cruzer Blade 16GB USB stick this made formatting much > faster: > > x before > + after > > +--+ > |+ >| > |+ > x | > |+ > x x| > |A > MA|| > > +--+ > N Min MaxMedian Avg > Stddev > x 3 15.89 16.3816 16.09 > 0.2570992 > + 3 0.32 0.37 0.350.3467 > 0.025166115 > Difference at 95.0% confidence > -15.7433 +/- 0.414029 > -97.8455% +/- 0.25668% > (Student's t, pooled s = 0.182665) > > Reviewed by: emaste > MFC after:2 weeks > Differential Revision:https://reviews.freebsd.org/D24508 > > Modified: > head/sbin/newfs_msdos/mkfs_msdos.c > > Modified: head/sbin/newfs_msdos/mkfs_msdos.c > > == > --- head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:01:29 2020 > (r362935) > +++ head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:37:04 2020 > (r362936) > @@ -64,6 +64,7 @@ static const char rcsid[] = > > #defineDOSMAGIC 0xaa55/* DOS magic number */ > #defineMINBPS512 /* minimum bytes per sector */ > +#defineMAXBPS4096 /* maximum bytes per sector */ > #defineMAXSPC128 /* maximum sectors per cluster */ > #defineMAXNFT16/* maximum number of FATs */ > #defineDEFBLK4096 /* default block size */ > @@ -77,6 +78,25 @@ static const char rcsid[] = > #defineMAXCLS16 0xfff4U /* maximum FAT16 clusters */ > #defineMAXCLS32 0xff4U/* maximum FAT32 clusters */ > > +#ifndefCTASSERT > +#defineCTASSERT(x) _CTASSERT(x, __LINE__) > +#define_CTASSERT(x, y) __CTASSERT(x, y) > +#define__CTASSERT(x, y)typedef char __assert_ ## y [(x) ? > 1 : -1] > +#endif > + > +/* > + * For better performance, we want to write larger chunks instead of > + * individual sectors (the size can only be 512, 1024, 2048 or 4096 > + * bytes). Assert that MAXPHYS can always hold an integer number of > + * sectors by asserting that both are power of two numbers and the > + * MAXPHYS is greater than MAXBPS. > + */ > +CTASSERT(powerof2(MAXPHYS)); > +CTASSERT(powerof2(MAXBPS)); > +CTASSERT(MAXPHYS > MAXBPS); > + > +const static ssize_t chunksize = MAXPHYS; > + > #definemincls(fat) ((fat) == 12 ? MINCLS12 : \ > (fat) == 16 ? MINCLS16 : \ > MINCLS32) > @@ -243,6 +263,7 @@ mkfs_msdos(const char *fname, const char *dtype, const > struct bsx *bsx; > struct de *de; > u_int8_t *img; > +u_int8_t *physbuf, *physbuf_end; > const char *bname; > ssize_t n; > time_t now; > @@ -252,7 +273,7 @@ mkfs_msdos(const char *fname, const char *dtype, const > int fd, fd1, rv; > struct msdos_options o = *op; > > -img = NULL; > +physbuf = NULL; > rv = -1; > fd = fd1 = -1; > > @@ -343,15 +364,13 @@ mkfs_msdos(const char *fname, const char *dtype, > const > bpb.bpbSecPerClust = 64;/* otherwise 32k */ > } > } > -if (!powerof2(bpb.bpbBytesPerSec)) { > - warnx("bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); > +if (bpb.bpbBytesPerSec < MINBPS || > +bpb.bpbBytesPerSec > MAXBPS || > + !powerof2(bpb.bpbBytesPerSec)) { > + warnx("Invalid bytes/sector (%u): must be 512, 1024, 2048 or 4096", > + bpb.bpbBytesPerSec); > goto done; > } > -if (bpb.bpbBytesPerSec < MINBPS) { > - warnx("bytes/sector (%u) is too small; minimum is %u", > -bpb.bpbBytesPerSec, MINBPS); > - goto done; > -} > > if (o.volume_label && !oklabel(o.volume_label)) { > warnx("%s: bad volume label", o.volume_label); > @@ -621,11 +640,14 @@ mkfs_msdos(const char *fname, const char *dtype, > const > tm = localtime(&now); > } > > - > - if (!(img = malloc(bpb.bpbBytesPerSec))) { > + physbuf = malloc(chunksize); > + if (physbuf == NULL) { > warn(NULL); > goto done; > } > + physbuf_end = physbuf + chunksize; > + img = physbuf; > + > dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : >bpb.bpbBigFATsecs) * bpb.bpbFATs; > mem
Re: svn commit: r362936 - head/sbin/newfs_msdos
On 7/4/20 12:01 PM, Conrad Meyer wrote: > Hi Xin Li, > > Maybe we can use C11 static_assert instead of the CTASSERT array mechanism? Good point, maybe https://reviews.freebsd.org/D25562 ? signature.asc Description: OpenPGP digital signature
Re: svn commit: r362736 - head/sys/arm64/rockchip
On 2020-Jul-02 17:26:23 -0700, Oleksandr Tymoshenko wrote: >Could you try kernel with this patch? It's mostly debug output, >with one possible clock-related fix. > >https://people.freebsd.org/~gonzo/patches/rk3328-gmac-debug.patch It's still not working for me. I get the following: dwc0: mem 0xff54-0xff54 irq 44 on ofwbus0 setting RK3328 RX/TX delays: 24/36 >>> RK3328_GRF_MAC_CON1 (0413): >>> gmac2io_gmii_clk_sel: 0x0 >>> gmac2io_rmii_extclk_sel: 0x1 >>> gmac2io_rmii_mode: 0x0 >>> gmac2io_rmii_clk_sel: 0x0 >>> gmac2io_phy_intf_sel: 0x1 >>> gmac2io_flowctrl: 0x0 >>> gmac2io_rxclk_dly_ena: 0x1 >>> gmac2io_txclk_dly_ena: 0x1 >>> RK3328_GRF_MAC_CON0 (0c24): miibus0: on dwc0 rgephy0: PHY 0 on miibus0 rgephy0: OUI 0x00e04c, model 0x0011, rev. 6 rgephy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto >I have Rock64 v2, which, as you mentioned, has a known issue with GigE, so >my tests are not reliable. I'll try to get another RK3328 board for tests, >but it may take some time. I've asked on -arm if anyone else has tried this on a Rock64 v2 or v3. >If the clock fix doesn't help, I'll make >delays configuration run-time configurable with off by default until >more hardware is tested. That sounds like a good way forward - maybe boot and run-time configurable. It's a pity that there doesn't seem to be any documentation on what the numbers represent (or what the "default" value is) - which means that actually adjusting the delay numbers would be very time consuming. -- Peter Jeremy signature.asc Description: PGP signature
svn commit: r362937 - head/sbin/newfs_msdos
Author: delphij Date: Sun Jul 5 00:19:08 2020 New Revision: 362937 URL: https://svnweb.freebsd.org/changeset/base/362937 Log: Use KERN_MAXPHYS. Suggested by: imp Reviewed by: imp, cem (earlier version), emaste MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D25563 Modified: head/sbin/newfs_msdos/mkfs_msdos.c Modified: head/sbin/newfs_msdos/mkfs_msdos.c == --- head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:37:04 2020 (r362936) +++ head/sbin/newfs_msdos/mkfs_msdos.c Sun Jul 5 00:19:08 2020 (r362937) @@ -41,8 +41,10 @@ static const char rcsid[] = #include #endif #include +#include #include +#include #include #include #include @@ -78,25 +80,6 @@ static const char rcsid[] = #defineMAXCLS16 0xfff4U /* maximum FAT16 clusters */ #defineMAXCLS32 0xff4U/* maximum FAT32 clusters */ -#ifndefCTASSERT -#defineCTASSERT(x) _CTASSERT(x, __LINE__) -#define_CTASSERT(x, y) __CTASSERT(x, y) -#define__CTASSERT(x, y)typedef char __assert_ ## y [(x) ? 1 : -1] -#endif - -/* - * For better performance, we want to write larger chunks instead of - * individual sectors (the size can only be 512, 1024, 2048 or 4096 - * bytes). Assert that MAXPHYS can always hold an integer number of - * sectors by asserting that both are power of two numbers and the - * MAXPHYS is greater than MAXBPS. - */ -CTASSERT(powerof2(MAXPHYS)); -CTASSERT(powerof2(MAXBPS)); -CTASSERT(MAXPHYS > MAXBPS); - -const static ssize_t chunksize = MAXPHYS; - #definemincls(fat) ((fat) == 12 ? MINCLS12 : \ (fat) == 16 ? MINCLS16 : \ MINCLS32) @@ -240,6 +223,7 @@ static volatile sig_atomic_t got_siginfo; static void infohandler(int); static int check_mounted(const char *, mode_t); +static ssize_t getchunksize(void); static int getstdfmt(const char *, struct bpb *); static int getdiskinfo(int, const char *, const char *, int, struct bpb *); static void print_bpb(struct bpb *); @@ -272,6 +256,7 @@ mkfs_msdos(const char *fname, const char *dtype, const bool set_res, set_spf, set_spc; int fd, fd1, rv; struct msdos_options o = *op; +ssize_t chunksize; physbuf = NULL; rv = -1; @@ -640,6 +625,7 @@ mkfs_msdos(const char *fname, const char *dtype, const tm = localtime(&now); } + chunksize = getchunksize(); physbuf = malloc(chunksize); if (physbuf == NULL) { warn(NULL); @@ -848,6 +834,47 @@ check_mounted(const char *fname, mode_t mode) } #endif return 0; +} + +/* + * Get optimal I/O size + */ +static ssize_t +getchunksize(void) +{ + static int chunksize; + + if (chunksize != 0) + return ((ssize_t)chunksize); + +#ifdef KERN_MAXPHYS + int mib[2]; + size_t len; + + mib[0] = CTL_KERN; + mib[1] = KERN_MAXPHYS; + len = sizeof(chunksize); + + if (sysctl(mib, 2, &chunksize, &len, NULL, 0) == -1) { + warn("sysctl: KERN_MAXPHYS, using %zu", (size_t)MAXPHYS); + chunksize = 0; + } +#endif + if (chunksize == 0) + chunksize = MAXPHYS; + + /* +* For better performance, we want to write larger chunks instead of +* individual sectors (the size can only be 512, 1024, 2048 or 4096 +* bytes). Assert that chunksize can always hold an integer number of +* sectors by asserting that both are power of two numbers and the +* chunksize is greater than MAXBPS. +*/ + static_assert(powerof2(MAXBPS), "MAXBPS is not power of 2"); + assert(powerof2(chunksize)); + assert(chunksize > MAXBPS); + + return ((ssize_t)chunksize); } /* ___ 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: r362938 - head/sys/dev/cxgbe
Author: np Date: Sun Jul 5 05:14:33 2020 New Revision: 362938 URL: https://svnweb.freebsd.org/changeset/base/362938 Log: cxgbe(4): Fix a bug (introduced in r362905) where some tx traffic wasn't being reported to BPF. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c == --- head/sys/dev/cxgbe/t4_sge.c Sun Jul 5 00:19:08 2020(r362937) +++ head/sys/dev/cxgbe/t4_sge.c Sun Jul 5 05:14:33 2020(r362938) @@ -3013,6 +3013,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool if (avail < n) break; /* out of descriptors */ } + ETHER_BPF_MTAP(ifp, m0); if (sc->flags & IS_VF) n = write_txpkt_vm_wr(sc, txq, m0); else ___ 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"