Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2006 18:48:46 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Andre Oppermann <andre@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern uipc_domain.c uipc_mbuf.c
Message-ID:  <20060218174846.GD849@garage.freebsd.pl>
In-Reply-To: <200602181716.k1IHGIR9050645@repoman.freebsd.org>
References:  <200602181716.k1IHGIR9050645@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--veXX9dWIonWZEC6h
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Feb 18, 2006 at 05:16:18PM +0000, Andre Oppermann wrote:
+> andre       2006-02-18 17:16:18 UTC
+>=20
+>   FreeBSD src repository
+>=20
+>   Modified files:
+>     sys/kern             uipc_domain.c uipc_mbuf.c=20
+>   Log:
+>   The sysctls kern.ipc.[max_linkhdr|max_protohdr|max_hdr|max_datalen]
+>   can't be changed from userland.  Make them read-only and provide
+>   descriptions.

[...]

+> -SYSCTL_INT(_kern_ipc, KIPC_MAX_LINKHDR, max_linkhdr, CTLFLAG_RW,
+> -	   &max_linkhdr, 0, "");
+> -SYSCTL_INT(_kern_ipc, KIPC_MAX_PROTOHDR, max_protohdr, CTLFLAG_RW,
+> -	   &max_protohdr, 0, "");
+> -SYSCTL_INT(_kern_ipc, KIPC_MAX_HDR, max_hdr, CTLFLAG_RW, &max_hdr, 0, "=
");
+> -SYSCTL_INT(_kern_ipc, KIPC_MAX_DATALEN, max_datalen, CTLFLAG_RW,
+> -	   &max_datalen, 0, "");
+> +SYSCTL_INT(_kern_ipc, KIPC_MAX_LINKHDR, max_linkhdr, CTLFLAG_RD,
+> +	   &max_linkhdr, 0, "Size of largest link layer header");
+> +SYSCTL_INT(_kern_ipc, KIPC_MAX_PROTOHDR, max_protohdr, CTLFLAG_RD,
+> +	   &max_protohdr, 0, "Size of largest protocol layer header");
+> +SYSCTL_INT(_kern_ipc, KIPC_MAX_HDR, max_hdr, CTLFLAG_RD,
+> +	   &max_hdr, 0, "Size of largest link plus protocol header");
+> +SYSCTL_INT(_kern_ipc, KIPC_MAX_DATALEN, max_datalen, CTLFLAG_RD,
+> +	   &max_datalen, 0, "Minimum space left in mbuf after max_hdr");

I haven't looked at all of them, but let's take max_linkhdr. If it is
read-only, where is it actually set to some value?

The only place I found is sys/kern/uipc_domain.c:domaininit():

	if (max_linkhdr < 16)		/* XXX */
		max_linkhdr =3D 16;

Which doesn't make any sense.
Maybe it should be a tunable?

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--veXX9dWIonWZEC6h
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFD913+ForvXbEpPzQRAs+XAJ9SZbeCqM+HTualgyel2U2y3zrbaQCeJr2E
VSjkVXace9VP90LYckMqPHk=
=BjIj
-----END PGP SIGNATURE-----

--veXX9dWIonWZEC6h--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060218174846.GD849>