On 4/19/2024 6:23 AM, Chaoyong He wrote: > Refactor data structure and related logic to make the secondary process > can work as expect. >
Hi Chaoyong, Patchset looks good, but I have a question related to the motivation of moving so many structs to process private data? Normally ethdev is process private, and ethdev->data is shared. Primary configures the device and secondary learns shared data and uses it for datapath. There are cases, like file descriptors for same file can be different for different process and process private structure is used. In below patches, device private data level structs seems moved to the process private structure, is the intention both primary process and secondary process do the control path and configuration? If so, just a reminder that this is not intended usage of the multi-process support and many control APIs are not designed as thread-safe. Would you mind describing a little more about your use case that requires below process private data changes? > --- > v2: > * Solve the build problem. > --- > > Chaoyong He (8): > net/nfp: fix resource leak of secondary process > net/nfp: fix configuration BAR problem > net/nfp: adjust the data field of Rx/Tx queue > net/nfp: add the process private structure > net/nfp: move device info data field > net/nfp: unify CPP acquire method > net/nfp: remove ethernet device data field > net/nfp: unify port create and destroy interface > > drivers/net/nfp/flower/nfp_flower.c | 127 ++++---- > drivers/net/nfp/flower/nfp_flower.h | 11 +- > drivers/net/nfp/flower/nfp_flower_cmsg.c | 5 +- > drivers/net/nfp/flower/nfp_flower_cmsg.h | 3 +- > drivers/net/nfp/flower/nfp_flower_ctrl.c | 8 +- > drivers/net/nfp/flower/nfp_flower_flow.c | 16 +- > .../net/nfp/flower/nfp_flower_representor.c | 151 ++++++---- > .../net/nfp/flower/nfp_flower_representor.h | 4 +- > drivers/net/nfp/flower/nfp_flower_service.c | 32 +- > drivers/net/nfp/flower/nfp_flower_service.h | 10 +- > drivers/net/nfp/nfd3/nfp_nfd3_dp.c | 5 +- > drivers/net/nfp/nfdk/nfp_nfdk_dp.c | 5 +- > drivers/net/nfp/nfp_ethdev.c | 274 ++++++++++-------- > drivers/net/nfp/nfp_ethdev_vf.c | 18 +- > drivers/net/nfp/nfp_net_common.c | 116 ++++---- > drivers/net/nfp/nfp_net_common.h | 30 +- > drivers/net/nfp/nfp_net_flow.c | 20 +- > drivers/net/nfp/nfp_rxtx.c | 9 +- > drivers/net/nfp/nfp_rxtx.h | 69 ++--- > drivers/net/nfp/nfpcore/nfp6000_pcie.c | 34 +-- > 20 files changed, 524 insertions(+), 423 deletions(-) >