Skip to content

Commit

Permalink
cxgb4: Avoid removal of uninserted tid
Browse files Browse the repository at this point in the history
During ARP failure, tid is not inserted but _c4iw_free_ep()
attempts to remove tid which results in error.
This patch fixes the issue by avoiding removal of uninserted tid.

Fixes: 59437d7 ("cxgb4/chtls: fix ULD connection failures due to wrong TID base")
Signed-off-by: Anumula Murali Mohan Reddy <anumula@chelsio.com>
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
Link: https://patch.msgid.link/20250103092327.1011925-1-anumula@chelsio.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Anumula Murali Mohan Reddy authored and Jakub Kicinski committed Jan 7, 2025
1 parent 3085d4b commit 4c12245
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,10 @@ void cxgb4_remove_tid(struct tid_info *t, unsigned int chan, unsigned int tid,
struct adapter *adap = container_of(t, struct adapter, tids);
struct sk_buff *skb;

WARN_ON(tid_out_of_range(&adap->tids, tid));
if (tid_out_of_range(&adap->tids, tid)) {
dev_err(adap->pdev_dev, "tid %d out of range\n", tid);
return;
}

if (t->tid_tab[tid - adap->tids.tid_base]) {
t->tid_tab[tid - adap->tids.tid_base] = NULL;
Expand Down

0 comments on commit 4c12245

Please sign in to comment.