From: "Morten Brørup" <mb@smartsharesystems.com>
To: <dev@dpdk.org>
Subject: Risk of rte_ether_addr_copy() causing bugs
Date: Mon, 4 Nov 2024 13:11:02 +0100 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F86F@smartserver.smartshare.dk> (raw)
Unlike memcpy() and other copy functions, rte_ether_addr_copy() takes the destination as the second parameter.
Not following well established conventions adds a high risk of causing bugs in the applications/libraries/drivers; it is likely that developers expect copy() functions to take parameters in the usual memcpy() order, and pass the parameters to rte_ether_addr_copy() in that order instead of the reverse order expected by rte_ether_addr_copy().
How can we fix this?
One way would be to introduce a new copy function and mark the old function deprecated (due to risk of bugs).
Does the community support such a change?
And what would be a good name for the new function?
Any other ideas for fixing it?
Med venlig hilsen / Kind regards,
-Morten Brørup
next reply other threads:[~2024-11-04 12:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 12:11 Morten Brørup [this message]
2024-11-04 16:15 ` Stephen Hemminger
2024-11-04 16:19 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98CBD80474FA8B44BF855DF32C47DC35E9F86F@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).