Subject: Re: [PATCH net-next 5/6] net: hns3: debugfs support for dumping fd rules

From: Jakub Kicinski <[email-masked]>
Date: Tue, 19 May 2026 18:49:11 -0700

On Mon, 18 May 2026 17:35:25 +0800 Jijie Shao wrote:
> Currently, the tc tool only supports adding and deleting rules from
> the driver but does not support querying rules from the driver.
> 
> This patch adds a rule dump file in debugfs to check whether the driver's
> configuration matches the configuration issued by tc flow.

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:2155:25: warning: diagnostic behavior may be improved by adding the 'format(printf, 5, 7)' attribute to the declaration of 'hclge_fd_dump_ptr' [-Wmissing-format-attribute]
 2141 | static void hclge_fd_dump_ptr(struct seq_file *s,
      | __attribute__((format(printf, 5, 7))) 
 2142 |                               struct hclge_fd_rule *rule,
 2143 |                               u32 type, const char *name,
 2144 |                               const char *fmt,
 2145 |                               const void *key, const void *mask)
 2146 | {
 2147 |         if (rule->unused_tuple & BIT(type))
 2148 |                 return;
 2149 | 
 2150 |         seq_printf(s, "\t\t%s: ", name);
 2151 |         seq_printf(s, fmt, key);
 2152 |         seq_putc(s, '\n');
 2153 | 
 2154 |         seq_printf(s, "\t\t%s_mask: ", name);
 2155 |         seq_printf(s, fmt, mask);
      |                                ^