Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cxgb4: make the array match_all_mac static, makes object smaller

Don't populate the array match_all_mac on the stack but instead it
static const. Makes the object code smaller by 75 bytes.

Before:
text data bss dec hex filename
46701 8960 64 55725 d9ad ../chelsio/cxgb4/cxgb4_filter.o

After:
text data bss dec hex filename
46338 9120 192 55650 d962 ../chelsio/cxgb4/cxgb4_filter.o

(gcc version 10.2.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210801151205.145924-1-colin.king@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Colin Ian King and committed by
Jakub Kicinski
e688bdb7 28814cd1

+2 -2
+2 -2
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
··· 1441 1441 } else if (iconf & USE_ENC_IDX_F) { 1442 1442 if (f->fs.val.encap_vld) { 1443 1443 struct port_info *pi = netdev_priv(f->dev); 1444 - u8 match_all_mac[] = { 0, 0, 0, 0, 0, 0 }; 1444 + static const u8 match_all_mac[] = { 0, 0, 0, 0, 0, 0 }; 1445 1445 1446 1446 /* allocate MPS TCAM entry */ 1447 1447 ret = t4_alloc_encap_mac_filt(adapter, pi->viid, ··· 1688 1688 } else if (iconf & USE_ENC_IDX_F) { 1689 1689 if (f->fs.val.encap_vld) { 1690 1690 struct port_info *pi = netdev_priv(f->dev); 1691 - u8 match_all_mac[] = { 0, 0, 0, 0, 0, 0 }; 1691 + static const u8 match_all_mac[] = { 0, 0, 0, 0, 0, 0 }; 1692 1692 1693 1693 /* allocate MPS TCAM entry */ 1694 1694 ret = t4_alloc_encap_mac_filt(adapter, pi->viid,