Skip to content

The bugs in zero-copy related APIΒ #712

Open
@renzibei

Description

@renzibei

First, I'm talking about the FSTACK_ZC_SEND related API here (although FF_USE_PAGE_ARRAY related api cannot work for my NIC neither).

I found that the f-stack will crash or hang when one try to send mbufs filled with a lot of data. After some research, I think the origin is a designing problem. When we want to use zero copy API, we often want to solve the copying problem when the data is quite large. However, f-stack uses the pattern of non-blocking socket, which means that with every ff_write we can only write a limited number of data. When this limited size is smaller than the total size of mbuf, this sending will not be able to send the whole mbuf. We can neither start from the unsent data position in the next sending because this position may be in the middle of a mbuf, and freebsd doesn't handle this case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions