Skip to content

nvme-print: fix traddr transformation for ave discovery log#3264

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
igaw:fix-ave-traddr
Apr 22, 2026
Merged

nvme-print: fix traddr transformation for ave discovery log#3264
igaw merged 1 commit intolinux-nvme:masterfrom
igaw:fix-ave-traddr

Conversation

@igaw
Copy link
Copy Markdown
Collaborator

@igaw igaw commented Apr 10, 2026

inet_ntop wants the network address structure as input not converted string.

Fixes: 1571543 ("nvme: add ave-discovery-log command")

@ikegami-t did you tests the original implementation? If so, can you try this one too?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes transport-address (traddr) rendering for AVE discovery log output by passing the actual binary address bytes to inet_ntop() rather than an address-family string.

Changes:

  • Correct inet_ntop() source argument in stdout AVE discovery log printing.
  • Correct inet_ntop() source argument in JSON AVE discovery log printing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
nvme-print-stdout.c Fixes AVE avetraddr formatting by feeding inet_ntop() the binary traddr field.
nvme-print-json.c Fixes AVE avetraddr JSON formatting by feeding inet_ntop() the binary traddr field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nvme-print-stdout.c Outdated
Comment thread nvme-print-json.c Outdated
@ikegami-t
Copy link
Copy Markdown
Contributor

Thanks for your fix. Just tested the changes with the dummy data as works correctly and the changes look good. Sorry for the error and previously I could not test the original changes correctly.

@igaw
Copy link
Copy Markdown
Collaborator Author

igaw commented Apr 10, 2026

Thanks! The copilot review has brought up some good points. I'll add them next week. running out of steam for today.

@igaw igaw requested a review from Copilot April 22, 2026 12:01
inet_ntop wants the network address structure as input not converted
string.

Fixes: 1571543 ("nvme: add ave-discovery-log command")
Signed-off-by: Daniel Wagner <[email protected]>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nvme-print-stdout.c
Comment on lines +6646 to +6647
socklen_t size;
int af;
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

socklen_t size is missing a trailing semicolon, which will break compilation. Add ; after the declaration.

Copilot uses AI. Check for mistakes.
@igaw igaw merged commit d801e1e into linux-nvme:master Apr 22, 2026
27 of 28 checks passed
@igaw igaw deleted the fix-ave-traddr branch April 22, 2026 12:06
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.

3 participants