From: "Abdul Rahim, Faizal" <faizal.abdul.rahim@linux.intel.com>
To: "Ruinskiy, Dima" <dima.ruinskiy@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Chwee-Lin Choong <chwee.lin.choong@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1 1/8] igc: move IGC_TXDCTL_QUEUE_ENABLE and IGC_TXDCTL_SWFLUSH
Date: Tue, 29 Apr 2025 11:36:43 +0800 [thread overview]
Message-ID: <dd046c43-1491-4d2c-b4f2-5946ac55441e@linux.intel.com> (raw)
In-Reply-To: <cabea2f2-49f7-40f8-a305-2c102ceb4012@intel.com>
On 28/4/2025 3:01 pm, Ruinskiy, Dima wrote:
> On 28/04/2025 9:02, Faizal Rahim wrote:
>> Consolidate TXDCTL-related macros for better organization and readability.
>>
>> Signed-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>
>> ---
>> drivers/net/ethernet/intel/igc/igc.h | 6 ++++++
>> drivers/net/ethernet/intel/igc/igc_base.h | 4 ----
>> 2 files changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/
>> intel/igc/igc.h
>> index 859a15e4ccba..e9d180eac015 100644
>> --- a/drivers/net/ethernet/intel/igc/igc.h
>> +++ b/drivers/net/ethernet/intel/igc/igc.h
>> @@ -492,6 +492,12 @@ static inline u32 igc_rss_type(const union
>> igc_adv_rx_desc *rx_desc)
>> #define IGC_RX_WTHRESH 4
>> #define IGC_TX_WTHRESH 16
>> +/* Additional Transmit Descriptor Control definitions */
>> +/* Ena specific Tx Queue */
>> +#define IGC_TXDCTL_QUEUE_ENABLE 0x02000000
>> +/* Transmit Software Flush */
>> +#define IGC_TXDCTL_SWFLUSH 0x04000000
>> +
>> #define IGC_RX_DMA_ATTR \
>> (DMA_ATTR_SKIP_CPU_SYNC | DMA_ATTR_WEAK_ORDERING)
>> diff --git a/drivers/net/ethernet/intel/igc/igc_base.h b/drivers/net/
>> ethernet/intel/igc/igc_base.h
>> index 6320eabb72fe..4a56c634977b 100644
>> --- a/drivers/net/ethernet/intel/igc/igc_base.h
>> +++ b/drivers/net/ethernet/intel/igc/igc_base.h
>> @@ -86,10 +86,6 @@ union igc_adv_rx_desc {
>> } wb; /* writeback */
>> };
>> -/* Additional Transmit Descriptor Control definitions */
>> -#define IGC_TXDCTL_QUEUE_ENABLE 0x02000000 /* Ena specific Tx Queue */
>> -#define IGC_TXDCTL_SWFLUSH 0x04000000 /* Transmit Software Flush */
>> -
>> /* Additional Receive Descriptor Control definitions */
>> #define IGC_RXDCTL_QUEUE_ENABLE 0x02000000 /* Ena specific Rx Queue */
>> #define IGC_RXDCTL_SWFLUSH 0x04000000 /* Receive Software Flush */
>
> Is there an intrinsic value for moving these definitions from one H file to
> another? And if so, why move the Tx defs and leave the Rx defs where they are?
Hi Dima,
I moved and refactored the TXDCTL macros because this patch series
modifies the TXDCTL register, specifically setting new bitfields.
Consolidating `IGC_TXDCTL_QUEUE_ENABLE` and `IGC_TXDCTL_SWFLUSH`
alongside the existing TXDCTL macros improves readability and makes it
easier to cross-reference the TXDCTL bitfield mapping, as documented in
Section 8.11.16 of the i226 Software User Manual. The grouping now
matches that layout directly:
#define IGC_TXDCTL_PTHRESH_MASK GENMASK(4, 0)
#define IGC_TXDCTL_HTHRESH_MASK GENMASK(12, 8)
#define IGC_TXDCTL_WTHRESH_MASK GENMASK(20, 16)
#define IGC_TXDCTL_QUEUE_ENABLE_MASK GENMASK(25, 25)
#define IGC_TXDCTL_SWFLUSH_MASK GENMASK(26, 26)
#define IGC_TXDCTL_PRIORITY_MASK GENMASK(27, 27)
Since RXDCTL is a separate register with its own bitfield mapping
section in the i226 Software User Manual, and this patch series does
not modify it, I left the RXDCTL macros untouched. They are used
independently in separate functions within the driver.
That said, I can move the RXDCTL macros as well for consistency.
next prev parent reply other threads:[~2025-04-29 3:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 6:02 [PATCH iwl-next v1 0/8] igc: harmonize queue priority and add preemptible queue support Faizal Rahim
2025-04-28 6:02 ` [PATCH iwl-next v1 1/8] igc: move IGC_TXDCTL_QUEUE_ENABLE and IGC_TXDCTL_SWFLUSH Faizal Rahim
2025-04-28 7:01 ` [Intel-wired-lan] " Ruinskiy, Dima
2025-04-29 3:36 ` Abdul Rahim, Faizal [this message]
2025-04-28 6:02 ` [PATCH iwl-next v1 2/8] igc: add TXDCTL prefix to related macros Faizal Rahim
2025-04-28 6:57 ` [Intel-wired-lan] " Ruinskiy, Dima
2025-04-29 3:37 ` Abdul Rahim, Faizal
2025-04-28 6:02 ` [PATCH iwl-next v1 3/8] igc: refactor TXDCTL macros to use FIELD_PREP and GEN_MASK Faizal Rahim
2025-04-28 6:02 ` [PATCH iwl-next v1 4/8] igc: assign highest TX queue number as highest priority in mqprio Faizal Rahim
2025-04-28 6:02 ` [PATCH iwl-next v1 5/8] igc: add private flag to reverse TX queue priority in TSN mode Faizal Rahim
2025-04-28 6:02 ` [PATCH iwl-next v1 6/8] igc: add preemptible queue support in taprio Faizal Rahim
2025-04-28 9:11 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-04-29 3:39 ` Abdul Rahim, Faizal
2025-04-28 6:02 ` [PATCH iwl-next v1 7/8] igc: add preemptible queue support in mqprio Faizal Rahim
2025-04-28 6:02 ` [PATCH iwl-next v1 8/8] igc: SW pad preemptible frames for correct mCRC calculation Faizal Rahim
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=dd046c43-1491-4d2c-b4f2-5946ac55441e@linux.intel.com \
--to=faizal.abdul.rahim@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=chwee.lin.choong@intel.com \
--cc=davem@davemloft.net \
--cc=dima.ruinskiy@intel.com \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=vladimir.oltean@nxp.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