Skip to content

Commit e17ff05

Browse files
anjalisinghai1Jeff Kirsher
authored andcommitted
i40e: Add debugfs hooks to print current total FD filter count
"fd current cnt" can be used to print the total filters consumed by this interface, this includes guaranteed and best effort filters. Change-ID: I2c417810c4999ce1388d2ea26f8e69679ba33966 Signed-off-by: Anjali Singhai Jain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 1295738 commit e17ff05

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/intel/i40e/i40e_debugfs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,6 +1743,9 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
17431743
i40e_dbg_cmd_fd_ctrl(pf, I40E_FLAG_FD_ATR_ENABLED, false);
17441744
} else if (strncmp(cmd_buf, "fd-atr on", 9) == 0) {
17451745
i40e_dbg_cmd_fd_ctrl(pf, I40E_FLAG_FD_ATR_ENABLED, true);
1746+
} else if (strncmp(cmd_buf, "fd current cnt", 14) == 0) {
1747+
dev_info(&pf->pdev->dev, "FD current total filter count for this interface: %d\n",
1748+
i40e_get_current_fd_count(pf));
17461749
} else if (strncmp(cmd_buf, "lldp", 4) == 0) {
17471750
if (strncmp(&cmd_buf[5], "stop", 4) == 0) {
17481751
int ret;
@@ -1962,6 +1965,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
19621965
dev_info(&pf->pdev->dev, " rem fd_filter <dest q_index> <flex_off> <pctype> <dest_vsi> <dest_ctl> <fd_status> <cnt_index> <fd_id> <packet_len> <packet>\n");
19631966
dev_info(&pf->pdev->dev, " fd-atr off\n");
19641967
dev_info(&pf->pdev->dev, " fd-atr on\n");
1968+
dev_info(&pf->pdev->dev, " fd current cnt");
19651969
dev_info(&pf->pdev->dev, " lldp start\n");
19661970
dev_info(&pf->pdev->dev, " lldp stop\n");
19671971
dev_info(&pf->pdev->dev, " lldp get local\n");

0 commit comments

Comments
 (0)