From nobody Mon Dec 23 20:16:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=jaguarmicro.com); dmarc=pass(p=quarantine dis=none) header.from=jaguarmicro.com ARC-Seal: i=2; a=rsa-sha256; t=1734589105; cv=pass; d=zohomail.com; s=zohoarc; b=g+6bzD9TR2Qaqp9oVpdVR8rKk7INop/uuYui5ZUMiBw6s6We+Dn/AXNe7T/0jHV15HL3pGVFjuqmHszLIBxtHbtaRZ4BZVq/Gp9J7QCf0ZGYj+OKwlqdctW66jnf8RZ/dcn7/Sf67JBcba0dU0svMlZPdstdqTSc4DkJw6926/Y= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734589105; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eKBXAcv7Y/JDvKnZe9LtSBDuGqQSzB8OKvrJg7SJO4g=; b=ld2eZnmIr+b10bFSO/BUhHgxKBxQN1s+QDuiytfwX7UrWk/zdCxfGeBm4E63ln5mshOb0x9UsK9J14VKx/FGu4zqiCo4icM8rc2agNxwJQI3qiLrzXrv47xHRymV3Zo6YKSPaszDCiHjiAkcowbhMO760ABXvsg70s36X+0mhCw= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=jaguarmicro.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734589105671589.5113502525777; Wed, 18 Dec 2024 22:18:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tO9qi-0007Ni-GQ; Thu, 19 Dec 2024 01:17:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tO9qg-0007NR-N9; Thu, 19 Dec 2024 01:17:27 -0500 Received: from mail-tyzapc01on20727.outbound.protection.outlook.com ([2a01:111:f403:2011::727] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tO9qe-0004e4-Ac; Thu, 19 Dec 2024 01:17:26 -0500 Received: from KL1PR0601MB4891.apcprd06.prod.outlook.com (2603:1096:820:ae::7) by SEZPR06MB5391.apcprd06.prod.outlook.com (2603:1096:101:66::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Thu, 19 Dec 2024 06:17:13 +0000 Received: from KL1PR0601MB4891.apcprd06.prod.outlook.com ([fe80::8950:42de:2354:91b2]) by KL1PR0601MB4891.apcprd06.prod.outlook.com ([fe80::8950:42de:2354:91b2%6]) with mapi id 15.20.8272.005; Thu, 19 Dec 2024 06:17:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fDwB142H/4kMMPhRLrJbRRVCbsILTM+QAtGpHERH02bqxxBOzcdCeVnGqW19wdwtD9xIUwUhoFJgVYgsBtERc84Jta4Wqmgyq1zSbhaBROpLd1zY5DF0drVA0wTp7MMc2l0IsGiHSS62RcbIaYEgxSMPeehVX6upMZYgRDvoZN1Lgr8+FD3occcFRyrqMMVSha7XaZYitx9qiX4t9ngGn6FKR4f2ZbBuMOfNikJUTuXdodEX6ecsX/uoZ4yLfXuvRWGj2HUHyPBR4SIO22JKmA8F0S0YQp9MtKezNbKSEgEgIEOydnlOoc0mjJudmvMDJG0sl2qxsg+ROrkCMDN3kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eKBXAcv7Y/JDvKnZe9LtSBDuGqQSzB8OKvrJg7SJO4g=; b=KxOXfA+aq7RXa+Cxw5l0EmhTof8iObZOSf0lZehu8yxWoftzRBwRT/+AnN9VtWa4+yPFcbi7z/Md9rxIeQKnh823+M1je621en2KplKzAV05Urnn5xp+MXxE6Memcftw1mTvBZ+NI74jrA2O3C3qrfxAxI19xSDJQ8smrSjX2SObqrTYoGyWCe+0y8eoeQjodbnEaXYixsVzRvPeLoHiEH8R/U845WVDlXGk9uXLIvT+VlIXrXBa3L1XQw9aubZxfGLgUeFrLSYqrinDGmyUfQuAWy59yPCiJMzrpTjxubniVeHpKWiUOYQfJ335IEuNhFHKvBMtMBdtMu8f8Zl92A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jaguarmicro.com; dmarc=pass action=none header.from=jaguarmicro.com; dkim=pass header.d=jaguarmicro.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jaguarmicro.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eKBXAcv7Y/JDvKnZe9LtSBDuGqQSzB8OKvrJg7SJO4g=; b=i9kQjeUqcmUsPNdNoc1NQKQIJysNJmL/OGjmZn4BKET7IFhgRAHu7IKzmrEwiHhOSbnlH+Hh6FHeo/8mP6C6sP0RXGCNAUDbpzKojlB5GatxXXJZH8VoHtGTnNxJdgPJHOGHjVqq/lWWQgMGenJZ5SuAICEVgot8fVacTSgY306TReW0IRlKwPYf3w3XhkCOIEsPjPmP+SsKEIS3n0A0o+WHl+7TsZI0VdBqI4ifZLbUm1FMbKwhW1HQoph3r6QUf31wG4HV1HE8XW+Za0AtrUGT4KG/lGOheI/XKjagK8AQCPyt3UGamaCNnX8tplQxDbJ6yfgMJJ2qzKevcJuvng== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jaguarmicro.com; From: "Andrew.Yuan" To: philmd@linaro.org, edgar.iglesias@gmail.com, alistair@alistair23.me, jasowang@redhat.com, peter.maydell@linaro.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Andrew Yuan Subject: [PATCH v3] hw/net: cadence_gem: feat: add logic for the DISABLE_MASK bit in type2_compare_x_word_1 Date: Thu, 19 Dec 2024 14:16:58 +0800 Message-Id: <20241219061658.805-1-andrew.yuan@jaguarmicro.com> X-Mailer: git-send-email 2.37.0.windows.1 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: TYCP286CA0020.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:263::12) To KL1PR0601MB4891.apcprd06.prod.outlook.com (2603:1096:820:ae::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: KL1PR0601MB4891:EE_|SEZPR06MB5391:EE_ X-MS-Office365-Filtering-Correlation-Id: c27e885c-831a-4f77-e0da-08dd1ff4c707 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014|7053199007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?L0UrVTMvMUg5dkRJS2NDT2daUDAvU2tQdmdmSkRJVDV4cWtUY0piM3JISFo2?= =?utf-8?B?M2dBVGZ1eWZ4WnI2cEpLcUozYkpQQ3ZvbFMrUEp3d24rb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NFdzeE5MZWZOeGFwcUhGQytacktISmhoeUdXcG9UeVQxNzAw?= =?utf-8?Q?5xNgqFEQkzJdnz+x+iq9zwqcAS260YQT?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:KL1PR0601MB4891.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(366016)(1800799024)(38350700014)(7053199007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UmUrQTF0dFFXb0hDSnYxdVlWem0rVzFjdTM5RnpGd0syU21jWXhDQ29GRVFz?= =?utf-8?B?dWZTYjZuZ2N4alpneThBMnN2NkNtU0hJbGUvOHNSUk5zZVNCN0hvK3ZpeU02?= =?utf-8?B?MWQySzh4YU5Pc1o3dnlldnJuSnUzZU03cys4WnNQMGJLdEZTSnFxNytmSXJ2?= =?utf-8?B?ajdyeGZrNlEvUUtYVFRhRUdLRmJrY1FFRURvazFLQUs2WFdVVVgxTjBHOWd6?= =?utf-8?B?RHJ5TlRMQ2ZES0JGdVhPZXgwdTRyVW40OEtNVjFoRk1RV3pFaE9sTDhxc25Q?= =?utf-8?B?aXhjaWRkME5TVWk4VDFUTTU4amJUWHZlODhZUGJHUWk3UjZwTVpiVFpWZ0ps?= =?utf-8?B?VWVGRjl0QWwwRkh2WEZrUGlsQzFXTStYcGVOVEZzZkx5b3BEN3QwZTF5Zlp6?= =?utf-8?B?K1Vjc3hubEkrc3htWDBUb2tVOGpGMWV3ZldmY21aZGQ5YmxCelcvWXJ4eXFK?= =?utf-8?B?dm1IRWNjSUJISURiTzRRci9FbUhzZHBhcHBHR3hQZlR2VzREeG5rSUlRYXhM?= =?utf-8?B?VnNRYjFpTVQvWFhBTWU0eFptSnNBUWUwTVN5TjcxVWJCNlBPQUZzNEorQ2xH?= =?utf-8?B?WE5yUDQ1TWQ2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krdGZVRnc1VkpYZEQ2SFE1MXpPUHJjNFRGSW5mNm9jRDdla1k4OEc1?= =?utf-8?B?RldxWWcrT1JoWXhHNXJjd3cxOUtOUGtzaEt2R0QxcGtuTG8rVTV6SndMcngy?= =?utf-8?B?d1pwdjN2VWxEbXJsZ1N1dXl0M0xSaSswVElrRTh3czMvTXdpMVR1aE40OGty?= =?utf-8?B?d1cxSUYvMWk4cUhEeUs4c3JRcWkxWmpDN3Vvdit5RFNSeG9IMk5ZcVRRella?= =?utf-8?B?ZGxHMklBY3RXKzExY2l1SGs4SFZ0YjlzdFlsRzJQZnFSeGpsTUNaOVdsWExO?= =?utf-8?B?VTRiRDJ2dEF0Vm9tNUMvUUlEb2sxSG96Wit4YXAvQ2R4MDdlZ0piUytDWXhj?= =?utf-8?B?L3NCa1NIU2puZkc5ZFQwSXk2a3BVRE4xK0FoS2tPNzVSWE4rNzNRT0tsY2Yr?= =?utf-8?B?bFZ6aFpTSDdtbUhoWWd3bHRqK1RibmpWVFFKMDhPNDdFNEdHUUhVMnZ2blVu?= =?utf-8?B?TEJkbHBjdG5VSU5nUjZWZDdSTEdXRlFPdXVwTHF2NVp6dHU4RHhObk1ma0dU?= =?utf-8?B?U0pqeFhST0VVMnp0V0pSSUduQTNhYnZ0NGgvbmMxbTcxMHBaVU9sMjNXMjJx?= =?utf-8?B?ZFhRbEx2blVCTlRwYzlVK2FkK2p5aWpmTHFlZWszWTQ2VVMxdUdmSCs5dEFS?= =?utf-8?B?OVE9PQ==?= X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-Network-Message-Id: c27e885c-831a-4f77-e0da-08dd1ff4c707 X-MS-Exchange-CrossTenant-AuthSource: KL1PR0601MB4891.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2024 06:17:13.4819 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1e45a5c2-d3e1-46b3-a0e6-c5ebf6d8ba7b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: S0U7Q5wZ+3YeCLvkTOP0PigltFZp55SCH/anjU9qyEo7f/XmwiyWGTtbaxvo/cxN5yRU/QtCIy9rQU9ZJzjaonPPA/gmrufgnUXOzSdHL2I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5391 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a01:111:f403:2011::727; envelope-from=andrew.yuan@jaguarmicro.com; helo=APC01-TYZ-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @jaguarmicro.com) X-ZM-MESSAGEID: 1734589107299116600 From: Andrew Yuan As in the Cadence IP for Gigabit Ethernet MAC Part Number: IP7014 IP Rev: R= 1p12 - Doc Rev: 1.3 User Guide, if the DISABLE_MASK bit in type2_compare_x_word_1 is set, mask_value in type2_compare_x_word_0 is used as an additional 2 byte Compar= e Value Signed-off-by: Andrew Yuan Suggested-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/cadence_gem.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 3fce01315f..7bd176951e 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -909,8 +909,8 @@ static int get_queue_from_screen(CadenceGEMState *s, ui= nt8_t *rxbuf_ptr, =20 /* Compare A, B, C */ for (j =3D 0; j < 3; j++) { - uint32_t cr0, cr1, mask, compare; - uint16_t rx_cmp; + uint32_t cr0, cr1, mask, compare, disable_mask; + uint32_t rx_cmp; int offset; int cr_idx =3D extract32(reg, R_SCREENING_TYPE2_REG0_COMPARE_A= _SHIFT + j * 6, R_SCREENING_TYPE2_REG0_COMPARE_A_LENGTH= ); @@ -946,9 +946,23 @@ static int get_queue_from_screen(CadenceGEMState *s, u= int8_t *rxbuf_ptr, break; } =20 - rx_cmp =3D rxbuf_ptr[offset] << 8 | rxbuf_ptr[offset]; - mask =3D FIELD_EX32(cr0, TYPE2_COMPARE_0_WORD_0, MASK_VALUE); - compare =3D FIELD_EX32(cr0, TYPE2_COMPARE_0_WORD_0, COMPARE_VA= LUE); + disable_mask =3D + FIELD_EX32(cr1, TYPE2_COMPARE_0_WORD_1, DISABLE_MASK); + if (disable_mask) { + /* + * If disable_mask is set, + * mask_value is used as an additional 2 byte Compare Valu= e. + * To simple, set mask =3D 0xFFFFFFFF, if disable_mask is = set. + */ + rx_cmp =3D ldl_le_p(rxbuf_ptr + offset); + mask =3D 0xFFFFFFFF; + compare =3D cr0; + } else { + rx_cmp =3D lduw_le_p(rxbuf_ptr + offset); + mask =3D FIELD_EX32(cr0, TYPE2_COMPARE_0_WORD_0, MASK_VALU= E); + compare =3D + FIELD_EX32(cr0, TYPE2_COMPARE_0_WORD_0, COMPARE_VALUE); + } =20 if ((rx_cmp & mask) =3D=3D (compare & mask)) { matched =3D true; --=20 2.25.1