History log of /freebsd/sys/kern/uipc_mbuf.c (Results 1 – 25 of 595)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 314cb279 31-Oct-2024 John Baldwin <jhb@FreeBSD.org>

mbuf: Don't force all M_EXTPG mbufs to be read-only

Some M_EXTPG mbufs are read-only (e.g. those backing sendfile
requests), but others are not. Add a flags argument to
mb_alloc_ext_pgs that can be

mbuf: Don't force all M_EXTPG mbufs to be read-only

Some M_EXTPG mbufs are read-only (e.g. those backing sendfile
requests), but others are not. Add a flags argument to
mb_alloc_ext_pgs that can be used to set M_RDONLY when needed rather
than setting it unconditionally. Update mb_unmapped_to_ext to
preserve M_RDONLY from the unmapped mbuf.

Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D46783

show more ...


Revision tags: release/13.4.0
# 299175f2 11-Sep-2024 Kristof Provost <kp@FreeBSD.org>

Revert "Assert that mbufs are writable if we write to them"

This reverts commit f08247fd888e6f7db0ecf2aaa39377144ac40b4c.

This assertion is triggered by
ktls_test:ktls_transmit_aes128_cbc_1_0_sha1_

Revert "Assert that mbufs are writable if we write to them"

This reverts commit f08247fd888e6f7db0ecf2aaa39377144ac40b4c.

This assertion is triggered by
ktls_test:ktls_transmit_aes128_cbc_1_0_sha1_control. Remove the assertion until
we fully understand why.

Sponsored by: Rubicon Communications, LLC ("Netgate")

show more ...


# f08247fd 10-Sep-2024 Kristof Provost <kp@FreeBSD.org>

Assert that mbufs are writable if we write to them

m_copyback() modifies the mbuf, so it must be a writable mbuf.

Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differen

Assert that mbufs are writable if we write to them

m_copyback() modifies the mbuf, so it must be a writable mbuf.

Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46627

show more ...


# a43fb365 10-Sep-2024 Maxim Sobolev <sobomax@FreeBSD.org>

mbuf: improve KASSERT(9) falure messages in the m_apply()

- Make less ambiguous;
- extend to provide more context for post-mortem.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.

mbuf: improve KASSERT(9) falure messages in the m_apply()

- Make less ambiguous;
- extend to provide more context for post-mortem.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D43776
MFC after: 2 weeks

show more ...


# badf44cc 04-Jun-2024 Gleb Smirnoff <glebius@FreeBSD.org>

mbuf: provide m_freemp()

This function follows both m_nextpkt and m_next linkage freeing all mbufs.
Note that existing m_freem() follows only m_next.

Reviewed by: khng
Differential Revision: https

mbuf: provide m_freemp()

This function follows both m_nextpkt and m_next linkage freeing all mbufs.
Note that existing m_freem() follows only m_next.

Reviewed by: khng
Differential Revision: https://reviews.freebsd.org/D45477

show more ...


Revision tags: release/14.1.0
# e6a4b572 14-Apr-2024 Gleb Smirnoff <glebius@FreeBSD.org>

mbuf: restore m_uiotombuf() feature of returning a zero length mbuf

PR: 278340
Fixes: aba79b0f4a3f69f070ace6effd5700d65226bd20


# aba79b0f 08-Apr-2024 Gleb Smirnoff <glebius@FreeBSD.org>

mbuf: provide mc_uiotomc() a function to copy from uio(9) to mchain

Implement m_uiotombuf() as a wrapper around mc_uiotomc(). The M_EXTPG is
left untouched. The m_uiotombuf() is left as a compat K

mbuf: provide mc_uiotomc() a function to copy from uio(9) to mchain

Implement m_uiotombuf() as a wrapper around mc_uiotomc(). The M_EXTPG is
left untouched. The m_uiotombuf() is left as a compat KPI. New code
should use either mc_uiotomc() or m_uiotombuf_nomap().

Reviewed by: markj, tuexen
Differential Revision: https://reviews.freebsd.org/D44150

show more ...


# fd01798f 08-Apr-2024 Gleb Smirnoff <glebius@FreeBSD.org>

mbuf: add mc_split() that works on two struct mchain

It preserves tail points and all length/memory accounting, so that caller
doesn't need to do any extra traversals. It doesn't respect M_PKTHDR b

mbuf: add mc_split() that works on two struct mchain

It preserves tail points and all length/memory accounting, so that caller
doesn't need to do any extra traversals. It doesn't respect M_PKTHDR but
it may be improved if needed. It respects M_EOR, though. First consumer
will be the new unix(4) SOCK_STREAM and SOCK_SEQPACKET.

Also provide much more simple mc_concat() that glues two chains back.

Reviewed by: markj
Differentail Revision: https://reviews.freebsd.org/D44148

show more ...


Revision tags: release/13.3.0
# f7d5900a 28-Dec-2023 John Baldwin <jhb@FreeBSD.org>

sys: Style fix for M_EXT | M_EXTPG

Add a space around the | operator in places testing for either M_EXT
or M_EXTPG.

Reviewed by: imp, glebius
Sponsored by: Chelsio Communications
Differential Revis

sys: Style fix for M_EXT | M_EXTPG

Add a space around the | operator in places testing for either M_EXT
or M_EXTPG.

Reviewed by: imp, glebius
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D43216

show more ...


# 29363fb4 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl s

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


Revision tags: release/13.2.0, release/12.4.0
# c414347b 30-Aug-2022 Gleb Smirnoff <glebius@FreeBSD.org>

mbufs: isolate max_linkhdr and max_protohdr handling in the mbuf code

o Statically initialize max_linkhdr to default value without relying
on domain(9) code doing that.
o Statically initialize max

mbufs: isolate max_linkhdr and max_protohdr handling in the mbuf code

o Statically initialize max_linkhdr to default value without relying
on domain(9) code doing that.
o Statically initialize max_protohdr to a sane value, without relying
on TCP being always compiled in.
o Retire max_datalen. Set, but not used.
o Don't make the domain(9) system responsible in validating these
values and updating max_hdr. Instead provide KPI max_linkhdr_grow()
and max_protohdr_grow().
o Call max_linkhdr_grow() from IEEE802.11 and max_protohdr_grow() from
TCP. Those are the only protocols today that may want to grow.

Reviewed by: tuexen
Differential revision: https://reviews.freebsd.org/D36376

show more ...


# 9b841b0e 24-Jun-2022 Gleb Smirnoff <glebius@FreeBSD.org>

m_uiotombuf: write total memory length of the allocated chain in pkthdr

Data allocated by m_uiotombuf() usually goes into a socket buffer.
We are interested in the length of useful data to be added

m_uiotombuf: write total memory length of the allocated chain in pkthdr

Data allocated by m_uiotombuf() usually goes into a socket buffer.
We are interested in the length of useful data to be added to sb_acc,
as well as total memory used by mbufs. The later would be added to
sb_mbcnt. Calculating this value at allocation time allows to save
on extra traversal of the mbuf chain.

Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35301

show more ...


# b8394039 07-Jun-2022 Hans Petter Selasky <hselasky@FreeBSD.org>

mbuf(9): Fix size of mbuf for all 32-bit platforms (i386, ARM, PowerPC and RISCV)

Do this by reducing the size of the MBUF_PEXT_MAX_PGS, causing "struct mbuf" to
be bigger than M_SIZE, and also add

mbuf(9): Fix size of mbuf for all 32-bit platforms (i386, ARM, PowerPC and RISCV)

Do this by reducing the size of the MBUF_PEXT_MAX_PGS, causing "struct mbuf" to
be bigger than M_SIZE, and also add a missing padding field to ensure 64-bit
alignment.

Reviewed by: gallatin@
Reported by: Elliott Mitchell
Differential revision: https://reviews.freebsd.org/D35339
MFC after: 1 week
Sponsored by: NVIDIA Networking

show more ...


# 4d88d81c 25-May-2022 Hans Petter Selasky <hselasky@FreeBSD.org>

mbuf(9): Implement a leaf network interface field in the mbuf packet header.

When packets are received they may traverse several network interfaces like
vlan(4) and lagg(9). When doing receive side

mbuf(9): Implement a leaf network interface field in the mbuf packet header.

When packets are received they may traverse several network interfaces like
vlan(4) and lagg(9). When doing receive side offloads it is important to
know the first network interface entry point, because that is where all
offloading is taking place. This makes it possible to track receive
side route changes for multiport setups, for example when lagg(9) receives
traffic from more than one port. This avoids having to install multiple
offloading rules for the same stream.

This field works similar to the existing "rcvif" mbuf packet header field.

Submitted by: jhb@
Reviewed by: gallatin@ and gnn@
Differential revision: https://reviews.freebsd.org/D35339
Sponsored by: NVIDIA Networking
Sponsored by: Netflix

show more ...


Revision tags: release/13.1.0
# 17cbcf33 26-Jan-2022 Hans Petter Selasky <hselasky@FreeBSD.org>

mbuf(9): Assert receive mbufs don't carry a send tag.

Else we would start leaking reference counts.

Discussed with: jhb@
MFC after: 1 week
Sponsored by: NVIDIA Networking


# c6c52d8e 27-Dec-2021 Alexander Motin <mav@FreeBSD.org>

kern: Remove CTLFLAG_NEEDGIANT from some more sysctls.

MFC after: 2 weeks


# 3c39566d 14-Dec-2021 Mateusz Guzik <mjg@FreeBSD.org>

mbuf: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")


Revision tags: release/12.3.0
# ac2b5444 10-Nov-2021 Mark Johnston <markj@FreeBSD.org>

mbuf: Fix an offset calculation in m_apply_extpg_one()

We were not including the requested starting offset in the page offset.

Reviewed by: jhb
Fixes: 3c7a01d773ac ("Extend m_apply() to support un

mbuf: Fix an offset calculation in m_apply_extpg_one()

We were not including the requested starting offset in the page offset.

Reviewed by: jhb
Fixes: 3c7a01d773ac ("Extend m_apply() to support unmapped mbufs.")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32922

show more ...


# dd31400c 04-Nov-2021 Hans Petter Selasky <hselasky@FreeBSD.org>

Factor out flags preserved during mbuf demote into a separate define.

This define will later on be used by coming TLS RX hardware offload patches.

No functional change intended.

Reviewed by: jhb@

Factor out flags preserved during mbuf demote into a separate define.

This define will later on be used by coming TLS RX hardware offload patches.

No functional change intended.

Reviewed by: jhb@
MFC after: 1 week
Sponsored by: NVIDIA Networking

show more ...


# a4667e09 20-Oct-2021 Mark Johnston <markj@FreeBSD.org>

Convert vm_page_alloc() callers to use vm_page_alloc_noobj().

Remove page zeroing code from consumers and stop specifying
VM_ALLOC_NOOBJ. In a few places, also convert an allocation loop to
simply

Convert vm_page_alloc() callers to use vm_page_alloc_noobj().

Remove page zeroing code from consumers and stop specifying
VM_ALLOC_NOOBJ. In a few places, also convert an allocation loop to
simply use VM_ALLOC_WAITOK.

Similarly, convert vm_page_alloc_domain() callers.

Note that callers are now responsible for assigning the pindex.

Reviewed by: alc, hselasky, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31986

show more ...


# be79f30d 26-Jul-2021 John Baldwin <jhb@FreeBSD.org>

m_dup: Handle unmapped mbufs as an input mbuf.

Use m_copydata() instead of a direct bcopy() when copying data out of
a source mbuf into a newly-allocated mbuf.

PR: 256610
Reported by: Niels

m_dup: Handle unmapped mbufs as an input mbuf.

Use m_copydata() instead of a direct bcopy() when copying data out of
a source mbuf into a newly-allocated mbuf.

PR: 256610
Reported by: Niels Bakker <niels=freebsd@bakker.net>
Reviewed by: markj
MFC after: 2 weeks

show more ...


# c2c34ee5 06-Jul-2021 Mateusz Guzik <mjg@FreeBSD.org>

mbuf: add m_get_raw and m_gethdr_raw

The intent is to eliminate the MT_NOINIT flag and consequently a branch
from the constructor.

Reviewed by: gallatin
Sponsored by: Rubicon Communications, LLC ("

mbuf: add m_get_raw and m_gethdr_raw

The intent is to eliminate the MT_NOINIT flag and consequently a branch
from the constructor.

Reviewed by: gallatin
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31080

show more ...


# aa341db3 26-May-2021 John Baldwin <jhb@FreeBSD.org>

Rename m_unmappedtouio() to m_unmapped_uiomove().

This function doesn't only copy data into a uio but instead is a
variant of uiomove() similar to uiomove_fromphys().

Reviewed by: gallatin, markj
S

Rename m_unmappedtouio() to m_unmapped_uiomove().

This function doesn't only copy data into a uio but instead is a
variant of uiomove() similar to uiomove_fromphys().

Reviewed by: gallatin, markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D30444

show more ...


# 3f9dac85 26-May-2021 John Baldwin <jhb@FreeBSD.org>

Extend m_copyback() to support unmapped mbufs.

Reviewed by: gallatin, markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D30133


12345678910>>...24