Skip to content
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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

donNewtonAlpha
Copy link

  • include information on Generic Netlink userspace library
  • include information on Generic Netlink sniffer application

Sign_of_by: don.newton@intel.com

* include information on Generic Netlink userspace library
* include information on Generic Netlink sniffer application

Sign_of_by: don.newton@intel.com
@yxieca yxieca force-pushed the master branch 2 times, most recently from 8498931 to 8837dc2 Compare April 15, 2022 16:51
@donNewtonIntel
Copy link

@prsunny Can you take a look at this?

@reshmaintel
Copy link

@zhangyanzhao Hi Yanzhao, Requesting reviewers to be added for this feature from Microsoft. Thanks.

- 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.
Copy link
Contributor

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?

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

@donNewtonIntel
Copy link

@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.
Copy link
Contributor

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.

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.

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.

@donNewtonIntel
Copy link

@lguohan @prsunny @reshmaintel @bocon13 for a repo name libgenl ?

Is there any progress on getting the new repo created?

reshmaintel
reshmaintel previously approved these changes Jul 26, 2022
@j-bos
Copy link

j-bos commented Aug 4, 2022

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.

<!-------- LINK REFERENCES -------->

<!-- Supplementary HLD Links -->
<!-- FIXME(bocon): update links when ready -->
[p4rt-hld]: p4rt_app_hld.md
[saip4-hld]: in_progress.md
[p4ext-hld]: in_progress.md
[p4rt-db-hld]: in_progress.md
[p4orch-hld]: p4orch_hld.md
[appl-state-hld]: in_progress.md
[packet-hld]: in_progress.md

@donNewtonIntel
Copy link

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.

<!-------- LINK REFERENCES -------->

<!-- Supplementary HLD Links -->
<!-- FIXME(bocon): update links when ready -->
[p4rt-hld]: p4rt_app_hld.md
[saip4-hld]: in_progress.md
[p4ext-hld]: in_progress.md
[p4rt-db-hld]: in_progress.md
[p4orch-hld]: p4orch_hld.md
[appl-state-hld]: in_progress.md
[packet-hld]: in_progress.md

Done

@reshmaintel
Copy link

@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.

@donNewtonAlpha
Copy link
Author

EasyCLA

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 9, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@zhangyanzhao
Copy link
Collaborator

@donNewtonAlpha can you please add the code PRs into this HLD by following #806 ? Thanks.

@zhangyanzhao
Copy link
Collaborator

@donNewtonAlpha can you please add the code PRs into this HLD PR? Thanks.

@zhangyanzhao
Copy link
Collaborator

@donNewtonAlpha what is the code PRs? Can you please add them by referencing to #806 ? Thanks.

@zhangyanzhao
Copy link
Collaborator

@donNewtonAlpha what is the code PRs? Can you please add them by referencing to #806 ? Thanks.

@donNewtonAlpha kindly ping?

@zhangyanzhao
Copy link
Collaborator

Can reviewer complete the review and approve this PR? Thanks.

@zhangyanzhao
Copy link
Collaborator

@donNewtonAlpha can you please add the code PRs into this HLD? So that we can track the feature readiness. Thanks.

Copy link
Collaborator

@zhangyanzhao zhangyanzhao left a 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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants