Re: [PATCH] af_packet: Handle outgoing VLAN packets without hardware offloading

From: alexandre . ferrieux
Date: Sat May 25 2024 - 16:57:30 EST


On 25/05/2024 17:51, Willem de Bruijn wrote:

First, we need to even understand better why anything is using
SOCK_DGRAM when access to L2.5 headers is important, and whether the
process can convert to using SOCK_RAW instead.

For libpcap, it seems to be linked to the fact that the "any" device can aggregate links with varied L2 header sizes, which in turn complicates filtering (see Guy Harris' comment on this [1]).

Given that 99% of useful traffic is Ethernet, such considerations look awkward now. I for one would love to see an "any2" based on SOCK_RAW. And while you're at it, please let the new variant of SLL contain the full Ethernet header at the end, so that a simple offset gives access to the whole linear wire image...

-Alex

[1] https://github.com/the-tcpdump-group/libpcap/issues/1105#issuecomment-1092221785
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.