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]
Message-ID: <2b915d44-e37f-d261-aa23-0944ddaf58a2@grimberg.me>
Date:   Thu, 6 Apr 2017 11:29:12 +0300
From:   Sagi Grimberg <sagi@...mberg.me>
To:     Christoph Hellwig <hch@....de>
Cc:     linux-rdma@...r.kernel.org, linux-nvme@...ts.infradead.org,
        linux-block@...r.kernel.org, netdev@...r.kernel.org,
        Saeed Mahameed <saeedm@...lanox.com>,
        Or Gerlitz <ogerlitz@...lanox.com>
Subject: Re: [PATCH rfc 2/6] mlx5: move affinity hints assignments to generic
 code

>>  static int mlx5e_get_cpu(struct mlx5e_priv *priv, int ix)
>>  {
>> -	return cpumask_first(priv->mdev->priv.irq_info[ix].mask);
>> +	return cpumask_first(pci_irq_get_affinity(priv->mdev->pdev,
>> +			MLX5_EQ_VEC_COMP_BASE + ix));
>
> This looks ok for now, but if we look at the callers we'd probably
> want to make direct use of pci_irq_get_node and pci_irq_get_affinity for
> the uses directly in mlx5e_open_channel as well as the stored away
> ->cpu field.  But maybe that should be left for another patch after
> this one.

Its small enough to fold it in.

>> +	struct irq_affinity irqdesc = { .pre_vectors = MLX5_EQ_VEC_COMP_BASE, };
>
> I usually move assignments inside structures onto a separate line to make
> it more readable, e.g.
>
> 	struct irq_affinity irqdesc = {
> 		.pre_vectors = MLX5_EQ_VEC_COMP_BASE,
> 	};

Will do.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ