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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: 
 <SJ0PR18MB5216EF6CC8846042CA4A229FDBBCA@SJ0PR18MB5216.namprd18.prod.outlook.com>
Date: Tue, 28 Nov 2023 13:11:59 +0000
From: Suman Ghosh <sumang@...vell.com>
To: Wojciech Drewek <wojciech.drewek@...el.com>,
        Sunil Kovvuri Goutham
	<sgoutham@...vell.com>,
        Geethasowjanya Akula <gakula@...vell.com>,
        Subbaraya
 Sundeep Bhatta <sbhatta@...vell.com>,
        Hariprasad Kelam <hkelam@...vell.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        Linu Cherian <lcherian@...vell.com>,
        Jerin
 Jacob Kollanukkaran <jerinj@...vell.com>,
        "horms@...nel.org"
	<horms@...nel.org>
Subject: RE: [EXT] Re: [net-next PATCH v4 1/2] octeontx2-af: Add new mbox to
 support multicast/mirror offload

>> A new mailbox is added to support offloading of multicast/mirror
>> functionality. The mailbox also supports dynamic updation of the
>> multicast/mirror list.
>>
>> Signed-off-by: Suman Ghosh <sumang@...vell.com>
>> ---
>>  .../net/ethernet/marvell/octeontx2/af/mbox.h  |  72 ++
>>  .../net/ethernet/marvell/octeontx2/af/rvu.c   |   6 +-
>>  .../net/ethernet/marvell/octeontx2/af/rvu.h   |  39 +-
>>  .../ethernet/marvell/octeontx2/af/rvu_nix.c   | 701
>+++++++++++++++++-
>>  .../ethernet/marvell/octeontx2/af/rvu_npc.c   |  14 +-
>>  .../marvell/octeontx2/af/rvu_npc_fs.c         |  73 +-
>>  6 files changed, 867 insertions(+), 38 deletions(-)
>>
>
><...>
>
>> +
>> +static int nix_add_mce_list_entry(struct rvu *rvu,
>> +				  struct nix_hw *nix_hw,
>> +				  struct nix_mcast_grp_elem *elem,
>> +				  struct nix_mcast_grp_update_req *req) {
>> +	u32 num_entry = req->num_mce_entry;
>> +	struct nix_mce_list *mce_list;
>> +	struct mce *mce;
>> +	int i;
>> +
>> +	mce_list = &elem->mcast_mce_list;
>> +	for (i = 0; i < num_entry; i++) {
>> +		mce = kzalloc(sizeof(*mce), GFP_KERNEL);
>> +		if (!mce)
>> +			goto free_mce;
>> +
>> +		mce->pcifunc = req->pcifunc[i];
>> +		mce->channel = req->channel[i];
>> +		mce->rq_rss_index = req->rq_rss_index[i];
>> +		mce->dest_type = req->dest_type[i];
>> +		mce->is_active = 1;
>> +		hlist_add_head(&mce->node, &mce_list->head);
>> +		mce_list->count++;
>> +	}
>> +
>> +	mce_list->max += num_entry;
>> +
>> +	/* Dump the updated list to HW */
>> +	if (elem->dir == NIX_MCAST_INGRESS)
>> +		return nix_update_ingress_mce_list_hw(rvu, nix_hw, elem);
>> +
>> +	nix_update_egress_mce_list_hw(rvu, nix_hw, elem);
>> +	return 0;
>> +
>> +free_mce:
>> +	hlist_for_each_entry(mce, &mce_list->head, node) {
>
>I belive that hlist_for_each_entry_safe should be used when deleting
>list entries.
[Suman] Ack
>
>> +		hlist_del(&mce->node);
>> +		kfree(mce);
>> +		mce_list->count--;
>> +	}
>> +
>> +	return -ENOMEM;
>> +}
>> +
>>  static int nix_update_mce_list_entry(struct nix_mce_list *mce_list,
>>  				     u16 pcifunc, bool add)
>>  {
>> @@ -3079,6 +3301,7 @@ int nix_update_mce_list(struct rvu *rvu, u16
>pcifunc,
>>  		/* EOL should be set in last MCE */
>>  		err = nix_blk_setup_mce(rvu, nix_hw, idx, NIX_AQ_INSTOP_WRITE,
>>  					mce->pcifunc, next_idx,
>> +					0, 1,
>>  					(next_idx > last_idx) ? true : false);
>>  		if (err)
>>  			goto end;
>
><...>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ