AltraMayor / AltraMayor/gatekeeper

Minimizing endian computation

Aperta
#125 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement good first issue
Lingua principale
C
Stelle
1.6k
Fork
252
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

When `rte_be_to_cpu_16()` and its sister functions are called over a constant, they compute their results in compile time, that is, the results are also constants. This enables Gatekeeper to avoid some runtime calls to `rte_be_to_cpu_16()` and its sister functions. For example, in `process_single_packet()` in file `ggu/main.c`, one can rename variable `ether_type` to `ether_type_be`, and adjust the `case`s of the `switch` as in `case rte_cpu_to_be_16(ETHER_TYPE_IPv4):` to make the endian computations in compile time instead of runtime.

In order to completely address this issue, one has to identify all locations at which similar changes can be made. These locations may even include variables other than Ethernet types.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.