Skip to content

Commit

Permalink
Update rustdoc CI rustc version to 1.75.0 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegwan authored Jun 5, 2024
1 parent 6ecc458 commit f5c1196
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69.0
toolchain: 1.75.0
override: true
components: rustfmt, clippy
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -59,6 +59,8 @@ jobs:
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "DPDK_PATH=$DPDK_PATH" >> $GITHUB_ENV
- name: Remove LLVM and Clang 13/14
run: sudo apt remove --auto-remove clang-14 llvm-14 && sudo apt remove --auto-remove clang-13 llvm-13;

- name: Clippy retina-core (no mlx5)
run: cargo clippy --manifest-path core/Cargo.toml --no-default-features -- --deny warnings
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69.0
toolchain: 1.75.0
override: true
components: rustfmt, clippy
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -66,4 +66,4 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
force_orphan: true
force_orphan: true
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ members = [
"examples/video",
"filtergen",
]
resolver = "2"

[profile.release]
lto = true
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
bindgen = "0.60.1"
bindgen = "0.69.4"
cc = "1.0.79"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fn main() {
.allowlist_type(r"(rte|eth|pcap)_.*")
.allowlist_function(r"(_rte|rte|eth|numa|pcap)_.*")
.allowlist_var(r"(RTE|DEV|ETH|MEMPOOL|PKT|rte)_.*")
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
.generate_comments(false)
.generate()
.unwrap_or_else(|e| panic!("Failed to generate bindings: {:?}", e));
Expand Down
2 changes: 1 addition & 1 deletion core/src/filter/hardware/flow_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl FlowAction {

// Since the RSS key needs to outlive this method, we use the static
// SYMMETRIC_RSS_KEY instead of the key queried from the existing rss_conf
a_rss_conf.key = SYMMETRIC_RSS_KEY.as_ptr() as *const u8;
a_rss_conf.key = SYMMETRIC_RSS_KEY.as_ptr();

self.rss.push(a_rss_conf);
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/filter/hardware/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ fn validate_rule(
// Need to update flow_action_rss here
// reta_raw needs to stay in scope until after rte_flow_validate() succeeds
let reta_raw = port.reta.iter().map(|q| q.raw()).collect::<Vec<_>>();
for mut a in action.rules.iter_mut() {
for a in action.rules.iter_mut() {
if let dpdk::rte_flow_action_type_RTE_FLOW_ACTION_TYPE_RSS = a.type_ {
action.rss[0].queue_num = port.queue_map.len() as u32;
action.rss[0].queue = reta_raw.as_ptr();
Expand Down Expand Up @@ -282,7 +282,7 @@ fn create_rule(
// Need to update flow_action_rss here
// reta_raw needs to stay in scope until after rte_flow_create() succeeds
let reta_raw = port.reta.iter().map(|q| q.raw()).collect::<Vec<_>>();
for mut a in action.rules.iter_mut() {
for a in action.rules.iter_mut() {
if let dpdk::rte_flow_action_type_RTE_FLOW_ACTION_TYPE_RSS = a.type_ {
action.rss[0].queue_num = port.queue_map.len() as u32;
action.rss[0].queue = reta_raw.as_ptr();
Expand Down Expand Up @@ -339,7 +339,7 @@ fn add_redirect(port: &Port, from_group: u32, to_group: u32, priority: u32) -> R
let mut action = FlowAction::new(port.id);
action.append_jump(to_group);
action.finish();
for mut a in action.rules.iter_mut() {
for a in action.rules.iter_mut() {
if let dpdk::rte_flow_action_type_RTE_FLOW_ACTION_TYPE_JUMP = a.type_ {
a.conf = &action.jump[0] as *const _ as *const c_void;
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/memory/mbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Mbuf {

/// Returns the contents of the Mbuf as a byte slice.
pub fn data(&self) -> &[u8] {
let ptr = self.get_data_address(0) as *const u8;
let ptr = self.get_data_address(0);
unsafe { slice::from_raw_parts(ptr, self.data_len()) as &[u8] }
}

Expand All @@ -96,7 +96,7 @@ impl Mbuf {
pub fn get_data_slice(&self, offset: usize, count: usize) -> Result<&[u8]> {
if offset < self.data_len() {
if offset + count <= self.data_len() {
let ptr = self.get_data_address(offset) as *const u8;
let ptr = self.get_data_address(offset);
unsafe { Ok(slice::from_raw_parts(ptr, count) as &[u8]) }
} else {
bail!(MbufError::ReadPastBuffer)
Expand Down
5 changes: 1 addition & 4 deletions core/src/runtime/online.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ where
let mut core_map: BTreeMap<CoreId, Vec<RxQueue>> = BTreeMap::new();
for (_port_id, port) in ports.iter() {
for (rxqueue, core_id) in port.queue_map.iter() {
core_map
.entry(*core_id)
.or_insert_with(Vec::new)
.push(*rxqueue);
core_map.entry(*core_id).or_default().push(*rxqueue);
}
}
for (core_id, rxqueues) in core_map.into_iter() {
Expand Down
2 changes: 1 addition & 1 deletion core/src/subscription/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl Trackable for TrackedFrame {
if let Some(session_id) = session_id {
self.session_buf
.entry(session_id)
.or_insert_with(Vec::new)
.or_default()
.push(pdu.mbuf_own());
} else {
drop(pdu);
Expand Down
2 changes: 1 addition & 1 deletion core/src/subscription/zc_frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Trackable for TrackedZcFrame {
if let Some(session_id) = session_id {
self.session_buf
.entry(session_id)
.or_insert_with(Vec::new)
.or_default()
.push(pdu.mbuf_own());
} else {
drop(pdu);
Expand Down

0 comments on commit f5c1196

Please sign in to comment.