From: Michal Krawczyk Date: Thu, 17 Sep 2020 05:30:28 +0000 (+0200) Subject: net/ena/base: add missing unlikely X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=41083bd532ef13f6a0b0d26b0b28de68789a2d7f;p=dpdk.git net/ena/base: add missing unlikely To align the error checking code with other parts of the ena_com, the conditional check is being tested for the error was wrapped inside unlikely(). Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzalik Reviewed-by: Stephen Hemminger --- diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index f2668f79c7..3686ae05c4 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -2973,7 +2973,7 @@ int ena_com_config_dev_mode(struct ena_com_dev *ena_dev, ena_dev->tx_max_header_size = llq_info->desc_list_entry_size - (llq_info->descs_num_before_header * sizeof(struct ena_eth_io_tx_desc)); - if (ena_dev->tx_max_header_size == 0) { + if (unlikely(ena_dev->tx_max_header_size == 0)) { ena_trc_err("the size of the LLQ entry is smaller than needed\n"); return -EINVAL; }