Skip to content

Commit

Permalink
update for DPDK 20.11-rc4, using rte_flow API
Browse files Browse the repository at this point in the history
  • Loading branch information
rstade committed Nov 25, 2020
1 parent b49232f commit b6d6961
Show file tree
Hide file tree
Showing 13 changed files with 358 additions and 5,701 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ As a positive side effect the code becomes more compact as a lot of type paramet

After parsing we specialize the parsed generic Header type to a specific Rust struct type, e.g. a struct IpHeader. Therefore we still utilize the full type checking capabilities of Rust at compile time and we lose nothing compared to the original code.

## following additional packages are needed to build NetBricks:
## Some additional packages for building this branch:

```
dnf install jq
```

dnf install numactl-devel
dnf install libpcap-devel
dnf install kernel-devel

## The original NetBricks ReadMe:

Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ case $TASK in
;;

test)
native
pushd $BASE_DIR/framework
export LD_LIBRARY_PATH="${NATIVE_LIB_PATH}:${DPDK_LD_PATH}:${TOOLS_BASE}:${LD_LIBRARY_PATH}"
# sudo -E env "PATH=$PATH" ${CARGO} test --release
Expand Down
2 changes: 1 addition & 1 deletion framework/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "e2d2"
version = "1.0.5"
version = "1.0.6"
authors = ["Aurojit Panda <[email protected]>", "rainer <[email protected]>"]
build = "build.rs"

Expand Down
60 changes: 30 additions & 30 deletions framework/src/interface/pdu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,44 +428,44 @@ impl<'a> Pdu<'a> {
pub fn tcp_checksum_tx_offload(&self) -> bool {
unsafe { (*self.mbuf).tcp_checksum_tx_offload() }
}
/*
/// functions for tx offload
#[inline]
pub fn l2_len(&self) -> u64 {
unsafe { (*self.mbuf).l2_len() }
}

#[inline]
pub fn set_l2_len(&mut self, val: u64) {
unsafe {
(*self.mbuf).set_l2_len(val);
}
}
/// functions for tx offload
#[inline]
pub fn l2_len(&self) -> u64 {
unsafe { (*self.mbuf).l2_len() }
}

#[inline]
pub fn l3_len(&self) -> u64 {
unsafe { (*self.mbuf).l3_len() }
#[inline]
pub fn set_l2_len(&mut self, val: u64) {
unsafe {
(*self.mbuf).set_l2_len(val);
}
}

#[inline]
pub fn set_l3_len(&mut self, val: u64) {
unsafe {
(*self.mbuf).set_l3_len(val);
}
}
#[inline]
pub fn l3_len(&self) -> u64 {
unsafe { (*self.mbuf).l3_len() }
}

#[inline]
pub fn l4_len(&self) -> u64 {
unsafe { (*self.mbuf).l4_len() }
#[inline]
pub fn set_l3_len(&mut self, val: u64) {
unsafe {
(*self.mbuf).set_l3_len(val);
}
}

#[inline]
pub fn set_l4_len(&mut self, val: u64) {
unsafe {
(*self.mbuf).set_l4_len(val);
}
#[inline]
pub fn l4_len(&self) -> u64 {
unsafe { (*self.mbuf).l4_len() }
}

#[inline]
pub fn set_l4_len(&mut self, val: u64) {
unsafe {
(*self.mbuf).set_l4_len(val);
}
*/
}

#[inline]
pub fn ol_flags(&self) -> u64 {
unsafe { (*self.mbuf).ol_flags }
Expand Down
Loading

0 comments on commit b6d6961

Please sign in to comment.