![Page 1: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/1.jpg)
Transmission Error Detectorper Wi-Fi
su kernel Linux 4.0
Alma Mater Studiorum · Università degli Studi di Bologna SCUOLA DI SCIENZE
Corso di Laurea in Informatica
Relatore: Chiar.mo Prof. Vittorio Ghini
Presentata da: Gabriele Di Bernardo
Sessione IAnno Accademico 2014/2015
![Page 2: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/2.jpg)
• Mobile device multi-homed
• Wi-Fi
• Real-time multimedia oriented app (ad esempio un app VoIP, solitamente implementate over UDP)
Scenario
![Page 3: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/3.jpg)
• Architettura distribuita per consentire ad un app in esecuzione su un device mobile multi-homed di sfruttare tutte le sue interfacce di rete
• Ciascun datagram UDP inviato sull’interfaccia di rete più vantaggiosa
Always Best Packet Switching
![Page 4: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/4.jpg)
• Client proxy• Server proxy
Always Best Packet Switching
![Page 5: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/5.jpg)
• Modulo fondamentale ABPS client proxy
• Monitora ciascun datagram UDP in invio attraverso una certa scheda wireless
• Notifica al proxy client lo stato di consegna di ogni frame trasmesso al first-hop (First-hop Transmission Notification)
• Implementato in modo cross-layer lungo il kernel del nodo mobile
Transmission Error Detector
![Page 6: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/6.jpg)
• Estendere kernel Linux 4.0 con un modulo Transmission Error Detector per Wi-Fi
• Definire un’interfaccia che consenta ad una qualsiasi app in esecuzione sul sistema ottenuto di sapere se i pacchetti trasmessi sono stati consegnati o meno al primo AP
• Modulo TED precedentemente sviluppato per kernel Linux 2.6.30-rc5
Obiettivo
![Page 7: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/7.jpg)
Nelle trasmissioni Wi-Fi l’accesso al mezzo trasmissivo è regolamentato dal protocollo CSMA/CA
A trasmissione dati completata il nodo sorgente si pone in attesa di ricezione di un ACK da parte della stazione ricevente.
IEEE 802.11
![Page 8: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/8.jpg)
Implementazione
![Page 9: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/9.jpg)
Implementazione - user space• App necessita di un identificativo per monitorare ogni
messaggio in invio
• Utilizzo system call sendmsg
• App specifica in ancillary data puntatore di memoria in user space
• Identificativo messaggio utile a contestualizzare notifiche provenienti da TED
![Page 10: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/10.jpg)
Struttura socket buffer
struct sk_buff { .. .. /* new field added */ uint32_t sk_buff_identifier; };
Implementazione - kernel space
![Page 11: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/11.jpg)
Implementazione - Transport layer
• Trasmissione UDP controllo ceduto a udp_sendmsg
• Parsing ancillary data
• Allocazione struttura sk_buff moduli livello rete
• Identificativo passato ad app richiedente attraverso indirizzo di memoria specificato negli ancillary data
![Page 12: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/12.jpg)
Implementazione - Network layer
• Contatore incrementato per ogni messaggio in invio
• Valore contatore assegnato a socket buffer
• Frammentazione, ciascun frammento mantiene l’identificativo pacchetto originario
• Introduzione contatore per identificare ciascun messaggio in invio
![Page 13: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/13.jpg)
• Sottosistema mac80211 realizza logica di creazione e gestione frame 802.11 per device softMAC
Implementazione - mac80211 subsystem
![Page 14: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/14.jpg)
mac80211 subsystem - Invio frame
• TED mantiene informazioni principali frame in invio in apposite strutture dati
• Informazioni associate a campo sequence control header IEEE 802.11
![Page 15: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/15.jpg)
mac80211 subsystem - Ricezione ACK
• Sottosistema mac80211 notificato sullo status di consegna frame
• Accesso header IEEE 802.11 ed utilizzo sequence control come chiave di ricerca all’interno strutture dati mantenute da TED
• Sollevata First-hop Transmission Notification contente informazioni memorizzate da TED e informazioni relative allo stato di consegna del frame ( ACK/NACK, retry count )
![Page 16: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/16.jpg)
• App può ricevere First-hop Transmission Notification come qualsiasi messaggio di tipo ICMP
• App può leggere ( tramite system call recvmsg ) dalla coda degli errori del socket abilitando flag IP_RECVERR
• Messaggio di errore allocato nel kernel tramite struttura struct sock_extended_err
First-hop Transmission Notification
• TED identifier, informazioni frammentazione, informazioni trasmissione
![Page 17: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/17.jpg)
struct sock_extended_err { __u32 ee_errno; __u8 ee_origin; __u8 ee_type; __u8 ee_code; __u8 ee_pad; __u32 ee_info; __u32 ee_data;
/* Transmission Error Detector new field for retry count */ __u8 ee_retry_count;
};
#define SO_EE_ORIGIN_NONE 0 #define SO_EE_ORIGIN_LOCAL 1 #define SO_EE_ORIGIN_ICMP 2 #define SO_EE_ORIGIN_ICMP6 3 #define SO_EE_ORIGIN_TXSTATUS 4
/* Transmission Error Detector new value for ee_origin field*/ #define SO_EE_ORIGIN_LOCAL_NOTIFY 5
retry count
fragment length & offset
more fragment
ACK/NACK
message identifier
First-hop Transmission Notification
![Page 18: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/18.jpg)
Valutazioni sperimentali
0
250
500
750
1000
A B C
Ricezione notifica in ms
25 ms
235 ms
955 ms
• (A) 71MB trasmessi da Raspberry Pi a 40Mbps
5000 pacchetti 1096 Byte ciascuno
• (B) Due host trasmettono 36MB rispettivamente a 10Mbps e 15Mbps
• (C) Tre host trasmettono 23MB rispettivamente a 10Mbps, 11Mbps e 15Mbps
Traffico generato client
![Page 19: Transmission Error Detector per Wi-Fi su kernel Linux 4.0](https://reader033.vdocument.in/reader033/viewer/2022042908/58f2acd41a28abea5b8b45bb/html5/thumbnails/19.jpg)
Realizzazione modulo Transmission Error Detector per Wi-Fi su kernel Linux 4.0
È stata sviluppata un’app che sfrutta modulo TED su cui è stato possibile condurre test e valutazioni sperimentali
Sviluppi futuri:• Porting piattaforma Android• Estensione First-hop Transmission Error Notification con
bit rate trasmissivo frame
Conclusioni & sviluppi futuri