Skip to content

Commit c219399

Browse files
Shahjada Abul Husaindavem330
authored andcommitted
cxgb4: add support for high priority filters
T6 has a separate region known as high priority filter region that allows classifying packets going through ULD path. So, query firmware for HPFILTER resources and enable the high priority offload filter support when it is available. Signed-off-by: Shahjada Abul Husain <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6525b5e commit c219399

File tree

9 files changed

+234
-86
lines changed

9 files changed

+234
-86
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
#include <asm/io.h>
5757
#include "t4_chip_type.h"
5858
#include "cxgb4_uld.h"
59+
#include "t4fw_api.h"
5960

6061
#define CH_WARN(adap, fmt, ...) dev_warn(adap->pdev_dev, fmt, ## __VA_ARGS__)
6162
extern struct list_head adapter_list;
@@ -68,6 +69,16 @@ extern struct mutex uld_mutex;
6869
#define ETHTXQ_STOP_THRES \
6970
(1 + DIV_ROUND_UP((3 * MAX_SKB_FRAGS) / 2 + (MAX_SKB_FRAGS & 1), 8))
7071

72+
#define FW_PARAM_DEV(param) \
73+
(FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) | \
74+
FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_DEV_##param))
75+
76+
#define FW_PARAM_PFVF(param) \
77+
(FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_PFVF) | \
78+
FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_PFVF_##param) | \
79+
FW_PARAMS_PARAM_Y_V(0) | \
80+
FW_PARAMS_PARAM_Z_V(0))
81+
7182
enum {
7283
MAX_NPORTS = 4, /* max # of ports */
7384
SERNUM_LEN = 24, /* Serial # length */

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,6 +3240,9 @@ static int tid_info_show(struct seq_file *seq, void *v)
32403240
seq_printf(seq, "SFTID range: %u..%u in use: %u\n",
32413241
t->sftid_base, t->sftid_base + t->nsftids - 2,
32423242
t->sftids_in_use);
3243+
if (t->nhpftids)
3244+
seq_printf(seq, "HPFTID range: %u..%u\n", t->hpftid_base,
3245+
t->hpftid_base + t->nhpftids - 1);
32433246
if (t->ntids)
32443247
seq_printf(seq, "HW TID usage: %u IP users, %u IPv6 users\n",
32453248
t4_read_reg(adap, LE_DB_ACT_CNT_IPV4_A),

0 commit comments

Comments
 (0)