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

fix pktdev_close to release internal lport data #153

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

KeithWiles
Copy link
Contributor

@KeithWiles KeithWiles commented Aug 13, 2022

When pktdev_close() was called the code would close the lport
but it needed to release the lport by calling pktdev_release_port().

Cleanup the a PMD probe and remove routines. In the probe routine we
now store the struct pktdev_driver pointer in the struct cne_pktdev structure
to allow for a cleaner remove or close of an lport. Remove pktdev_create_done()
routine and move the logic into the pktdev_port_setup() routine.

This would allow the Go code to be able to cleanup correctly and the PMDs
were checking if dev == NULL before calling pktdev_release_port() which is
not required.

Remove the PKTDEV_LOG() macro and use CNE_XXX macros instead.

Signed-off-by: Keith Wiles keith.wiles@intel.com

@KeithWiles KeithWiles force-pushed the port_close_fix branch 2 times, most recently from 5bd38c2 to c5e38d6 Compare August 15, 2022 14:34
lib/core/pktdev/pktdev_api.h Outdated Show resolved Hide resolved
lib/core/pmds/net/ring/pmd_ring.c Outdated Show resolved Hide resolved
When pktdev_close() was called the code would close the lport
but it needed to release the lport by calling pktdev_release_port().

Cleanup the a PMD probe and remove routines. In the probe routine we
now store the struct pktdev_driver pointer in the struct cne_pktdev structure
to allow for a cleaner remove or close of an lport. Remove pktdev_create_done()
routine and move the logic into the pktdev_port_setup() routine.

This would allow the Go code to be able to cleanup correctly and the PMDs
were checking if dev == NULL before calling pktdev_release_port() which is
not required.

Remove the PKTDEV_LOG() macro and use CNE_XXX macros instead.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
@jeffreybshaw jeffreybshaw merged commit 7356c90 into CloudNativeDataPlane:main Aug 15, 2022
@KeithWiles KeithWiles deleted the port_close_fix branch August 16, 2022 14:54
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.

2 participants