DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>, dev@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@amd.com>,
	Sandilya Bhagi <sbhagi@solarflare.com>,
	Andy Moreton <amoreton@xilinx.com>
Subject: Re: [PATCH v2 1/4] common/sfc_efx/base: discover NIC partitioning mode
Date: Thu, 22 Jun 2023 12:48:20 +0300	[thread overview]
Message-ID: <b5e6eb3d-0a59-b1db-ca7d-1b77321455e7@oktetlabs.ru> (raw)
In-Reply-To: <20230622034738.51288-2-denis.pryazhennikov@arknetworks.am>

On 6/22/23 06:47, Denis Pryazhennikov wrote:
> From: Sandilya Bhagi <sbhagi@solarflare.com>
> 
> NIC Partitioning mode in SFC devices means multiple PFs
> per network port. When NIC Partitioning is configured,
> apart from the privileged adapter(s) the other
> unprivileged adapter(s) will share the same physical port.
> Determining NIC Partitioning mode is required to take
> necessary action(s) for unprivileged adapter to work seamlessly.
> BNIC Partitioning is determined using heuristic approach.
> If the physical ports are shared between PFs then either
> NIC Partitioning or SR-IOV is in use.
> 
> Signed-off-by: Sandilya Bhagi <sbhagi@solarflare.com>
> Signed-off-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>

Overall LGMT with few style notes:

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

[snip]

> +#define CAP_PFS_TO_PORTS(_n)	\
> +	(MC_CMD_GET_CAPABILITIES_V2_OUT_PFS_TO_PORTS_ASSIGNMENT_ ## _n)
> +
> +	encp->enc_port_usage = EFX_PORT_USAGE_UNKNOWN;
> +
> +	if (req.emr_out_length_used >= MC_CMD_GET_CAPABILITIES_V2_OUT_LEN) {
> +		/* PFs to ports assignment */
> +		uint8_t pfs_to_ports[CAP_PFS_TO_PORTS(NUM)];
> +
> +		EFX_STATIC_ASSERT((CAP_PFS_TO_PORTS(NUM) * CAP_PFS_TO_PORTS(LEN)) ==
> +				  EFX_ARRAY_SIZE(pfs_to_ports));

As far as I remember libefx style, it should be 4 spaces indent above
relative to mail line.

> +
> +		memcpy(pfs_to_ports, MCDI_OUT(req, efx_byte_t, CAP_PFS_TO_PORTS(OFST)),
> +		       EFX_ARRAY_SIZE(pfs_to_ports));

same here, 4 spaces indent

> +
> +		rc = ef10_nic_get_physical_port_usage(enp, pfs_to_ports,
> +						      EFX_ARRAY_SIZE(pfs_to_ports),
> +						      &encp->enc_port_usage);

same here, 4 spaces indent

> +		if (rc != 0) {
> +			/* PF to port mapping lookup failed */
> +			encp->enc_port_usage = EFX_PORT_USAGE_UNKNOWN;
> +		}
> +	}
> +#undef  CAP_PFS_TO_PORTS
> +
>   	/*
>   	 * Check if firmware reports the VI window mode.
>   	 * Medford2 has a variable VI window size (8K, 16K or 64K).

[snip]



  reply	other threads:[~2023-06-22  9:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 11:42 [PATCH 0/4] net/sfc: support KEEP_CRC offload Denis Pryazhennikov
2023-06-01 11:42 ` [PATCH 1/4] common/sfc_efx/base: NIC Partitioning mode discovery using heuristic approach Denis Pryazhennikov
2023-06-02  9:43   ` Andrew Rybchenko
2023-06-01 11:42 ` [PATCH 2/4] common/sfc_efx/base: detect and report FCS include support Denis Pryazhennikov
2023-06-07  8:27   ` Andrew Rybchenko
2023-06-01 11:42 ` [PATCH 3/4] common/sfc_efx/base: add support for configure MAC to keep FCS Denis Pryazhennikov
2023-06-07  8:28   ` Andrew Rybchenko
2023-06-01 11:42 ` [PATCH 4/4] net/sfc: add configurable Rx CRC stripping Denis Pryazhennikov
2023-06-07  8:34   ` Andrew Rybchenko
2023-06-08 16:01 ` [PATCH 0/4] net/sfc: support KEEP_CRC offload Ferruh Yigit
2023-06-22  3:47 ` [PATCH v2 " Denis Pryazhennikov
2023-06-22  3:47   ` [PATCH v2 1/4] common/sfc_efx/base: discover NIC partitioning mode Denis Pryazhennikov
2023-06-22  9:48     ` Andrew Rybchenko [this message]
2023-06-22  3:47   ` [PATCH v2 2/4] common/sfc_efx/base: detect and report FCS include support Denis Pryazhennikov
2023-06-22  3:47   ` [PATCH v2 3/4] common/sfc_efx/base: add support for configure MAC to keep FCS Denis Pryazhennikov
2023-06-22  3:47   ` [PATCH v2 4/4] net/sfc: add configurable Rx CRC stripping Denis Pryazhennikov
2023-06-22  9:53     ` Andrew Rybchenko
2023-06-22 11:38 ` [PATCH v3 0/4] net/sfc: support KEEP_CRC offload Denis Pryazhennikov
2023-06-22 11:38   ` [PATCH v3 1/4] common/sfc_efx/base: discover NIC partitioning mode Denis Pryazhennikov
2023-06-22 11:38   ` [PATCH v3 2/4] common/sfc_efx/base: detect and report FCS include support Denis Pryazhennikov
2023-06-22 11:38   ` [PATCH v3 3/4] common/sfc_efx/base: add support for configure MAC to keep FCS Denis Pryazhennikov
2023-06-22 11:38   ` [PATCH v3 4/4] net/sfc: add configurable Rx CRC stripping Denis Pryazhennikov
2023-06-22 11:47 ` [PATCH v4 0/4] net/sfc: support KEEP_CRC offload Denis Pryazhennikov
2023-06-22 11:47   ` [PATCH v4 1/4] common/sfc_efx/base: discover NIC partitioning mode Denis Pryazhennikov
2023-06-22 11:47   ` [PATCH v4 2/4] common/sfc_efx/base: detect and report FCS include support Denis Pryazhennikov
2023-06-22 11:47   ` [PATCH v4 3/4] common/sfc_efx/base: add support for configure MAC to keep FCS Denis Pryazhennikov
2023-06-22 11:47   ` [PATCH v4 4/4] net/sfc: add configurable Rx CRC stripping Denis Pryazhennikov
2023-06-22 13:09   ` [PATCH v4 0/4] net/sfc: support KEEP_CRC offload Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b5e6eb3d-0a59-b1db-ca7d-1b77321455e7@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=amoreton@xilinx.com \
    --cc=denis.pryazhennikov@arknetworks.am \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=sbhagi@solarflare.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).