net/ena/base: deduplicate meta caching config flag
PATCH 8/13 net/ena/base: deduplicate meta caching config flag
struct ena_com_io_sq stores disable_meta_caching twice: once as a flat field, initialised from io_sq->llq_info.disable_meta_caching, and once inside the embedded llq_info structure. Both are assigned during queue configuration and never diverge afterwards, making the flat field redundant.
Remove the flat io_sq->disable_meta_caching field along with its initialisation, and read the value from llq_info directly on the metadata path.
No functional change.
Signed-off-by Shai Brandes <[email protected]>
--- drivers/net/ena/base/ena_com.c | 2 -- drivers/net/ena/base/ena_com.h | 1 - drivers/net/ena/base/ena_eth_com.c | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-)
drivers/net/ena/base/ena_com.c +0 -2
@@ -397,8 +397,6 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_dev, 0x0, io_sq->llq_info.desc_list_entry_size); io_sq->llq_buf_ctrl.descs_left_in_line = io_sq->llq_info.descs_num_before_header; - io_sq->disable_meta_caching = - io_sq->llq_info.disable_meta_caching;if (io_sq->llq_info.max_entries_in_tx_burst >0 ) io_sq->entries_in_tx_burst_left =
drivers/net/ena/base/ena_com.h +0 -1
@@ -153,7 +153,6 @@ struct ena_com_io_sq {enum queue_direction direction;enum ena_admin_placement_policy_type mem_queue_type; -bool disable_meta_caching;u32 msix_vector;struct ena_com_tx_meta cached_tx_meta;
drivers/net/ena/base/ena_eth_com.c +1 -1
@@ -439,7 +439,7 @@ static int ena_com_create_and_store_tx_meta_desc(struct ena_com_io_sq *io_sq,/* When disable meta caching is set, don't bother to save the meta and * compare it to the stored version, just create the meta */ -if (io_sq->disable_meta_caching) { +if (io_sq->llq_info.disable_meta_caching) { *have_meta = true;return ena_com_create_meta (io_sq, ena_meta); }
Signature · 1 line
2.17.1