svn commit: r331461 - in user/markj/netdump/sys: kern netinet/netdump sys vm
Rodney W. Grimes
freebsd at pdx.rh.CN85.dnsmgr.net
Sat Mar 24 02:46:38 UTC 2018
> Author: markj
> Date: Fri Mar 23 20:29:34 2018
> New Revision: 331461
> URL: https://svnweb.freebsd.org/changeset/base/331461
>
> Log:
> Address some but not all review feedback from cem.
Please be detailed in what is changing, as the above
only tells us where it came from in a vague way as
no review number is even cited.
I know this is on a private branch, but when/if it
is merged this becomes part of the main line.
> Modified:
> user/markj/netdump/sys/kern/kern_mbuf.c
> user/markj/netdump/sys/netinet/netdump/netdump_client.c
> user/markj/netdump/sys/sys/mbuf.h
> user/markj/netdump/sys/vm/uma_core.c
>
> Modified: user/markj/netdump/sys/kern/kern_mbuf.c
> ==============================================================================
> --- user/markj/netdump/sys/kern/kern_mbuf.c Fri Mar 23 20:20:04 2018 (r331460)
> +++ user/markj/netdump/sys/kern/kern_mbuf.c Fri Mar 23 20:29:34 2018 (r331461)
> @@ -381,11 +381,6 @@ mbuf_init(void *dummy)
> SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL);
>
> #ifdef NETDUMP
> -/* External functions invoked from the netdump code. */
> -void netdump_mbuf_init(int, int);
> -void netdump_mbuf_drain(void);
> -void netdump_mbuf_dump(void);
> -
> static struct mbufq nd_mbufq;
> static struct mbufq nd_clustq;
>
> @@ -407,7 +402,6 @@ nd_buf_import(void *arg, void **store, int count, int
> m = mbufq_dequeue(q);
> if (m == NULL)
> break;
> - trash_init(m, q == &nd_mbufq ? MSIZE : MCLBYTES, flags);
> store[i] = m;
> }
> return (i);
> @@ -429,7 +423,7 @@ nd_buf_release(void *arg, void **store, int count)
> }
>
> static int
> -nd_pack_import(void *arg, void **store, int count, int domain __unused,
> +nd_pack_import(void *arg __unused, void **store, int count, int domain __unused,
> int flags __unused)
> {
> struct mbuf *m;
> @@ -446,14 +440,14 @@ nd_pack_import(void *arg, void **store, int count, int
> break;
> }
>
> - mb_ctor_clust(clust, MCLBYTES, m, M_NOWAIT);
> + mb_ctor_clust(clust, MCLBYTES, m, 0);
> store[i] = m;
> }
> return (i);
> }
>
> static void
> -nd_pack_release(void *arg, void **store, int count)
> +nd_pack_release(void *arg __unused, void **store, int count)
> {
> struct mbuf *m;
> void *clust;
>
> Modified: user/markj/netdump/sys/netinet/netdump/netdump_client.c
> ==============================================================================
> --- user/markj/netdump/sys/netinet/netdump/netdump_client.c Fri Mar 23 20:20:04 2018 (r331460)
> +++ user/markj/netdump/sys/netinet/netdump/netdump_client.c Fri Mar 23 20:29:34 2018 (r331461)
> @@ -92,11 +92,6 @@ __FBSDID("$FreeBSD$");
> #define NETDDEBUGV_IF(i, f, ...)
> #endif
>
> -/* Defined in kern_mbuf.c. */
> -void netdump_mbuf_init(int nmbuf, int nclust);
> -void netdump_mbuf_drain(void);
> -void netdump_mbuf_dump(void);
> -
> static int netdump_arp_gw(void);
> static void netdump_cleanup(void);
> static int netdump_configure(struct netdump_conf *);
>
> Modified: user/markj/netdump/sys/sys/mbuf.h
> ==============================================================================
> --- user/markj/netdump/sys/sys/mbuf.h Fri Mar 23 20:20:04 2018 (r331460)
> +++ user/markj/netdump/sys/sys/mbuf.h Fri Mar 23 20:29:34 2018 (r331461)
> @@ -1373,5 +1373,12 @@ mbuf_tstmp2timespec(struct mbuf *m, struct timespec *t
> }
> #endif
>
> +#ifdef NETDUMP
> +/* Invoked from the netdump client code. */
> +void netdump_mbuf_init(int, int);
> +void netdump_mbuf_drain(void);
> +void netdump_mbuf_dump(void);
> +#endif
> +
> #endif /* _KERNEL */
> #endif /* !_SYS_MBUF_H_ */
>
> Modified: user/markj/netdump/sys/vm/uma_core.c
> ==============================================================================
> --- user/markj/netdump/sys/vm/uma_core.c Fri Mar 23 20:20:04 2018 (r331460)
> +++ user/markj/netdump/sys/vm/uma_core.c Fri Mar 23 20:29:34 2018 (r331461)
> @@ -1673,6 +1673,9 @@ zone_ctor(void *mem, int size, void *udata, int flags)
> }
>
> out:
> + KASSERT((arg->flags & (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET)) !=
> + (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET),
> + ("Invalid zone flag combination"));
> if ((arg->flags & UMA_ZONE_MAXBUCKET) != 0)
> zone->uz_count = BUCKET_MAX;
> else if ((arg->flags & UMA_ZONE_NOBUCKET) != 0)
>
>
--
Rod Grimes rgrimes at freebsd.org
More information about the svn-src-user
mailing list