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: <20191110163229.GE25889@lunn.ch>
Date:   Sun, 10 Nov 2019 17:32:29 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     jakub.kicinski@...ronome.com, davem@...emloft.net,
        alexandre.belloni@...tlin.com, f.fainelli@...il.com,
        vivien.didelot@...il.com, joergen.andreasen@...rochip.com,
        allan.nielsen@...rochip.com, horatiu.vultur@...rochip.com,
        claudiu.manoil@....com, netdev@...r.kernel.org,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next 14/15] net: mscc: ocelot: split assignment of
 the cpu port into a separate function

> +void ocelot_set_cpu_port(struct ocelot *ocelot, int cpu,
> +			 enum ocelot_tag_prefix injection,
> +			 enum ocelot_tag_prefix extraction)
> +{
> +	/* Configure and enable the CPU port. */
> +	ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, cpu);
> +	ocelot_write_rix(ocelot, BIT(cpu), ANA_PGID_PGID, PGID_CPU);
> +	ocelot_write_gix(ocelot, ANA_PORT_PORT_CFG_RECV_ENA |
> +			 ANA_PORT_PORT_CFG_PORTID_VAL(cpu),
> +			 ANA_PORT_PORT_CFG, cpu);
> +
> +	/* If the CPU port is a physical port, set up the port in Node
> +	 * Processor Interface (NPI) mode. This is the mode through which
> +	 * frames can be injected from and extracted to an external CPU.
> +	 * Only one port can be an NPI at the same time.
> +	 */
> +	if (cpu < ocelot->num_phys_ports) {
> +		ocelot_write(ocelot, QSYS_EXT_CPU_CFG_EXT_CPUQ_MSK_M |
> +			     QSYS_EXT_CPU_CFG_EXT_CPU_PORT(cpu),
> +			     QSYS_EXT_CPU_CFG);
> +	}

If a port is not a physical port, what is it? Is it actually an error
if the CPU port is not physical? Should we be returning -EINVAL here,
indicating the device tree is bad?

	   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ