tsnlab / libtsn

TSN library for C
GNU General Public License v3.0
5 stars 3 forks source link

libtsn issue #41

Closed wm-o closed 9 months ago

wm-o commented 10 months ago

Error occurred When libtsn uses QoS(cbs only) and create a vlan We have to add a backslash when executing the command that configures TSN Qdiscs. in vlan.rs line 78

When server receives packet packet size is set to maximum. in throughput.rs

pak-ji commented 10 months ago

First Issue = tc command bug)

Error occurred When libtsn uses Qos(cbs only) and create a vlan We have to add a backslash when executing the command that configures TSN Qdiscs. in vlan.rs line 78

// [line 77-81] ==> Here, tc command. let cmd = format!( "tc qdisc replace dev {} parent {}:{} handle {} cbs idleslope {} sendslope {} hicredit {} locredit {} offload 1", ifname, root_handle, qid, handle, idleslope, sendslope, hicredit, locredit );

... }


<br/>

### **Secound Issue = bps calculation bug)** 
> When server receives packet packet size packet size is set to maximum. in throughput.rs
- src/bin/throughput.rs
```rust
fn do_server(iface_name: String) {
...

// [line 168-169] ==> Here, a fixed packet size is assigned.
    while unsafe { RUNNING } {
        let mut packet = [0u8; 1514];

...

// [line 203-204] ==> Here, calculate pps, bps, loss.
                // Make thread for statistics
                thread::spawn(stats_worker);

...

// [line 223-229] ==> Here, a fixed packet size is added.
            PerfOpFieldValues::Data => {
                unsafe {
                    STATS.last_id = perf_pkt.get_id();
                    STATS.pkt_count += 1;
                    STATS.total_bytes += packet.len() + 4/* hidden VLAN tag */;
                }
            }

...
}
tribela commented 9 months ago

Fixed by #44 and #45