Cloud Native Data Plane (CNDP) is a collection of user space libraries to accelerate packet processing for cloud applications using AF_XDP sockets as the primary I/O..
BSD 3-Clause "New" or "Revised" License
90
stars
32
forks
source link
`chnl_connect` should accept operations from Channel 0 #370
The current implementation of chnl_connect rejects operations from channel 0 and returns EFAULT.
I did not understand the reason for this. Assume the CNDP application is a usual TCP client, then the first channel
created to initialize a connection could be channel 0 which is rejected.
Is this a typo (the developer wanted to check the channel data structure ch for NULL values instead of channel descriptor cd)? If so, this PR fixes the typo and does necessary refactoring.
The current implementation of
chnl_connect
rejects operations from channel 0 and returnsEFAULT
. I did not understand the reason for this. Assume the CNDP application is a usual TCP client, then the first channel created to initialize a connection could be channel 0 which is rejected.https://github.com/CloudNativeDataPlane/cndp/blob/9413087ac193cabdbd3db2f6df64986232acb4df/lib/cnet/chnl/cnet_chnl.c#L486
Is this a typo (the developer wanted to check the channel data structure
ch
for NULL values instead of channel descriptorcd
)? If so, this PR fixes the typo and does necessary refactoring.