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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 Jul 2020 11:01:08 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Tony Nguyen <anthony.l.nguyen@...el.com>
Cc:     davem@...emloft.net, Alice Michael <alice.michael@...el.com>,
        netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com,
        jeffrey.t.kirsher@...el.com, Alan Brady <alan.brady@...el.com>,
        Phani Burra <phani.r.burra@...el.com>,
        Joshua Hay <joshua.a.hay@...el.com>,
        Madhu Chittim <madhu.chittim@...el.com>,
        Pavan Kumar Linga <pavan.kumar.linga@...el.com>,
        Donald Skidmore <donald.c.skidmore@...el.com>,
        Jesse Brandeburg <jesse.brandeburg@...el.com>,
        Sridhar Samudrala <sridhar.samudrala@...el.com>
Subject: Re: [net-next v4 06/15] iecm: Implement mailbox functionality

On Mon, 20 Jul 2020 17:38:01 -0700 Tony Nguyen wrote:
> @@ -30,7 +38,32 @@ static enum iecm_status iecm_ctlq_init_regs(struct iecm_hw *hw,
>  					    struct iecm_ctlq_info *cq,
>  					    bool is_rxq)
>  {
> -	/* stub */
> +	u32 reg = 0;
> +
> +	if (is_rxq)
> +		/* Update tail to post pre-allocated buffers for Rx queues */
> +		wr32(hw, cq->reg.tail, (u32)(cq->ring_size - 1));
> +	else
> +		wr32(hw, cq->reg.tail, 0);
> +
> +	/* For non-Mailbox control queues only TAIL need to be set */
> +	if (cq->q_id != -1)
> +		return 0;
> +
> +	/* Clear Head for both send or receive */
> +	wr32(hw, cq->reg.head, 0);
> +
> +	/* set starting point */
> +	wr32(hw, cq->reg.bal, IECM_LO_DWORD(cq->desc_ring.pa));
> +	wr32(hw, cq->reg.bah, IECM_HI_DWORD(cq->desc_ring.pa));
> +	wr32(hw, cq->reg.len, (cq->ring_size | cq->reg.len_ena_mask));
> +
> +	/* Check one register to verify that config was applied */
> +	reg = rd32(hw, cq->reg.bah);
> +	if (reg != IECM_HI_DWORD(cq->desc_ring.pa))
> +		return IECM_ERR_CTLQ_ERROR;

Please stop using your own error codes.

> +	return 0;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ