This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! UEFI Memory Allocators | |
//! | |
//! XXX | |
use r_efi::efi; | |
// UEFI guarantees 8-byte alignments through `AllocatePool()`. Any request higher than this | |
// alignment needs to take special precautions to align the returned pointer, and revert that step | |
// when freeing the memory block again. | |
const POOL_ALIGNMENT: usize = 8usize; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Example: Hello World! | |
// | |
// This is an example UEFI application that prints "Hello World!", then waits for key input before | |
// it exits. It serves as base example how to write UEFI applications without any helper modules | |
// other than the UEFI protocol definitions. | |
// | |
// The `efi_main` function serves as entry-point. Depending on your target-configuration, this | |
// entry point might be called differently. If you use the target-configuration shipped with | |
// r-efi, then `efi_main` is the selected PE/COFF entry point. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn unquote_single<'a>(acc: &mut String, source: &'a str) -> Option<&'a str> { | |
if let Some(end) = source.find('\'') { | |
acc.push_str(&source[..end]); | |
Some(&source[end + 1..]) | |
} else { | |
None | |
} | |
} | |
fn unquote_double<'a>(acc: &mut String, source: &'a str) -> Option<&'a str> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/** | |
* Ini-File Handling | |
* | |
* XXX | |
* | |
* Possible extensions: | |
* | |
* * For now the API does not include serializers / writers, but was written |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% git diff | |
diff --git a/dbus.spec b/dbus.spec | |
index 331fac9..4b2e139 100644 | |
--- a/dbus.spec | |
+++ b/dbus.spec | |
@@ -206,6 +206,14 @@ find %{buildroot} -name '*.la' -type f -delete | |
rm -rf %{buildroot}%{_libdir}/cmake | |
%endif | |
+# Delete upstream units |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* SPDX-License-Identifier: LGPL-2.1+ */ | |
#ifndef _UAPI_LINUX_BUS1_H | |
#define _UAPI_LINUX_BUS1_H | |
/** | |
* DOC: Public Bus1 API | |
* | |
* XXX | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* root type and misc */ | |
#define POLICY_T "(" POLICY_T_CONNECT POLICY_T_OWN POLICY_T_XMIT POLICY_T_XMIT ")" | |
#define POLICY_T_VERDICT "(bt)" | |
/* connect policies */ | |
#define POLICY_T_CONNECT "(" POLICY_T_CONNECT_ENTRY POLICY_T_CONNECT_MAP POLICY_T_CONNECT_MAP ")" | |
#define POLICY_T_CONNECT_MAP "a(u" POLICY_T_CONNECT_ENTRY ")" | |
#define POLICY_T_CONNECT_ENTRY POLICY_T_VERDICT | |
/* own policies */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void test_lpm_map(int keysize) | |
{ | |
size_t i, j, n_matches, n_nodes, n_lookups; | |
struct tlpm_node *t, *list = NULL; | |
struct bpf_lpm_trie_key *key; | |
uint8_t data[keysize], value[keysize + 1] = {}; | |
int r, map; | |
/* Compare behavior of tlpm vs. bpf-lpm. Create a randomized set of | |
* prefixes and insert it into both tlpm and bpf-lpm. Then run some |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/samples/bpf/map_perf_test_kern.c b/samples/bpf/map_perf_test_kern.c | |
index 311538e5a701..f712ad3528ea 100644 | |
--- a/samples/bpf/map_perf_test_kern.c | |
+++ b/samples/bpf/map_perf_test_kern.c | |
@@ -42,6 +42,14 @@ struct bpf_map_def SEC("maps") percpu_hash_map_alloc = { | |
.map_flags = BPF_F_NO_PREALLOC, | |
}; | |
+struct bpf_map_def SEC("maps") lpm_trie_map_alloc = { | |
+ .type = BPF_MAP_TYPE_LPM_TRIE, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/* | |
* IPv6 Neighbor Discovery Protocol | |
* | |
* This is the public header of the n-ndp library, implementing IPv6 Neighbor | |
* Discovery Protocol as described in RFC-4861. This header defines the public | |
* API and all entry points of n-ndp. | |
*/ |