[Patch, v2, 0/2] BCC: python: support fmod_ret

Gang Yan posted 2 patches 8 months, 1 week ago
Failed in applying to current master (apply log)
src/python/bcc/__init__.py | 34 ++++++++++++++++
tools/mptcpify.py          | 80 ++++++++++++++++++++++++++++++++++++++
tools/mptcpify.txt         | 22 +++++++++++
3 files changed, 136 insertions(+)
create mode 100644 tools/mptcpify.py
create mode 100644 tools/mptcpify.txt
[Patch, v2, 0/2] BCC: python: support fmod_ret
Posted by Gang Yan 8 months, 1 week ago
Support fmod_ret, and add a useful tool for mptcp, also
the interface can be verified with this function.

------
Changelog:
  v2:
    - change the name of the tool to 'mptcpify'
    - fix the code style problems in mptcpify.py
    - modify 'support_fmod_ret' in __init__.py, add some comment and
      ask for suggestions to BCC devs.

Hi Matt:

So nice to recieve your reply. Do you think we can create a PR with v2
patch to BCC now? The description of PR is attached below, Can you help
me to take a look?

'''
Multipath TCP (MPTCP) serves as an enhancement to the conventional TCP
protocol, enabling a single transport-layer connection to leverage
multiple network interfaces. This capability makes MPTCP advantageous
for applications requiring bandwidth consolidation, seamless failover
mechanisms, and more robust connectivity solutions.

Linux kernel starts to support MPTCP since v5.6, and it provides a
fmod_ret interface 'update_socket_protocol' to force applications using
MPTCP instead of TCP without modifyiing its code.

So these patches provide a tool named 'mptcpify' which can achieve this.
Using python-BCC is a more easy way for future development, so it is so
important to support 'fmod_ret' in python-BCC.

@matttbe from the MPTCP kernel team had a look at the new tool.
'''

Gang Yan (2):
  BCC: Python: Support 'fmod_ret' method for eBPF
  BCC: python: add a useful tool for mptcp

 src/python/bcc/__init__.py | 34 ++++++++++++++++
 tools/mptcpify.py          | 80 ++++++++++++++++++++++++++++++++++++++
 tools/mptcpify.txt         | 22 +++++++++++
 3 files changed, 136 insertions(+)
 create mode 100644 tools/mptcpify.py
 create mode 100644 tools/mptcpify.txt

-- 
2.25.1
Re: [Patch, v2, 0/2] BCC: python: support fmod_ret
Posted by Matthieu Baerts 8 months, 1 week ago
Hi Gang,

On 09/04/2025 09:17, Gang Yan wrote:
> Support fmod_ret, and add a useful tool for mptcp, also
> the interface can be verified with this function.
> 
> ------
> Changelog:
>   v2:
>     - change the name of the tool to 'mptcpify'
>     - fix the code style problems in mptcpify.py
>     - modify 'support_fmod_ret' in __init__.py, add some comment and
>       ask for suggestions to BCC devs.
> 
> Hi Matt:
> 
> So nice to recieve your reply. Do you think we can create a PR with v2
> patch to BCC now? The description of PR is attached below, Can you help
> me to take a look?

Thank you for the v2. I have just some small comments, but it is not
blocking, the rest looks good to me.

Then yes, please create the PR, no need to send a v3.

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.