During network device initialization, print the hardware
address of the network device to the info kernel console.
This should simplify first-level of diagnosis.
Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com>
Approved-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #10
continue;
}
+ /* Print hardware address */
+ if (nf->hwaddr_len == 6) {
+ uk_pr_info("%c%c%u: Hardware address: %02"PRIx8":%02"PRIx8":%02"PRIx8":%02"PRIx8":%02"PRIx8":%02"PRIx8"\n",
+ nf->name[0], nf->name[1], nf->num,
+ nf->hwaddr[0], nf->hwaddr[1], nf->hwaddr[2],
+ nf->hwaddr[3], nf->hwaddr[4], nf->hwaddr[5]);
+ }
+
/* Declare the first network device as default interface */
if (is_first_nf) {
uk_pr_info("%c%c%u: Set as default interface\n",