-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packet_io.md update #978
base: master
Are you sure you want to change the base?
Packet_io.md update #978
Conversation
* include information on Generic Netlink userspace library * include information on Generic Netlink sniffer application Sign_of_by: don.newton@intel.com
8498931
to
8837dc2
Compare
@prsunny Can you take a look at this? |
@zhangyanzhao Hi Yanzhao, Requesting reviewers to be added for this feature from Microsoft. Thanks. |
doc/pins/Packet_io.md
Outdated
- Packet metadata can be specified by the using application in the P4 program. | ||
|
||
## Sniffer Application: | ||
The `sniffer` application provides the means of a `tcpdump`-like tool to listen to the genetlink device. The sniffer can be used for listening to traffic, as well as recording the traffic into a file or displaying to standard out. The resulting pcapng file can then be viewed using Wireshark. The `sender` application can be used to send an example packet or packets from a pcap/pcapng file through genetlink. The sender also registers a new genetlink family and group called genl_packet and packets respectively. Both sniffer and sender use the pcapplusplus library which is an actively maintained open source library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaik, genetlink was used to receive packet (from kernel to application). is 'sender' here sending to the kernel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaik, genetlink was used to receive packet (from kernel to application). is 'sender' here sending to the kernel?
Take a look now and see if things are clearer @prsunny
@lguohan @prsunny @reshmaintel @bocon13 for a repo name libgenl ? |
The `sniffer` application provides the means of a `tcpdump`-like tool to listen to the genetlink device. The sniffer can be used for listening to traffic, as well as recording the traffic into a file or displaying to standard out. The resulting pcapng file can then be viewed using Wireshark. The `sender` application can be used to send an example packet or packets from a pcap/pcapng file through genetlink. The sender also registers a new genetlink family and group called genl_packet and packets respectively. | ||
|
||
The `sender` application is currently used for testing purposes. It can create a packet, add the appropriate metadata and then send it to the generic netlink device where the `listening` application can pick it up and act on it. It is also useful for recreating error conditions where generic netlink functionality is part of the causality chain. | ||
New applications that are designed to send to the generic netlink devices directly instead of using a kernel module can use this code as a template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth explicitly mentioning that packets sent by the "sender" are not transmitted from a data plane port.
Sender might also just be a bad name. I tend to agree with Prince that it makes users think they are sending packets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed the name to generator and added an explicit note on what it doesn't do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lguohan Hi Guohan, want to address your question during SONiC community review. There will be no SAI changes needed for this Ge Netlink base feature. In the future if there is a new application that wants to use this library and has special SAI requirements, then such a SAI component can be added on as needed basis. For now, for this library, no SAI changes are needed. Thanks.
Is there any progress on getting the new repo created? |
While touching this, is it possible to update the link from the main pins HLD. Currently the packet-hld link there points to in_progress.md, when it should point to this doc.
|
Done |
@qiluo-msft @zhangyanzhao Adding Qi as suggested by Yanzhao today in SONiC Leads meeting. Qi, please help with creating new repo for this feature, then we can create fork, move the code in new repo and issue a Code PR. Thanks. |
EasyCLA |
@donNewtonAlpha can you please add the code PRs into this HLD by following #806 ? Thanks. |
@donNewtonAlpha can you please add the code PRs into this HLD PR? Thanks. |
@donNewtonAlpha what is the code PRs? Can you please add them by referencing to #806 ? Thanks. |
@donNewtonAlpha kindly ping? |
Can reviewer complete the review and approve this PR? Thanks. |
@donNewtonAlpha can you please add the code PRs into this HLD? So that we can track the feature readiness. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add the code PRs to this HLD. Thanks.
Sign_of_by: don.newton@intel.com