Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426213 > unrolled thread

RE: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

Started by"Rosen, Rami" <rami.rosen@intel.com>
First post2016-06-20 07:40 +0200
Last post2016-06-20 18:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [PATCH net-next] net: ena: Add a driver for Amazon Elastic  Network Adapters (ENA) "Rosen, Rami" <rami.rosen@intel.com> - 2016-06-20 07:40 +0200
    Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic  Network Adapters (ENA) Netanel Belgazal <netanel@annapurnalabs.com> - 2016-06-20 18:20 +0200

#1426213 — RE: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

From"Rosen, Rami" <rami.rosen@intel.com>
Date2016-06-20 07:40 +0200
SubjectRE: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)
Message-ID<rM06e-48L-3@gated-at.bofh.it>
Hi all, 

A very limited review below.

+
+	/* get capabilities of particular feature */
+	ENA_ADMIN_GET_FEATURE = 8,

Instead /* get capabilities  SHOULD BE:  /* set capabilities .....
+
+	/* get capabilities of particular feature */
+	ENA_ADMIN_SET_FEATURE = 9,
+
..


+int ena_com_set_hash_ctrl(struct ena_com_dev *ena_dev)
+{
+	struct ena_com_admin_queue *admin_queue = &ena_dev->admin_queue;
...

You set ret=-EINVAL, but you do not use this ret as you immediately return 0 in the next line, which is the end of the method. Either return ret or return -EINVAL.
+	if (unlikely(ret)) {
+		ena_trc_err("Failed to set hash input. error: %d\n", ret);
+		ret = -EINVAL;
+	}
+
+	return 0;
+}
+



+
+/* ena_com_set_mmio_read_mode - Enable/disable the mmio reg read mechanism
+ * @ena_dev: ENA communication layer struct


Instead realess_supported: SHOULD BE: readless_supported

+ * @realess_supported: readless mode (enable/disable)
+ */
+void ena_com_set_mmio_read_mode(struct ena_com_dev *ena_dev,
+				bool readless_supported);
+



+
+/* ena_com_create_io_queue - Create io queue.
+ * @ena_dev: ENA communication layer struct

Instead ena_com_create_io_ctx SHOULD BE: @ena_com_create_io_ctx

+ * ena_com_create_io_ctx - create context structure
+ *
+ * Create the submission and the completion queues.
+ *
+ * @return - 0 on success, negative value on failure.
+ */
+int ena_com_create_io_queue(struct ena_com_dev *ena_dev,
+			    struct ena_com_create_io_ctx *ctx);
+




+/* ena_com_admin_destroy - Destroy IO queue with the queue id - qid.
+ * @ena_dev: ENA communication layer struct

Missing: @qid

+ */
+void ena_com_destroy_io_queue(struct ena_com_dev *ena_dev, u16 qid);
+

Regards,
Rami Rosen
Intel Corporation

[toc] | [next] | [standalone]


#1426773

FromNetanel Belgazal <netanel@annapurnalabs.com>
Date2016-06-20 18:20 +0200
Message-ID<rMa5z-24j-31@gated-at.bofh.it>
In reply to#1426213

On 06/20/2016 08:20 AM, Rosen, Rami wrote:
> Hi all, 
>
> A very limited review below.
>
> +
> +	/* get capabilities of particular feature */
> +	ENA_ADMIN_GET_FEATURE = 8,
>
> Instead /* get capabilities  SHOULD BE:  /* set capabilities .....
> +
> +	/* get capabilities of particular feature */
> +	ENA_ADMIN_SET_FEATURE = 9,
> +
> ..
>
>
> +int ena_com_set_hash_ctrl(struct ena_com_dev *ena_dev)
> +{
> +	struct ena_com_admin_queue *admin_queue = &ena_dev->admin_queue;
> ...
>
> You set ret=-EINVAL, but you do not use this ret as you immediately return 0 in the next line, which is the end of the method. Either return ret or return -EINVAL.
> +	if (unlikely(ret)) {
> +		ena_trc_err("Failed to set hash input. error: %d\n", ret);
> +		ret = -EINVAL;
> +	}
> +
> +	return 0;
> +}
> +
I will return ret.
>
>
> +
> +/* ena_com_set_mmio_read_mode - Enable/disable the mmio reg read mechanism
> + * @ena_dev: ENA communication layer struct
>
>
> Instead realess_supported: SHOULD BE: readless_supported
ack
>
> + * @realess_supported: readless mode (enable/disable)
> + */
> +void ena_com_set_mmio_read_mode(struct ena_com_dev *ena_dev,
> +				bool readless_supported);
> +
>
>
>
> +
> +/* ena_com_create_io_queue - Create io queue.
> + * @ena_dev: ENA communication layer struct
>
> Instead ena_com_create_io_ctx SHOULD BE: @ena_com_create_io_ctx
ack
>
> + * ena_com_create_io_ctx - create context structure
> + *
> + * Create the submission and the completion queues.
> + *
> + * @return - 0 on success, negative value on failure.
> + */
> +int ena_com_create_io_queue(struct ena_com_dev *ena_dev,
> +			    struct ena_com_create_io_ctx *ctx);
> +
>
>
>
>
> +/* ena_com_admin_destroy - Destroy IO queue with the queue id - qid.
> + * @ena_dev: ENA communication layer struct
>
> Missing: @qid
ack
>
> + */
> +void ena_com_destroy_io_queue(struct ena_com_dev *ena_dev, u16 qid);
> +
>
> Regards,
> Rami Rosen
> Intel Corporation
Thanks for the review

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web