Commit 35145dab authored by Ganji Aravind's avatar Ganji Aravind Committed by Greg Kroah-Hartman

cxgb4: Fix offset when clearing filter byte counters

[ Upstream commit 94cc242a ]

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: 12b276fb ("cxgb4: add support to create hash filters")
Signed-off-by: default avatarGanji Aravind <ganji.aravind@chelsio.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec56646e
...@@ -1591,13 +1591,16 @@ int cxgb4_del_filter(struct net_device *dev, int filter_id, ...@@ -1591,13 +1591,16 @@ int cxgb4_del_filter(struct net_device *dev, int filter_id,
static int configure_filter_tcb(struct adapter *adap, unsigned int tid, static int configure_filter_tcb(struct adapter *adap, unsigned int tid,
struct filter_entry *f) struct filter_entry *f)
{ {
if (f->fs.hitcnts) if (f->fs.hitcnts) {
set_tcb_field(adap, f, tid, TCB_TIMESTAMP_W, set_tcb_field(adap, f, tid, TCB_TIMESTAMP_W,
TCB_TIMESTAMP_V(TCB_TIMESTAMP_M) | TCB_TIMESTAMP_V(TCB_TIMESTAMP_M),
TCB_TIMESTAMP_V(0ULL),
1);
set_tcb_field(adap, f, tid, TCB_RTT_TS_RECENT_AGE_W,
TCB_RTT_TS_RECENT_AGE_V(TCB_RTT_TS_RECENT_AGE_M), TCB_RTT_TS_RECENT_AGE_V(TCB_RTT_TS_RECENT_AGE_M),
TCB_TIMESTAMP_V(0ULL) |
TCB_RTT_TS_RECENT_AGE_V(0ULL), TCB_RTT_TS_RECENT_AGE_V(0ULL),
1); 1);
}
if (f->fs.newdmac) if (f->fs.newdmac)
set_tcb_tflag(adap, f, tid, TF_CCTRL_ECE_S, 1, set_tcb_tflag(adap, f, tid, TF_CCTRL_ECE_S, 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment