Skip to content

Commit 70dc7ab

Browse files
jacob-kelleranguy11
authored andcommitted
iavf: remove "inline" functions from iavf_txrx.c
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". ./scripts/bloat-o-meter is showing zero difference with this changes. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 5337d29 commit 70dc7ab

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

drivers/net/ethernet/intel/iavf/iavf_txrx.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include "iavf_trace.h"
88
#include "iavf_prototype.h"
99

10-
static inline __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
11-
u32 td_tag)
10+
static __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
11+
u32 td_tag)
1212
{
1313
return cpu_to_le64(IAVF_TX_DESC_DTYPE_DATA |
1414
((u64)td_cmd << IAVF_TXD_QW1_CMD_SHIFT) |
@@ -370,8 +370,8 @@ static void iavf_enable_wb_on_itr(struct iavf_vsi *vsi,
370370
q_vector->arm_wb_state = true;
371371
}
372372

373-
static inline bool iavf_container_is_rx(struct iavf_q_vector *q_vector,
374-
struct iavf_ring_container *rc)
373+
static bool iavf_container_is_rx(struct iavf_q_vector *q_vector,
374+
struct iavf_ring_container *rc)
375375
{
376376
return &q_vector->rx == rc;
377377
}
@@ -806,7 +806,7 @@ int iavf_setup_rx_descriptors(struct iavf_ring *rx_ring)
806806
* @rx_ring: ring to bump
807807
* @val: new head index
808808
**/
809-
static inline void iavf_release_rx_desc(struct iavf_ring *rx_ring, u32 val)
809+
static void iavf_release_rx_desc(struct iavf_ring *rx_ring, u32 val)
810810
{
811811
rx_ring->next_to_use = val;
812812

@@ -828,7 +828,7 @@ static inline void iavf_release_rx_desc(struct iavf_ring *rx_ring, u32 val)
828828
*
829829
* Returns the offset value for ring into the data buffer.
830830
*/
831-
static inline unsigned int iavf_rx_offset(struct iavf_ring *rx_ring)
831+
static unsigned int iavf_rx_offset(struct iavf_ring *rx_ring)
832832
{
833833
return ring_uses_build_skb(rx_ring) ? IAVF_SKB_PAD : 0;
834834
}
@@ -977,9 +977,9 @@ bool iavf_alloc_rx_buffers(struct iavf_ring *rx_ring, u16 cleaned_count)
977977
* @skb: skb currently being received and modified
978978
* @rx_desc: the receive descriptor
979979
**/
980-
static inline void iavf_rx_checksum(struct iavf_vsi *vsi,
981-
struct sk_buff *skb,
982-
union iavf_rx_desc *rx_desc)
980+
static void iavf_rx_checksum(struct iavf_vsi *vsi,
981+
struct sk_buff *skb,
982+
union iavf_rx_desc *rx_desc)
983983
{
984984
struct iavf_rx_ptype_decoded decoded;
985985
u32 rx_error, rx_status;
@@ -1061,7 +1061,7 @@ static inline void iavf_rx_checksum(struct iavf_vsi *vsi,
10611061
*
10621062
* Returns a hash type to be used by skb_set_hash
10631063
**/
1064-
static inline int iavf_ptype_to_htype(u8 ptype)
1064+
static int iavf_ptype_to_htype(u8 ptype)
10651065
{
10661066
struct iavf_rx_ptype_decoded decoded = decode_rx_desc_ptype(ptype);
10671067

@@ -1085,10 +1085,10 @@ static inline int iavf_ptype_to_htype(u8 ptype)
10851085
* @skb: skb currently being received and modified
10861086
* @rx_ptype: Rx packet type
10871087
**/
1088-
static inline void iavf_rx_hash(struct iavf_ring *ring,
1089-
union iavf_rx_desc *rx_desc,
1090-
struct sk_buff *skb,
1091-
u8 rx_ptype)
1088+
static void iavf_rx_hash(struct iavf_ring *ring,
1089+
union iavf_rx_desc *rx_desc,
1090+
struct sk_buff *skb,
1091+
u8 rx_ptype)
10921092
{
10931093
u32 hash;
10941094
const __le64 rss_mask =
@@ -1115,10 +1115,10 @@ static inline void iavf_rx_hash(struct iavf_ring *ring,
11151115
* order to populate the hash, checksum, VLAN, protocol, and
11161116
* other fields within the skb.
11171117
**/
1118-
static inline
1119-
void iavf_process_skb_fields(struct iavf_ring *rx_ring,
1120-
union iavf_rx_desc *rx_desc, struct sk_buff *skb,
1121-
u8 rx_ptype)
1118+
static void
1119+
iavf_process_skb_fields(struct iavf_ring *rx_ring,
1120+
union iavf_rx_desc *rx_desc, struct sk_buff *skb,
1121+
u8 rx_ptype)
11221122
{
11231123
iavf_rx_hash(rx_ring, rx_desc, skb, rx_ptype);
11241124

@@ -1662,8 +1662,8 @@ static inline u32 iavf_buildreg_itr(const int type, u16 itr)
16621662
* @q_vector: q_vector for which itr is being updated and interrupt enabled
16631663
*
16641664
**/
1665-
static inline void iavf_update_enable_itr(struct iavf_vsi *vsi,
1666-
struct iavf_q_vector *q_vector)
1665+
static void iavf_update_enable_itr(struct iavf_vsi *vsi,
1666+
struct iavf_q_vector *q_vector)
16671667
{
16681668
struct iavf_hw *hw = &vsi->back->hw;
16691669
u32 intval;
@@ -2275,9 +2275,9 @@ int __iavf_maybe_stop_tx(struct iavf_ring *tx_ring, int size)
22752275
* @td_cmd: the command field in the descriptor
22762276
* @td_offset: offset for checksum or crc
22772277
**/
2278-
static inline void iavf_tx_map(struct iavf_ring *tx_ring, struct sk_buff *skb,
2279-
struct iavf_tx_buffer *first, u32 tx_flags,
2280-
const u8 hdr_len, u32 td_cmd, u32 td_offset)
2278+
static void iavf_tx_map(struct iavf_ring *tx_ring, struct sk_buff *skb,
2279+
struct iavf_tx_buffer *first, u32 tx_flags,
2280+
const u8 hdr_len, u32 td_cmd, u32 td_offset)
22812281
{
22822282
unsigned int data_len = skb->data_len;
22832283
unsigned int size = skb_headlen(skb);

0 commit comments

Comments
 (0)