From nobody Sat Feb 14 02:06:59 2026 Received: from mx0a-0024c301.pphosted.com (mx0a-0024c301.pphosted.com [148.163.149.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88F9F168BD for ; Thu, 12 Feb 2026 15:14:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=148.163.149.154 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770909265; cv=fail; b=a9uxc0IlPKcub13TueEpuYvsrhLVRnhh87Ab/wVhRxF109al945TmASXTiC5P0L2KxubFoqyeCCs+okmD+ZeY8LYRFCmKk89RCn6Dr15AXuJmsuwoyWiP041qRRoy0GD+x6GpxSiZFhU+rVIx+7G4grFN/WsUDuN6WICddsm+bM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770909265; c=relaxed/simple; bh=A0ALFf9w/xS+3jyiQwFnAcCqvYTaCGS660QmMJ5OGyg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=XZaVNpPANIc0v1jAFcLCGhmd8vigWrnCcL9StLGVVlWbOz76EBEIEizm3nPmrGgHysPjg4xPGzfAKYFlb7X17pBpZbzYbCmQlO00H/bperfI/w2LNdjRdKBQmhXd47gYcHjkc8cZGISJ3TBB3eLQkQn+3BToYbxiQSAWck6ZCiM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=silabs.com; spf=pass smtp.mailfrom=silabs.com; dkim=pass (2048-bit key) header.d=silabs.com header.i=@silabs.com header.b=P2LdDjYR; dkim=pass (1024-bit key) header.d=silabs.com header.i=@silabs.com header.b=CrhYdSKP; arc=fail smtp.client-ip=148.163.149.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=silabs.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=silabs.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=silabs.com header.i=@silabs.com header.b="P2LdDjYR"; dkim=pass (1024-bit key) header.d=silabs.com header.i=@silabs.com header.b="CrhYdSKP" Received: from pps.filterd (m0101743.ppops.net [127.0.0.1]) by mx0a-0024c301.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61C2Lwnl2678544; Thu, 12 Feb 2026 08:44:17 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pps12202023; bh=oeQ6sfglfhAcPUY0AVDOdSw0Vg2TcVy6DfBadLJy0GM=; b=P2LdDjYRPxI9 R7gSzkEngs9LJVWvB0TZpxpAsS3LdmcPIxfyQac0iCwRmhzHMPHzQ1uHS1UUr0od 2tYBIQckRRQtqUduwbg/OhdojSOYT3fFvYVftjirJEnFl/t17jQyb8NcdH58n9oN 5MTaEMJtF7ZztErECSKD3Z7ShwjqvuJajX+6VzqTGZqFNRBchg6Erw7kfslAIrLZ fUtKDceZUp4UlndtLBdku973bm+UdzNWJX/cPCOj9bqFheG+ZfDTol1+3nvuRB4A RiLZ3ek40IDUWbTH5H76tnA6y308tuSPIMysEUkBSAh1sO1xP6vOaRTYxh+qSADA mr1Vz/8VPw== Received: from dm1pr04cu001.outbound.protection.outlook.com (mail-centralusazon11020096.outbound.protection.outlook.com [52.101.61.96]) by mx0a-0024c301.pphosted.com (PPS) with ESMTPS id 4c92uysn4e-9 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 12 Feb 2026 08:44:17 -0600 (CST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pnLIVIi+lSptWMK5EkrVtv/uU5fY5JDJ8UNlZc0//l+xENICxlD0WpJUE+tmbO57APMW+FY/MyT8O4zD89kDy1FC2XHlRqP0SE/00wD89gbJNidDqs9CS42PO4+/saENObGbTAVZOTBNhTkSWFcWaR+6GpH0EH8elbvn783pGMMNrtA+J+W8RM2EdeqkDz0tIyKUJ/Q+78V1sTRxbanOrv/CHF6+eYkc6jiPJYQu31EPp/ebeiaBZ0KHs79cYv9GbFjKpwrRSUY6EZYmGWTfKGY+d0WnactfXbsXptibFNYzp1imyDtuGbTHbx9NRjJJOlQ9dqAnSpbQE7CLGcSuFQ== 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=oeQ6sfglfhAcPUY0AVDOdSw0Vg2TcVy6DfBadLJy0GM=; b=ekkMLUuJ/Hdj32zdB9aeDK4C4ZQ4p2j4DinhzE9qU44bOsdFszd4KG3+4usF+mi/VluH5lc1beS6uhpOJknJrQFZOQ5eIvVNYUA1DyJZ+Fl9/+VM0n919LIOzzkLbRUFLmMLB2tDi3Pj+meQ0JaOHixzLlA0orowWh2myfiQvi1wFbxK7tmxRPIcUoCvHU9rXkhDRT7HOr9Nsx4+jLvCs8QCETu+OEHih8PF2WE0O2pEG2y71Q8/0H0/VAs1qw36Fr7IuijD9LpEGuWVqTndfKuYc1KbED4Jw0AcmLbg2RkvsCPazZJMd51kDUoN2W9FysX7E7vA/D2s2lPQx28ZjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oeQ6sfglfhAcPUY0AVDOdSw0Vg2TcVy6DfBadLJy0GM=; b=CrhYdSKPIwf9+rf10G/lriDzM0pRjR7nw+s2eTfIOSaASaiCAskB68vcyR2t6JICfTM4P17Gz11YBwuvgEIKxkAWICu2yZjDUXeBMJUl21WlDuOIVU5ufoW8fxXnEKax0fQxXmvLgb13qkLj8zSzQrSD7rb0+/4x8P5HiN22VqA= Received: from DS0PR11MB8205.namprd11.prod.outlook.com (2603:10b6:8:162::17) by LV8PR11MB8486.namprd11.prod.outlook.com (2603:10b6:408:1e8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.19; Thu, 12 Feb 2026 14:44:13 +0000 Received: from DS0PR11MB8205.namprd11.prod.outlook.com ([fe80::2de6:bc88:2af7:3583]) by DS0PR11MB8205.namprd11.prod.outlook.com ([fe80::2de6:bc88:2af7:3583%3]) with mapi id 15.20.9611.008; Thu, 12 Feb 2026 14:44:13 +0000 From: =?UTF-8?q?Damien=20Ri=C3=A9gel?= To: greybus-dev@lists.linaro.org, Johan Hovold , Alex Elder , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: Silicon Labs Kernel Team , =?UTF-8?q?Damien=20Ri=C3=A9gel?= Subject: [PATCH v3 11/14] greybus: cpc: honour remote's RX window Date: Thu, 12 Feb 2026 09:43:49 -0500 Message-ID: <20260212144352.93043-12-damien.riegel@silabs.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260212144352.93043-1-damien.riegel@silabs.com> References: <20260212144352.93043-1-damien.riegel@silabs.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: YQBPR0101CA0124.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:5::27) To DS0PR11MB8205.namprd11.prod.outlook.com (2603:10b6:8:162::17) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB8205:EE_|LV8PR11MB8486:EE_ X-MS-Office365-Filtering-Correlation-Id: 273dd1c0-8b7d-4c8f-2c99-08de6a4530c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?cDdwZ2JBQmo2K0dZSHc1T2o1b0UveFA4SnVrcGN1UjFCUngzNkFrb2VMM2hk?= =?utf-8?B?WVRkQy9DcmtMRktYSW9tOHpzaTZNNnpPSUVZeHRPSUZyYUx4eHJwY2RsWCty?= =?utf-8?B?V2trWk53cVhDZTA1UEJIdDZXNzdkQ3BWMlRnWHo3OHQ1aStiVmtOVUpjVHUr?= =?utf-8?B?c3cxQzRhRzVEMHBzNzhTYTJ6QThjUDZoSTdwSlpEQTQvb0E5L0EyZm5reDd1?= =?utf-8?B?eGtlekRPd2VmQWdkL05XZE5qNFFHTnh1ZTVMai9xRzV3NkI2YVBhR2ZpWkR6?= =?utf-8?B?TG1ZNXRRSUZDMjg4U09zWkpkOURMTU5ZeFBIT1R4RythZ0pJMnhBSC8xSGVk?= =?utf-8?B?RDJhZ0laU0Jua3VBa0VWckJUVHdjVzlPOTFDRldpN3gwYjZEbjJEaWFTL1V0?= =?utf-8?B?V0t4czZWRWdvNE9naVdqUE05VWdtSWZZRi9aaGhWY24yQmNhUzRLRDlWVFV1?= =?utf-8?B?YkdTVnoxTzN6WUU1anZRQzE4V3FJT24zQlRKUERJSzhQU0FhR1RpaWNidjFG?= =?utf-8?B?d1N1WGNtZzNBSDZ3OURJSEdrYnlEQzV0TGdFNHkvNnoycE13ZnpLL29FU1NN?= =?utf-8?B?Zk1lcnV5b3QyT0dSQTRqK0VjdmVxZjlVRkdlSmJNVDFPVmFLdXNYMk5yUEF1?= =?utf-8?B?L2tpVThLS0N5ZkkveXo1anJzNTBOL0U4MEVJUTR6UWhIZE8yTUdYbDRUNGxZ?= =?ut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C9yejVHa0Yz?= =?utf-8?B?dHl6eG5vUGgxVG10MzhFWk9UTC81MWxwM3JYWmp0bWU0UlZTMWJUVXFYVW8w?= =?utf-8?B?bVg2Tkt3aXNaK3RSQWtaSm9OMXVWUTM0QVphc3Y3dlJsR0pUZ1FOelVJeVVo?= =?utf-8?B?djhqd3hnamQxTk0yajd4dUczMUd3dkVNWUZGcFJYRUc1eHdlMlBrQS9EdEk4?= =?utf-8?B?QmQ3S3hHVDFXYWJYL1QwVkxTMUkvME5JYWNkcU03c05FUFlWZERYZEw3Q2J3?= =?utf-8?B?RXZXVFl1WFQ5SFpRZytnN0E5WFVHZ0RrRUlvc0w3VC9zNFk0WkR4MVdaUnN3?= =?utf-8?B?LzJHZldleTZIaG5VRkcyZE5JYzFBbWVYVXVQamE5eVJqbWx4am82eU5ETCtl?= =?utf-8?B?SkwzYnR5N3dLUThPZ2RzYzUzbG91bUYzeW9nT1Vxb29UTVNha21lcERpSVYv?= =?utf-8?B?ZjROdnFFeC81WkYwT05QWVNRbDhpUlc0bGJidk14Z1ZZekgwaThJMDByRFhr?= =?utf-8?B?TlcxSWVZd281NW5tMDdNSjQyTUFyTGVndDhFeDRKMGt4R0c5a1Q1WmxsUWZO?= =?utf-8?Q?MuuqtfusMR2b49EG1x0Opew=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB8205.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dnZnUC9CcjV3bG9nNTI3VmFrNCtJUVlNVzdGQ2MvNlQvOVY0bnJ3Zllib1lD?= =?utf-8?B?WW5Oa1hWMEZFYmtiRWxvNXFQeHJQNDBsS2MvRFFrUUJVWW9wcnhOYW5rQ3pP?= =?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p3cnJHL0ZzWEtnYnNLbTRsU1ptTnYyYW9z?= =?utf-8?B?VzlnZlpUY2c4cTNOL1FCRWF3MTROL2JWUnhLTlE3dUhYM0ZjUVRwNmV5bzJ3?= =?utf-8?B?RUhYZ3QzSU9WM3A2N2V2MzNLaEkxTmQxekhrTGo4WGtYV3hyeGdZdmtUb3FW?= =?utf-8?B?em9OaWxISXQ3dGRmYUFYWEE1bjJpa1ZBRnVVbVE5WWpRZStWT1NjR3VLSVlO?= =?utf-8?B?eFVxVXBBSG9CeG5uZDkxMGN5aHdGOXoyQ3NuYXVLUnFYb2xud2VNRDNDQXc5?= =?utf-8?B?MVdET0p4ZnhrczVkOGdjaG16dUdPTFJlbGdnaXJtSk5qaWZQdFptNjR2SklO?= =?utf-8?B?TzlpdE91VTZGVmd1YXVjVDZaaVh3VEdvTGFWZEE0OHNRblQ1MG5HdHNrUmlQ?= =?utf-8?B?SlpyNTdaa3NOaG1paUt0L1hPV2RKOHpuUVdhSW00NkpyQnN4U3R3QT09?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 273dd1c0-8b7d-4c8f-2c99-08de6a4530c1 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB8205.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2026 14:44:13.8545 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xyfcMoS9Ho8kd3eTncAkqojCitfSQ4btnSiXM3zsRm9CnO07VDq1IuHFGwBvO7li2ZcW3iCpvvGnGZf0rPYhLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR11MB8486 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjEyMDExMSBTYWx0ZWRfX+SJu4ZdQbZY+ AeaVEZVQCeR/F0i5hs/rnyp4GMYOdkFfuPKqUFSD62cH4jxtCoOx6s4yw968ik3IDLoyGgtLq60 xez/jW+ou4XkURaa09tDzSVDPc1WJIr4gkL6xFdiUKbt2ACe/02E73zEx4oMwoo8asB40FnZJYf 1PO6+Plif0VHTGTi4dXLO3R7lD/SgbQgJ1aqDlER8jM4GHwISTCthCzuleyFUvSfM+l7buUQwlM 0AdpTQnrSaBxMX8ITljvniT4PIzYLzNGIDYaqIb1qALeddppI/XSfSsrkhLm9hRvnqFxcJzYipI 4s9/JD2PbUT5p/g3NuR2OVR3CrxsjJD43klPa29E5zM031hH5Y/G1DvR3oGsW4j9ArCa8J1ki4c hWjtHmcQYjMTO7k709MEcgPbDguChIZffS/h+jCgpzzlMdKo4oBKEYIHsiG/Oc9KEZ+1HgV9h9U nwD9jIlS1nfTr3REELQ== X-Authority-Analysis: v=2.4 cv=DtRbOW/+ c=1 sm=1 tr=0 ts=698de741 cx=c_pps a=TvliyZNEFSK35vtP2Nadqg==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=M51BFTxLslgA:10 a=i1IsUcr2s-wA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=2AEO0YjSAAAA:8 a=LxIw55J96KH0fPlZK-gA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 X-Proofpoint-ORIG-GUID: OrLQddinx1UC5zdKRf7lRg3GiGwEr_4n X-Proofpoint-GUID: OrLQddinx1UC5zdKRf7lRg3GiGwEr_4n X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-12_04,2026-02-12_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 malwarescore=0 adultscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602120111 The RX window indicates how many reception buffers the peer has available for that cport. The other peer must not send more messages than that window, or the chances of those messages being lost is very high, leading to retransmissions and poor performance. The RX window is associated with the ack number, and indicates the valid range of sequence number the other peer can use: Ack RX window Valid Sequence Range X 0 None X 1 X X 2 X -> X+1 So everytime an ack is received, the driver evaluates if the valid sequence range has changed and if so pops message from its holding queue. SKBs used to be passed directly to the driver for transmission. Now SBKs still need to be passed to driver for transmission, but CPC also needs to keep track of them, to be able to trigger a retransmission if they are not acked in a timely manner. As SKBs cannot be in two lists at the same time, drivers now get cloned SKBs. Signed-off-by: Damien Ri=C3=A9gel --- Changes in v2: - fix documentation of cpc_header_number_in_window which documented a unexisting parameter `end` - simplify implementation of cpc_header_get_frames_acked_count drivers/greybus/cpc/cpc.h | 9 ++++ drivers/greybus/cpc/cport.c | 5 +++ drivers/greybus/cpc/header.c | 78 ++++++++++++++++++++++++++++++++++ drivers/greybus/cpc/header.h | 6 +++ drivers/greybus/cpc/host.c | 9 ---- drivers/greybus/cpc/host.h | 1 - drivers/greybus/cpc/protocol.c | 71 ++++++++++++++++++++++++++++--- 7 files changed, 163 insertions(+), 16 deletions(-) diff --git a/drivers/greybus/cpc/cpc.h b/drivers/greybus/cpc/cpc.h index f1669585c45..e8cbe916630 100644 --- a/drivers/greybus/cpc/cpc.h +++ b/drivers/greybus/cpc/cpc.h @@ -18,6 +18,7 @@ * @cpc_hd: pointer to the CPC host device this cport belongs to * @lock: mutex to synchronize accesses to tcb and other attributes * @holding_queue: list of frames queued to be sent + * @retx_queue: list of frames sent and waiting for acknowledgment * @tcb: Transmission Control Block */ struct cpc_cport { @@ -27,12 +28,20 @@ struct cpc_cport { struct mutex lock; /* Synchronize access to state variables */ =20 struct sk_buff_head holding_queue; + struct sk_buff_head retx_queue; =20 /* + * @send_wnd: send window, maximum number of frames that the remote can a= ccept. + * TX frames should have a sequence in the range [send_una; se= nd_una + send_wnd] + * @send_nxt: send next, the next sequence number that will be used for t= ransmission + * @send_una: send unacknowledged, the oldest unacknowledged sequence num= ber * @ack: current acknowledge number * @seq: current sequence number */ struct { + u8 send_wnd; + u8 send_nxt; + u8 send_una; u8 ack; u8 seq; } tcb; diff --git a/drivers/greybus/cpc/cport.c b/drivers/greybus/cpc/cport.c index 91c39856e22..c05d89709f0 100644 --- a/drivers/greybus/cpc/cport.c +++ b/drivers/greybus/cpc/cport.c @@ -16,6 +16,9 @@ static void cpc_cport_tcb_reset(struct cpc_cport *cport) { cport->tcb.ack =3D 0; cport->tcb.seq =3D 0; + cport->tcb.send_nxt =3D 0; + cport->tcb.send_una =3D 0; + cport->tcb.send_wnd =3D 1; } =20 /** @@ -38,12 +41,14 @@ struct cpc_cport *cpc_cport_alloc(u16 cport_id, gfp_t g= fp_mask) =20 mutex_init(&cport->lock); skb_queue_head_init(&cport->holding_queue); + skb_queue_head_init(&cport->retx_queue); =20 return cport; } =20 void cpc_cport_release(struct cpc_cport *cport) { + skb_queue_purge(&cport->retx_queue); skb_queue_purge(&cport->holding_queue); kfree(cport); } diff --git a/drivers/greybus/cpc/header.c b/drivers/greybus/cpc/header.c index 8875a6fed26..dfcd5581133 100644 --- a/drivers/greybus/cpc/header.c +++ b/drivers/greybus/cpc/header.c @@ -22,6 +22,17 @@ bool cpc_header_is_control(const struct cpc_header *hdr) return hdr->ctrl_flags & CPC_HEADER_CONTROL_IS_CONTROL_MASK; } =20 +/** + * cpc_header_get_recv_wnd() - Get the receive window. + * @hdr: CPC header. + * + * Return: Receive window. + */ +u8 cpc_header_get_recv_wnd(const struct cpc_header *hdr) +{ + return hdr->recv_wnd; +} + /** * cpc_header_get_seq() - Get the sequence number. * @hdr: CPC header. @@ -33,6 +44,17 @@ u8 cpc_header_get_seq(const struct cpc_header *hdr) return hdr->seq; } =20 +/** + * cpc_header_get_ack() - Get the acknowledge number. + * @hdr: CPC header. + * + * Return: Acknowledge number. + */ +u8 cpc_header_get_ack(const struct cpc_header *hdr) +{ + return hdr->ack; +} + /** * cpc_header_get_req_ack() - Get the request acknowledge frame flag. * @hdr: CPC header. @@ -56,3 +78,59 @@ u8 cpc_header_encode_ctrl_flags(bool control, bool req_a= ck) return FIELD_PREP(CPC_HEADER_CONTROL_IS_CONTROL_MASK, control) | FIELD_PREP(CPC_HEADER_CONTROL_REQ_ACK_MASK, req_ack); } + +/** + * cpc_header_get_frames_acked_count() - Get frames to be acknowledged. + * @seq: Current sequence number of the endpoint. + * @ack: Acknowledge number of the received frame. + * + * Return: Frames to be acknowledged. + */ +u8 cpc_header_get_frames_acked_count(u8 seq, u8 ack) +{ + return ack - seq; +} + +/** + * cpc_header_number_in_window() - Test if a number is within a window. + * @start: Start of the window. + * @wnd: Window size. + * @n: Number to be tested. + * + * Given the start of the window and its size, test if the number is + * in the range [start; start + wnd). + * + * @return True if start <=3D n <=3D start + wnd - 1 (modulo 256), otherwi= se false. + */ +bool cpc_header_number_in_window(u8 start, u8 wnd, u8 n) +{ + u8 end; + + if (wnd =3D=3D 0) + return false; + + end =3D start + wnd - 1; + + return cpc_header_number_in_range(start, end, n); +} + +/** + * cpc_header_number_in_range() - Test if a number is between start and en= d (included). + * @start: Lowest limit. + * @end: Highest limit inclusively. + * @n: Number to be tested. + * + * @return True if start <=3D n <=3D end (modulo 256), otherwise false. + */ +bool cpc_header_number_in_range(u8 start, u8 end, u8 n) +{ + if (end >=3D start) { + if (n < start || n > end) + return false; + } else { + if (n > end && n < start) + return false; + } + + return true; +} diff --git a/drivers/greybus/cpc/header.h b/drivers/greybus/cpc/header.h index 19612012b19..906bf45660d 100644 --- a/drivers/greybus/cpc/header.h +++ b/drivers/greybus/cpc/header.h @@ -39,8 +39,14 @@ struct cpc_header { } __packed; =20 bool cpc_header_is_control(const struct cpc_header *hdr); +u8 cpc_header_get_recv_wnd(const struct cpc_header *hdr); u8 cpc_header_get_seq(const struct cpc_header *hdr); +u8 cpc_header_get_ack(const struct cpc_header *hdr); bool cpc_header_get_req_ack(const struct cpc_header *hdr); u8 cpc_header_encode_ctrl_flags(bool control, bool req_ack); =20 +u8 cpc_header_get_frames_acked_count(u8 seq, u8 ack); +bool cpc_header_number_in_window(u8 start, u8 wnd, u8 n); +bool cpc_header_number_in_range(u8 start, u8 end, u8 n); + #endif diff --git a/drivers/greybus/cpc/host.c b/drivers/greybus/cpc/host.c index 225f9342cd2..9a0f8158504 100644 --- a/drivers/greybus/cpc/host.c +++ b/drivers/greybus/cpc/host.c @@ -205,15 +205,6 @@ void cpc_hd_del(struct cpc_host_device *cpc_hd) } EXPORT_SYMBOL_GPL(cpc_hd_del); =20 -void cpc_hd_message_sent(struct sk_buff *skb, int status) -{ - struct cpc_host_device *cpc_hd =3D CPC_SKB_CB(skb)->cport->cpc_hd; - struct gb_host_device *hd =3D cpc_hd->gb_hd; - - greybus_message_sent(hd, CPC_SKB_CB(skb)->gb_message, status); -} -EXPORT_SYMBOL_GPL(cpc_hd_message_sent); - void cpc_hd_rcvd(struct cpc_host_device *cpc_hd, struct sk_buff *skb) { struct gb_operation_msg_hdr *gb_hdr; diff --git a/drivers/greybus/cpc/host.h b/drivers/greybus/cpc/host.h index cc835f5298b..8f05877b2be 100644 --- a/drivers/greybus/cpc/host.h +++ b/drivers/greybus/cpc/host.h @@ -46,7 +46,6 @@ int cpc_hd_add(struct cpc_host_device *cpc_hd); void cpc_hd_put(struct cpc_host_device *cpc_hd); void cpc_hd_del(struct cpc_host_device *cpc_hd); void cpc_hd_rcvd(struct cpc_host_device *cpc_hd, struct sk_buff *skb); -void cpc_hd_message_sent(struct sk_buff *skb, int status); =20 int cpc_hd_send_skb(struct cpc_host_device *cpc_hd, struct sk_buff *skb); =20 diff --git a/drivers/greybus/cpc/protocol.c b/drivers/greybus/cpc/protocol.c index 4cda71994d8..4afaf0eb95f 100644 --- a/drivers/greybus/cpc/protocol.c +++ b/drivers/greybus/cpc/protocol.c @@ -14,7 +14,7 @@ static bool cpc_skb_is_sequenced(struct sk_buff *skb) return CPC_SKB_CB(skb)->cpc_flags & CPC_SKB_FLAG_REQ_ACK; } =20 -static void cpc_protocol_prepare_header(struct sk_buff *skb, u8 ack) +static void cpc_protocol_prepare_header(struct sk_buff *skb, u8 ack, u8 re= cv_window) { struct cpc_header *hdr; =20 @@ -24,6 +24,7 @@ static void cpc_protocol_prepare_header(struct sk_buff *s= kb, u8 ack) memset(hdr, 0, sizeof(*hdr)); =20 hdr->ack =3D ack; + hdr->recv_wnd =3D recv_window; hdr->seq =3D CPC_SKB_CB(skb)->seq; hdr->ctrl_flags =3D cpc_header_encode_ctrl_flags(!CPC_SKB_CB(skb)->gb_mes= sage, cpc_skb_is_sequenced(skb)); @@ -47,11 +48,47 @@ static void cpc_protocol_queue_ack(struct cpc_cport *cp= ort, u8 ack) gb_hdr->size =3D cpu_to_le16(sizeof(*gb_hdr)); cpc_cport_pack(gb_hdr, cport->id); =20 - cpc_protocol_prepare_header(skb, ack); + cpc_protocol_prepare_header(skb, ack, CPC_HEADER_MAX_RX_WINDOW); =20 cpc_hd_send_skb(cport->cpc_hd, skb); } =20 +static void __cpc_protocol_receive_ack(struct cpc_cport *cport, u8 recv_wn= d, u8 ack) +{ + struct gb_host_device *gb_hd =3D cport->cpc_hd->gb_hd; + struct sk_buff *skb; + u8 acked_frames; + + cport->tcb.send_wnd =3D recv_wnd; + + skb =3D skb_peek(&cport->retx_queue); + if (!skb) + return; + + /* Return if no frame to ACK. */ + if (!cpc_header_number_in_range(cport->tcb.send_una, cport->tcb.send_nxt,= ack)) + return; + + /* Calculate how many frames will be ACK'd. */ + acked_frames =3D cpc_header_get_frames_acked_count(CPC_SKB_CB(skb)->seq, = ack); + + for (u8 i =3D 0; i < acked_frames; i++) { + skb =3D skb_dequeue(&cport->retx_queue); + if (!skb) { + dev_err_ratelimited(cpc_hd_dev(cport->cpc_hd), + "pending ack queue shorter than expected"); + break; + } + + if (CPC_SKB_CB(skb)->gb_message) + greybus_message_sent(gb_hd, CPC_SKB_CB(skb)->gb_message, 0); + + kfree_skb(skb); + + cport->tcb.send_una++; + } +} + void cpc_protocol_on_data(struct cpc_cport *cport, struct sk_buff *skb) { struct cpc_header *cpc_hdr =3D (struct cpc_header *)skb->data; @@ -62,6 +99,9 @@ void cpc_protocol_on_data(struct cpc_cport *cport, struct= sk_buff *skb) =20 mutex_lock(&cport->lock); =20 + __cpc_protocol_receive_ack(cport, cpc_header_get_recv_wnd(cpc_hdr), + cpc_header_get_ack(cpc_hdr)); + if (require_ack) { expected_seq =3D seq =3D=3D cport->tcb.ack; if (expected_seq) @@ -74,6 +114,8 @@ void cpc_protocol_on_data(struct cpc_cport *cport, struc= t sk_buff *skb) =20 ack =3D cport->tcb.ack; =20 + __cpc_protocol_write_head(cport); + mutex_unlock(&cport->lock); =20 /* Ack no matter if the sequence was valid or not, to resync with remote = */ @@ -87,9 +129,10 @@ void cpc_protocol_on_data(struct cpc_cport *cport, stru= ct sk_buff *skb) } } =20 -static void __cpc_protocol_write_skb(struct cpc_cport *cport, struct sk_bu= ff *skb, u8 ack) +static void __cpc_protocol_write_skb(struct cpc_cport *cport, struct sk_bu= ff *skb, u8 ack, + u8 recv_window) { - cpc_protocol_prepare_header(skb, ack); + cpc_protocol_prepare_header(skb, ack, recv_window); =20 cpc_hd_send_skb(cport->cpc_hd, skb); } @@ -98,14 +141,30 @@ static void __cpc_protocol_write_skb(struct cpc_cport = *cport, struct sk_buff *sk void __cpc_protocol_write_head(struct cpc_cport *cport) { struct sk_buff *skb; - u8 ack; + u8 ack, send_una, send_wnd; =20 ack =3D cport->tcb.ack; + send_una =3D cport->tcb.send_una; + send_wnd =3D cport->tcb.send_wnd; =20 /* For each SKB in the holding queue, clone it and pass it to lower layer= */ while ((skb =3D skb_peek(&cport->holding_queue))) { + struct sk_buff *out_skb; + + /* Skip this skb if it must be acked but the remote has no room for it. = */ + if (!cpc_header_number_in_window(send_una, send_wnd, CPC_SKB_CB(skb)->se= q)) + break; + + /* Clone and send out the skb */ + out_skb =3D skb_clone(skb, GFP_KERNEL); + if (!out_skb) + return; + skb_unlink(skb, &cport->holding_queue); =20 - __cpc_protocol_write_skb(cport, skb, ack); + __cpc_protocol_write_skb(cport, out_skb, ack, CPC_HEADER_MAX_RX_WINDOW); + + cport->tcb.send_nxt++; + skb_queue_tail(&cport->retx_queue, skb); } } --=20 2.52.0