From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Ahmed Zaki <ahmed.zaki@intel.com>
Cc: intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next] iavf: remove "inline" functions from iavf_txrx.c
Date: Thu, 24 Aug 2023 16:49:40 +0200 [thread overview]
Message-ID: <bb334cef-1cd5-0aaf-6fe3-fd632b34d756@intel.com> (raw)
In-Reply-To: <20230824122337.3300895-1-ahmed.zaki@intel.com>
From: Ahmed Zaki <ahmed.zaki@intel.com>
Date: Thu, 24 Aug 2023 06:23:37 -0600
> From: Jacob Keller <jacob.e.keller@intel.com>
>
> The iAVF txrx hotpath code has several functions that are marked as
> "static inline" in the iavf_txrx.c file. This use of inline is frowned
> upon in the netdev community and explicitly marked as something to avoid
> in the Linux coding-style document (section 15).
>
> Even though these functions are only used once, it is expected that GCC
> is smart enough to decide when to perform function inlining where
> appropriate without the "hint".
The compilers sometimes do unexpected things. I wouldn't blindly hope.
This means, I'd like to have some objdiff or at least bloat-o-meter
output here to prove this commit doesn't hurt.
If there are changes in the object code -- then some perf tests as well.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
> ---
> drivers/net/ethernet/intel/iavf/iavf_txrx.c | 43 ++++++++++-----------
> 1 file changed, 20 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_txrx.c b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> index 8c5f6096b002..562dafb89f1d 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> @@ -7,8 +7,7 @@
> #include "iavf_trace.h"
> #include "iavf_prototype.h"
>
> -static inline __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
> - u32 td_tag)
> +static __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size, u32 td_tag)
> {
> return cpu_to_le64(IAVF_TX_DESC_DTYPE_DATA |
> ((u64)td_cmd << IAVF_TXD_QW1_CMD_SHIFT) |
> @@ -370,8 +369,7 @@ static void iavf_enable_wb_on_itr(struct iavf_vsi *vsi,
> q_vector->arm_wb_state = true;
> }
>
> -static inline bool iavf_container_is_rx(struct iavf_q_vector *q_vector,
> - struct iavf_ring_container *rc)
> +static bool iavf_container_is_rx(struct iavf_q_vector *q_vector, struct iavf_ring_container *rc)
Over 80 chars, as well as in a couple of other places below, please
recheck the patch (you're trying to fix checkpatch issues and at the
same time introducing new? :D).
> {
> return &q_vector->rx == rc;
> }
[...]
Thanks,
Olek
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-08-24 14:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 12:23 [Intel-wired-lan] [PATCH iwl-next] iavf: remove "inline" functions from iavf_txrx.c Ahmed Zaki
2023-08-24 14:49 ` Alexander Lobakin [this message]
2023-08-24 15:46 ` Ahmed Zaki
2023-08-24 20:01 ` Przemek Kitszel
2023-08-24 20:28 ` Ahmed Zaki
2023-08-24 20:08 ` Ahmed Zaki
2023-08-25 11:36 ` Alexander Lobakin
2023-08-25 15:31 ` Ahmed Zaki
2023-08-25 15:36 ` Alexander Lobakin
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=bb334cef-1cd5-0aaf-6fe3-fd632b34d756@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=ahmed.zaki@intel.com \
--cc=intel-wired-lan@lists.osuosl.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