Home
last modified time | relevance | path

Searched full:zerocopy (Results 1 – 25 of 73) sorted by relevance

123

/linux/rust/zerocopy/
H A DREADME.md1 # `zerocopy`
3 These source files come from the Rust `zerocopy` crate, version v0.8.62
4 (released 2026-10-08), hosted in the <https://github.com/google/zerocopy>
10 https://github.com/google/zerocopy/blob/v0.8.62/zerocopy/README.md?plain=1
11 https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-BSD
12 https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-APACHE
13 https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-MIT
/linux/rust/zerocopy-derive/
H A DREADME.md1 # `zerocopy-derive`
3 These source files come from the Rust `zerocopy-derive` crate, version v0.8.62
4 (released 2026-10-08), hosted in the <https://github.com/google/zerocopy>
11 https://github.com/google/zerocopy/blob/v0.8.62/zerocopy/README.md?plain=1
12 https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-BSD
13 https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-APACHE
14 https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-MIT
H A Dlib.rs11 //! Derive macros for [zerocopy]'s traits.
13 //! [zerocopy]: https://docs.rs/zerocopy
31 // `cargo-zerocopy` supplies this cfg for pinned-nightly tests. During UI tests,
89 #[proc_macro_derive($trait, attributes(zerocopy))]
175 #[zerocopy(crate = \"zerocopy_renamed\")] \
226 #[proc_macro_derive(most_traits, attributes(zerocopy))]
H A Dutil.rs27 // The value of the last `#[zerocopy(on_error = ...)]` attribute, or `false`
31 // The span of the last `#[zerocopy(on_error = ...)]` attribute, if any.
90 /// `::zerocopy` if not found. in try_from_derive_input()
92 let mut path = parse_quote!(::zerocopy); in with_input()
98 if path_is_ident(&meta_list.path, "zerocopy") { in with_input()
140 "unrecognized value for `on_error` attribute from `zerocopy`; expected `skip` or `fail`", in error_or_skip()
716 // error[E0283]: type annotations required: cannot resolve `core::marker::PhantomData<&'a u8>: zerocopy::Unaligned`
722 // = note: required by `zerocopy::Unaligned`
1100 "zerocopy",
1156 ("zerocopy", "zerocop
[all...]
/linux/rust/
H A DMakefile12 obj-$(CONFIG_RUST) += zerocopy.o
89 zerocopy-cfgs := \
92 zerocopy-flags := \
94 $(call cfgs-to-flags,$(zerocopy-cfgs))
96 zerocopy-envs := \
197 rustdoc-kernel rustdoc-pin_init rustdoc-zerocopy rustdoc-zerocopy_derive
233 rustdoc-zerocopy_derive: $(src)/zerocopy-derive/lib.rs rustdoc-clean rustdoc-syn FORCE
255 rustdoc-zerocopy: private rustc_target_envs := $(zerocopy-envs)
256 rustdoc-zerocopy
[all...]
/linux/tools/testing/vsock/
H A Dvsock_perf.c37 static bool zerocopy; variable
273 if (zerocopy) in run_sender()
287 if (zerocopy) { in run_sender()
320 zerocopy ? MSG_ZEROCOPY : 0); in run_sender()
328 if (zerocopy) { in run_sender()
359 if (zerocopy) in run_sender()
403 .name = "zerocopy",
422 " --zerocopy Enable zerocopy (for sender mode only)\n" in usage()
485 case 'Z': /* Zerocopy. */ in main()
486 zerocopy = true; in main()
H A Dmsg_zerocopy_common.c62 * performed as expected: zerocopy or fallback to copy. If NULL in vsock_recv_completion()
69 fprintf(stderr, "serr: was copy instead of zerocopy\n"); in vsock_recv_completion()
74 fprintf(stderr, "serr: was zerocopy instead of copy\n"); in vsock_recv_completion()
/linux/tools/testing/selftests/net/packetdrill/
H A Dtcp_zerocopy_fastopen-client.pkt2 // Fastopen client zerocopy test:
9 // zerocopy notification counter is not incremented. Verify this too.
11 --send_omit_free // do not reuse send buffers with zerocopy
24 // Read from error queue: no zerocopy notification
45 // Read from error queue: now has first zerocopy notification
H A Dtcp_zerocopy_maxfrags.pkt5 // 1) fit in a single packet without zerocopy
6 // 2) spill over into a second packet with zerocopy,
10 --send_omit_free // do not reuse send buffers with zerocopy
18 // Each pinned zerocopy page is fully accounted to skb->truesize.
44 // send a zerocopy iov of 18 elements:
75 // send a zerocopy iov of 64 elements:
H A Dtcp_zerocopy_fastopen-server.pkt2 // Fastopen server zerocopy test:
7 --send_omit_free // do not reuse send buffers with zerocopy
31 // Read from error queue: now has first zerocopy notification
H A Dtcp_zerocopy_closed.pkt4 // verify that a send in state TCP_CLOSE correctly aborts the zerocopy
5 // operation, specifically it does not increment the zerocopy counter.
10 --send_omit_free // do not reuse send buffers with zerocopy
H A Dtcp_zerocopy_small.pkt2 // small packet zerocopy test:
4 // verify that SO_EE_CODE_ZEROCOPY_COPIED is set on zerocopy
7 --send_omit_free // do not reuse send buffers with zerocopy
H A Dtcp_zerocopy_client.pkt2 // Minimal client-side zerocopy test
4 --send_omit_free // do not reuse send buffers with zerocopy
H A Dtcp_zerocopy_batch.pkt2 // batch zerocopy test:
6 --send_omit_free // do not reuse send buffers with zerocopy
/linux/rust/zerocopy/src/
H A Dlib.rs20 //! Zerocopy makes zero-cost memory manipulation effortless. We write `unsafe`
23 //! *For an overview of what's changed from zerocopy 0.7, check out our [release
26 //! *Have questions? Need more out of zerocopy? Submit a [customer request
30 //! [customer-request-issue]: https://github.com/google/zerocopy/issues/new/choose
31 //! [release-notes]: https://github.com/google/zerocopy/discussions/1680
32 //! [github-q-a]: https://github.com/google/zerocopy/discussions/categories/q-a
39 //! Zerocopy provides four derivable traits for zero-cost conversions:
55 //! Zerocopy provides three derivable marker traits that do not provide any
58 //! - [`KnownLayout`] indicates that zerocopy can reason about certain layout
68 //! Zerocopy provide
[all...]
H A Dmacros.rs46 /// # use zerocopy::transmute;
54 /// # use zerocopy::transmute;
228 /// # use zerocopy::transmute_ref;
248 /// # use zerocopy::{transmute_ref, FromBytes, IntoBytes, Immutable};
262 /// # use zerocopy::{transmute_ref, FromBytes, IntoBytes, Immutable};
284 /// # use zerocopy::transmute_ref;
295 /// # use {zerocopy::*, zerocopy_derive::*};
296 /// # type u16 = zerocopy::byteorder::native_endian::U16;
297 /// # type u32 = zerocopy::byteorder::native_endian::U32;
441 /// # use zerocopy
[all...]
H A Derror.rs16 //! Generally speaking, zerocopy's conversions may fail for one of up to three
67 //! [issue-1457]: https://github.com/google/zerocopy/issues/1457
82 //! use zerocopy::*;
95 //! use zerocopy::*;
110 //! use zerocopy::*;
134 /// Zerocopy's generic error type.
136 /// Generally speaking, zerocopy's conversions may fail for one of up to three
149 /// Zerocopy never uses this type directly in its API. Rather, we provide three
180 /// use zerocopy::*;
290 /// use zerocopy
[all...]
H A Dsplit_at.rs50 /// use zerocopy::{FromBytes, SplitAt, Unalign};
74 /// releases of zerocopy may make backwards-breaking changes to these items,
81 doc = concat!("[derive]: https://docs.rs/zerocopy/", env!("CARGO_PKG_VERSION"), "/zerocopy/derive.SplitAt.html"),
149 /// use zerocopy::{SplitAt, FromBytes};
234 /// use zerocopy::{SplitAt, FromBytes};
380 /// use zerocopy::{SplitAt, FromBytes};
443 /// use zerocopy::{SplitAt, FromBytes};
512 /// use zerocopy::SplitAt;
545 /// use zerocopy
[all...]
H A Dref.rs37 /// use zerocopy::*;
379 /// use zerocopy::*; in from_prefix()
480 /// use zerocopy::*;
592 /// use zerocopy::*; in from_suffix_with_elems()
705 /// use zerocopy::*; in into_mut()
804 /// use zerocopy::*;
868 /// use zerocopy::*; in deref_mut()
987 .expect("zerocopy internal error: into_ref should be infallible"); in cast_for_sized()
1062 .expect("zerocopy internal error: into_mut should be infallible"); in test_new_helper_slice()
1274 .expect("zerocopy interna in test_eq()
[all...]
/linux/rust/zerocopy-derive/derive/
H A Dmod.rs35 // deriving a `zerocopy`-defined trait, and these trait impls share a common in derive_hash()
36 // shape that `Hash` does not. In particular, `zerocopy` traits contain a in derive_hash()
63 // deriving a `zerocopy`-defined trait, and these trait impls share a common in derive_eq()
64 // shape that `Eq` does not. In particular, `zerocopy` traits contain a in derive_eq()
/linux/tools/testing/selftests/arm64/fp/
H A Dkernel-test.c32 static int zerocopy[2]; variable
182 ret = pipe(zerocopy); in create_socket()
184 printf("Failed to create zerocopy pipe: %s (%d)\n", in create_socket()
211 ret = vmsplice(zerocopy[1], &iov, 1, SPLICE_F_GIFT); in compute_digest()
219 ret = splice(zerocopy[0], NULL, sock, NULL, wrote, 0); in compute_digest()
/linux/Documentation/networking/
H A Dmsg_zerocopy.rst74 error(1, errno, "setsockopt zerocopy");
86 A zerocopy failure will return -1 with errno ENOBUFS. This happens if
145 other operations until the error is read. Zerocopy notifications have
217 protocol headers plus zerocopy user data. A packet may need to be
223 before the (copied) data is fully transmitted. A zerocopy completion
/linux/tools/testing/selftests/net/
H A Dmsg_zerocopy.c23 * If zerocopy mode ('-z') is enabled, the sender will verify that
24 * the kernel queues completions on the error queue for all zerocopy
243 /* in mixed-frags mode, alternate zerocopy and copy frags in do_sendmsg_corked()
244 * start with non-zerocopy, to ensure attach later works in do_sendmsg_corked()
402 int ret, zerocopy; in do_recv_completion() local
447 zerocopy = !(serr->ee_code & SO_EE_CODE_ZEROCOPY_COPIED); in do_recv_completion()
449 cfg_expect_zerocopy != zerocopy) { in do_recv_completion()
451 zerocopy, cfg_expect_zerocopy); in do_recv_completion()
454 cfg_expect_zerocopy = zerocopy; in do_recv_completion()
795 error(1, 0, "-m: cork_mixed requires corking and zerocopy"); in parse_opts()
/linux/drivers/net/
H A Dtap.c482 * guest kernel and host kernel when lower device supports zerocopy in tap_open()
484 * The macvlan supports zerocopy iff the lower device supports zero in tap_open()
587 bool zerocopy = false; in tap_get_user()
615 zerocopy = true; in tap_get_user()
618 if (!zerocopy) { in tap_get_user()
628 if (zerocopy) in tap_get_user()
668 if (zerocopy) { in tap_get_user()
586 bool zerocopy = false; tap_get_user() local
/linux/tools/perf/trace/beauty/
H A Dmsg_flags.c66 P_MSG_FLAG(ZEROCOPY); in syscall_arg__scnprintf_msg_flags()

123