Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Wojciech Drewek <wojciech.drewek@intel.com>
Cc: netdev@vger.kernel.org, alexandr.lobakin@intel.com,
	horms@kernel.org, kuba@kernel.org, anthony.l.nguyen@intel.com,
	intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v10 09/14] libeth: move idpf_rx_csum_decoded and idpf_rx_extracted
Date: Wed, 21 Aug 2024 17:03:49 +0200	[thread overview]
Message-ID: <6d67f88f-8240-4564-b98c-5bcc957fc589@intel.com> (raw)
In-Reply-To: <20240821121539.374343-10-wojciech.drewek@intel.com>

From: Wojciech Drewek <wojciech.drewek@intel.com>
Date: Wed, 21 Aug 2024 14:15:34 +0200

> From: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
> 
> Structs idpf_rx_csum_decoded and idpf_rx_extracted are used both in
> idpf and iavf Intel drivers. This commit changes the prefix from

Imperative. Like "change the prefix and move mentioned structs to...".

> idpf_* to libeth_* and moves mentioned structs to libeth's rx.h header
> file.
> 
> Usage in idpf driver has been adjusted.

[...]

> diff --git a/include/net/libeth/rx.h b/include/net/libeth/rx.h
> index 43574bd6612f..03e371633f4f 100644
> --- a/include/net/libeth/rx.h
> +++ b/include/net/libeth/rx.h
> @@ -198,6 +198,48 @@ struct libeth_rx_pt {
>  	enum xdp_rss_hash_type			hash_type:16;
>  };
>  
> +/**
> + * struct libeth_rx_csum - Checksum offload bits decoded from the Rx descriptor

Lowercase after '-' to be consistent with the rest.

 * struct libeth_rx_csum - checksum offload bits...

> + * @l3l4p: detectable L3 and L4 integrity check is processed by the hardware
> + * @ipe: IP checksum error
> + * @eipe: external (outermost) IP header (only for tunels)
> + * @eudpe: external (outermost) UDP checksum error (only for tunels)
> + * @ipv6exadd: IPv6 header with extension headers
> + * @l4e: L4 integrity error
> + * @pprs: set for packets that skip checksum calculation in the HW pre parser
> + * @nat: the packet is a UDP tunneled packet
> + * @raw_csum_valid: set if raw checksum is valid
> + * @pad: padding to naturally align raw_csum field
> + * @raw_csum: raw checksum
> + */
> +struct libeth_rx_csum {
> +	u32					l3l4p:1;
> +	u32					ipe:1;
> +	u32					eipe:1;
> +	u32					eudpe:1;
> +	u32					ipv6exadd:1;
> +	u32					l4e:1;
> +	u32					pprs:1;
> +	u32					nat:1;

I'd put an empty newline here after nat.

> +	u32					raw_csum_valid:1;
> +	u32					pad:7;
> +	u32					raw_csum:16;
> +};
> +
> +/**
> + * struct libeth_rqe_info - receive queue element info
> + * @len: packet length
> + * @vlan_tag: vlan tag

Again, which tag is this? C-VLAN, S-VLAN? If it depends on the
configuration, then I'd mention it accordingly, like (note that I'd
shorten the name to just 'vlan')

 * @vlan: C-VLAN or S-VLAN tag depending on the VLAN offload configuration
("VLAN", not "vlan" BTW)

> + * @eop: end of packet

I'd expand this a bit.

 * @eop: whether it's the last fragment of the packet

> + * @rxe: MAC errors: CRC, Alignment, Oversize, Undersizes, Length error
> + */
> +struct libeth_rqe_info {
> +	u32					len;
> +	u32					vlan_tag:16;
> +	u32					eop:1;
> +	u32					rxe:1;
> +};

Ok, sorry for confusing, but now after I read the changes above I really
think it would be better to add ptype here though =\

struct libeth_rqe_info {
	u32					len;

	u32					ptype:14;
	u32					eop:1;
	u32					rxe:1;

	u32					vlan_tag:16;
}

(+ reorder and empty newlines as suggested)

> +
>  void libeth_rx_pt_gen_hash_type(struct libeth_rx_pt *pt);
>  
>  /**

Thanks,
Olek

  reply	other threads:[~2024-08-21 15:04 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 12:15 [Intel-wired-lan] [PATCH iwl-next v10 00/14] Add support for Rx timestamping for both ice and iavf drivers Wojciech Drewek
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 01/14] virtchnl: add support for enabling PTP on iAVF Wojciech Drewek
2024-08-21 13:32   ` Alexander Lobakin
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 02/14] ice: support Rx timestamp on flex descriptor Wojciech Drewek
2024-08-21 13:29   ` Alexander Lobakin
2024-08-23  9:52     ` Wojciech Drewek
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 03/14] virtchnl: add enumeration for the rxdid format Wojciech Drewek
2024-08-21 13:30   ` Alexander Lobakin
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 04/14] iavf: add support for negotiating flexible RXDID format Wojciech Drewek
2024-08-21 13:52   ` Alexander Lobakin
2024-08-26  9:45     ` Wojciech Drewek
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 05/14] iavf: negotiate PTP capabilities Wojciech Drewek
2024-08-21 14:06   ` Alexander Lobakin
2024-08-26 12:43     ` Wojciech Drewek
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 06/14] iavf: add initial framework for registering PTP clock Wojciech Drewek
2024-08-21 14:20   ` Alexander Lobakin
2024-08-27 10:59     ` Wojciech Drewek
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 07/14] iavf: add support for indirect access to PHC time Wojciech Drewek
2024-08-21 14:31   ` Alexander Lobakin
2024-08-28 11:15     ` Wojciech Drewek
2024-08-28 12:05       ` Alexander Lobakin
2024-08-28 14:50         ` Wojciech Drewek
2024-10-01  7:20     ` Mateusz Polchlopek
2024-10-01 13:49       ` Alexander Lobakin
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 08/14] iavf: periodically cache " Wojciech Drewek
2024-08-21 14:43   ` Alexander Lobakin
2024-08-28 11:31     ` Wojciech Drewek
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 09/14] libeth: move idpf_rx_csum_decoded and idpf_rx_extracted Wojciech Drewek
2024-08-21 15:03   ` Alexander Lobakin [this message]
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 10/14] iavf: define Rx descriptors as qwords Wojciech Drewek
2024-08-22 16:16   ` Alexander Lobakin
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 11/14] iavf: refactor iavf_clean_rx_irq to support legacy and flex descriptors Wojciech Drewek
2024-08-22 16:40   ` Alexander Lobakin
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 12/14] iavf: Implement checking DD desc field Wojciech Drewek
2024-08-22 16:46   ` Alexander Lobakin
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 13/14] iavf: handle set and get timestamps ops Wojciech Drewek
2024-08-22 16:48   ` Alexander Lobakin
2024-08-21 12:15 ` [Intel-wired-lan] [PATCH iwl-next v10 14/14] iavf: add support for Rx timestamps to hotpath Wojciech Drewek
2024-08-22 16:54   ` Alexander Lobakin

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=6d67f88f-8240-4564-b98c-5bcc957fc589@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=alexandr.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wojciech.drewek@intel.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