Skip to content

Commit 94cc242

Browse files
Ganji Aravindkuba-moo
authored andcommitted
cxgb4: Fix offset when clearing filter byte counters
Pass the correct offset to clear the stale filter hit bytes counter. Otherwise, the counter starts incrementing from the stale information, instead of 0. Fixes: 12b276f ("cxgb4: add support to create hash filters") Signed-off-by: Ganji Aravind <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 02146a9 commit 94cc242

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,13 +1911,16 @@ int cxgb4_del_filter(struct net_device *dev, int filter_id,
19111911
static int configure_filter_tcb(struct adapter *adap, unsigned int tid,
19121912
struct filter_entry *f)
19131913
{
1914-
if (f->fs.hitcnts)
1914+
if (f->fs.hitcnts) {
19151915
set_tcb_field(adap, f, tid, TCB_TIMESTAMP_W,
1916-
TCB_TIMESTAMP_V(TCB_TIMESTAMP_M) |
1916+
TCB_TIMESTAMP_V(TCB_TIMESTAMP_M),
1917+
TCB_TIMESTAMP_V(0ULL),
1918+
1);
1919+
set_tcb_field(adap, f, tid, TCB_RTT_TS_RECENT_AGE_W,
19171920
TCB_RTT_TS_RECENT_AGE_V(TCB_RTT_TS_RECENT_AGE_M),
1918-
TCB_TIMESTAMP_V(0ULL) |
19191921
TCB_RTT_TS_RECENT_AGE_V(0ULL),
19201922
1);
1923+
}
19211924

19221925
if (f->fs.newdmac)
19231926
set_tcb_tflag(adap, f, tid, TF_CCTRL_ECE_S, 1,

0 commit comments

Comments
 (0)