lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202202240458.daZyVdyc-lkp@intel.com>
Date:   Thu, 24 Feb 2022 04:07:31 +0800
From:   kernel test robot <lkp@...el.com>
To:     Felix Fietkau <nbd@....name>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [nbd168-wireless:mtk-flow-offload 15/15]
 drivers/net/ethernet/mediatek/mtk_ppe.c:650:33: error: 'struct net_device'
 has no member named 'dsa_ptr'; did you mean 'dn_ptr'?

tree:   https://github.com/nbd168/wireless mtk-flow-offload
head:   4dded169141416b3248146f545378f36cca6bd03
commit: 4dded169141416b3248146f545378f36cca6bd03 [15/15] net: ethernet: mtk_eth_soc: support creating mac address based offload entries
config: m68k-randconfig-r004-20220223 (https://download.01.org/0day-ci/archive/20220224/202202240458.daZyVdyc-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/nbd168/wireless/commit/4dded169141416b3248146f545378f36cca6bd03
        git remote add nbd168-wireless https://github.com/nbd168/wireless
        git fetch --no-tags nbd168-wireless mtk-flow-offload
        git checkout 4dded169141416b3248146f545378f36cca6bd03
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/mediatek/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/net/ethernet/mediatek/mtk_ppe.c: In function 'mtk_flow_entry_update_l2':
   drivers/net/ethernet/mediatek/mtk_ppe.c:446:28: warning: variable 'head' set but not used [-Wunused-but-set-variable]
     446 |         struct hlist_head *head;
         |                            ^~~~
   drivers/net/ethernet/mediatek/mtk_ppe.c: In function '__mtk_ppe_check_skb':
>> drivers/net/ethernet/mediatek/mtk_ppe.c:650:33: error: 'struct net_device' has no member named 'dsa_ptr'; did you mean 'dn_ptr'?
     650 |                 ops = skb->dev->dsa_ptr->tag_ops;
         |                                 ^~~~~~~
         |                                 dn_ptr


vim +650 drivers/net/ethernet/mediatek/mtk_ppe.c

   598	
   599	void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash)
   600	{
   601		struct hlist_head *head = &ppe->foe_flow[hash / 2];
   602		struct mtk_foe_entry *hwe = &ppe->foe_table[hash];
   603		const struct dsa_device_ops *ops;
   604		struct mtk_flow_entry *entry;
   605		struct mtk_foe_bridge key = {};
   606		struct ethhdr *eh;
   607		bool found = false;
   608		u8 *tag;
   609	
   610		spin_lock_bh(&ppe_lock);
   611	
   612		if (FIELD_GET(MTK_FOE_IB1_STATE, hwe->ib1) == MTK_FOE_STATE_BIND)
   613			goto out;
   614	
   615		hlist_for_each_entry(entry, head, list) {
   616			if (entry->type == MTK_FLOW_TYPE_L2_SUBFLOW) {
   617				if (unlikely(FIELD_GET(MTK_FOE_IB1_STATE, hwe->ib1) ==
   618					     MTK_FOE_STATE_BIND))
   619					continue;
   620	
   621				entry->hash = 0xffff;
   622				__mtk_foe_entry_clear(ppe, entry);
   623				continue;
   624			}
   625	
   626			if (found || !mtk_flow_entry_match(entry, hwe)) {
   627				if (entry->hash != 0xffff)
   628					entry->hash = 0xffff;
   629				continue;
   630			}
   631	
   632			entry->hash = hash;
   633			__mtk_foe_entry_commit(ppe, &entry->data, hash);
   634			found = true;
   635		}
   636	
   637		if (found)
   638			goto out;
   639	
   640		eh = eth_hdr(skb);
   641		ether_addr_copy(key.dest_mac, eh->h_dest);
   642		ether_addr_copy(key.src_mac, eh->h_source);
   643		tag = skb->data - 2;
   644		key.vlan = 0;
   645		switch (skb->protocol) {
   646		case htons(ETH_P_XDSA):
   647			if (!netdev_uses_dsa(skb->dev))
   648				goto out;
   649	
 > 650			ops = skb->dev->dsa_ptr->tag_ops;
   651			if (ops->proto != DSA_TAG_PROTO_MTK)
   652				goto out;
   653	
   654			tag += 4;
   655			if (get_unaligned_be16(tag) != ETH_P_8021Q)
   656				break;
   657	
   658			fallthrough;
   659		case htons(ETH_P_8021Q):
   660			key.vlan = get_unaligned_be16(tag + 2) & VLAN_VID_MASK;
   661			break;
   662		default:
   663			break;
   664		}
   665	
   666		entry = rhashtable_lookup_fast(&ppe->l2_flows, &key, mtk_flow_l2_ht_params);
   667		if (!entry)
   668			goto out;
   669	
   670		mtk_foe_entry_commit_subflow(ppe, entry, hash);
   671	
   672	out:
   673		spin_unlock_bh(&ppe_lock);
   674	}
   675	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ