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

Update io_uring-udp.c #815

Closed
wants to merge 2 commits into from
Closed

Update io_uring-udp.c #815

wants to merge 2 commits into from

Conversation

mczka
Copy link

@mczka mczka commented Mar 7, 2023

bug #814
#814


git request-pull output:

<!-- START REPLACE ME -->

Generate your PR shortlog and diffstat with these commands:
   git remote add axboe-tree https://github.com/axboe/liburing
   git fetch axboe-tree
   git request-pull axboe-tree/master your_fork_URL your_branch_name

Then replace this with the output of `git request-pull` command.

<!-- END REPLACE ME -->

Click to show/hide pull request guidelines

Pull Request Guidelines

  1. To make everyone easily filter pull request from the email
    notification, use [GIT PULL] as a prefix in your PR title.
[GIT PULL] Your Pull Request Title
  1. Follow the commit message format rules below.
  2. Follow the Linux kernel coding style (see: https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst).

Commit message format rules:

  1. The first line is title (don't be more than 72 chars if possible).
  2. Then an empty line.
  3. Then a description (may be omitted for truly trivial changes).
  4. Then an empty line again (if it has a description).
  5. Then a Signed-off-by tag with your real name and email. For example:
Signed-off-by: Foo Bar <foo.bar@gmail.com>

The description should be word-wrapped at 72 chars. Some things should
not be word-wrapped. They may be some kind of quoted text - long
compiler error messages, oops reports, Link, etc. (things that have a
certain specific format).

Note that all of this goes in the commit message, not in the pull
request text. The pull request text should introduce what this pull
request does, and each commit message should explain the rationale for
why that particular change was made. The git tree is canonical source
of truth, not github.

Each patch should do one thing, and one thing only. If you find yourself
writing an explanation for why a patch is fixing multiple issues, that's
a good indication that the change should be split into separate patches.

If the commit is a fix for an issue, add a Fixes tag with the issue
URL.

Don't use GitHub anonymous email like this as the commit author:

123456789+username@users.noreply.github.com

Use a real email address!

Commit message example:

src/queue: don't flush SQ ring for new wait interface

If we have IORING_FEAT_EXT_ARG, then timeouts are done through the
syscall instead of by posting an internal timeout. This was done
to be both more efficient, but also to enable multi-threaded use
the wait side. If we touch the SQ state by flushing it, that isn't
safe without synchronization.

Fixes: https://github.com/axboe/liburing/issues/402
Signed-off-by: Jens Axboe <axboe@kernel.dk>

By submitting this pull request, I acknowledge that:

  1. I have followed the above pull request guidelines.
  2. I have the rights to submit this work under the same license.
  3. I agree to a Developer Certificate of Origin (see https://developercertificate.org for more information).

@@ -275,7 +275,7 @@ static int process_cqe_recv(struct ctx *ctx, struct io_uring_cqe *cqe,
const char *name;
struct sockaddr_in *addr = io_uring_recvmsg_name(o);

name = inet_ntop(ctx->af, addr, buff, sizeof(buff));
name = inet_ntop(ctx->af, &(addr->sin_addr), buff, sizeof(buff));
Copy link
Owner

Choose a reason for hiding this comment

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

Just make this:

		name = inet_ntop(ctx->af, &addr->sin_addr, buff, sizeof(buff));

as there's no need for the parenthesis in there.

@axboe
Copy link
Owner

axboe commented Mar 7, 2023

Fix looks good (with cosmetic adjustment suggested), but your commit message should be better. First of all, the first line should be a title for the commit. "Update foo.c" doesn't mean anything, what is being changed here? And then the body should have an explanation of why the change is necessary. Finally, a Signed-off-by line is required with your identity (name) and email as well.

See the other commits in the repo for an example of what a commit message should look like. Here's one from Pavel:

https://git.kernel.dk/cgit/liburing/commit/?id=f1af5ff51a3320a8971c611368c693c1dec560c5

Copy link
Contributor

@ammarfaizi2 ammarfaizi2 left a comment

Choose a reason for hiding this comment

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

From: mczka <58855170+mczka@users.noreply.github.com>

Use a real name and a real email address. No anonymous contribution.

io_uring-udp shown a bad source address in verbose mode - option '-v'.
@ammarfaizi2
Copy link
Contributor

Don't add a new commit to fix your previous unmerged commit. Just fold
it in, then force-push. It's fine to force push to your branch.

Also, as previously has been told, use a Signed-off-by with a real name
and email.

@ammarfaizi2
Copy link
Contributor

I'll send a patch.

@axboe axboe closed this in 4f1b885 Mar 7, 2023
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.

None yet

3 participants