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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 19 Jan 2021 19:27:39 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Saeed Mahameed <saeed@...nel.org>, Parav Pandit <parav@...dia.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jason Gunthorpe <jgg@...dia.com>, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, Vu Pham <vuhuong@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>
Subject: Re: [net-next V7 03/14] devlink: Support add and delete devlink
 port

On Mon, 18 Jan 2021 12:12:20 -0800 Saeed Mahameed wrote:
> From: Parav Pandit <parav@...dia.com>

Saeed, this is closed to being merged - when you post the next version
please make sure to CC appropriate folks, in particular anyone who ever
commented on previous versions. Alex, DSA, Edwin, at a quick look but
maybe more.

> @@ -1362,6 +1373,33 @@ struct devlink_ops {
>  	int (*port_function_hw_addr_set)(struct devlink *devlink, struct devlink_port *port,
>  					 const u8 *hw_addr, int hw_addr_len,
>  					 struct netlink_ext_ack *extack);
> +	/**
> +	 * @port_new: Port add function.
> +	 *
> +	 * Should be used by device driver to let caller add new port of a
> +	 * specified flavour with optional attributes.

I think you missed my suggestion from v5, please replace this sentence
with:

	Add a new port of a specified flavor with optional attributes.

Saying that the callback is used by the callee doesn't sound right.

Same below, and also in patch 4.

> +	 * Driver must return -EOPNOTSUPP if it doesn't support port addition
> +	 * of a specified flavour or specified attributes. Driver should set
> +	 * extack error message in case of failure. Driver callback is called
> +	 * without holding the devlink instance lock. Driver must ensure
> +	 * synchronization when adding or deleting a port. Driver must register
> +	 * a port with devlink core.
> +	 */
> +	int (*port_new)(struct devlink *devlink,
> +			const struct devlink_port_new_attrs *attrs,
> +			struct netlink_ext_ack *extack,
> +			unsigned int *new_port_index);
> +	/**
> +	 * @port_del: Port delete function.
> +	 *
> +	 * Should be used by device driver to let caller delete port which was
> +	 * previously created using port_new() callback.

ditto

> +	 * Driver must return -EOPNOTSUPP if it doesn't support port deletion.
> +	 * Driver should set extack error message in case of failure. Driver
> +	 * callback is called without holding the devlink instance lock.
> +	 */
> +	int (*port_del)(struct devlink *devlink, unsigned int port_index,
> +			struct netlink_ext_ack *extack);
>  };

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ