Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp291444rdh; Wed, 7 Feb 2024 05:08:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhTHKMcwYS1G6dC1ULVukyzqJTFZwsWbF62yLiJx57dCBA4Za8iZlGu228M47WN+2v3ySJ X-Received: by 2002:a17:90a:f013:b0:290:6b49:e6b6 with SMTP id bt19-20020a17090af01300b002906b49e6b6mr2658573pjb.25.1707311282653; Wed, 07 Feb 2024 05:08:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707311282; cv=pass; d=google.com; s=arc-20160816; b=HvLNCnMOVTKSVDT6IUlezeWi5Iao9OumXjO5jnO2ZvnmojG9eElyiJZ6LbIMmMzh7/ ADceeM/RTygnZjXQ71LmIzmLQWkiSmnigCKqZH2BdFM0YrgKKkGY67hKbX3dyPh24zO4 uWlYMTokSwnc59/VWWsNXsu8JUnS2gw2aDG9TebO0fG0k6pqeA5v60hXaE/dG+vK4cna Nnv3EvA36jwZOo8ABMTjFZXbBMWu0nSA6PY/Pp2eRmH+i+FPdP2fAY0Lhgl7iqGH1rXU qpPO9McdMy1we1yyMs3oOrJNt1STu/z4n29t+ZBPCe+scys2xb0loAU3PgLzA7M9ppCZ LTew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:message-id:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=i+6LvWRRQ+oGwS8PzHOPIdJZK+Q6SZrbP24GL7/iBNI=; fh=DSOT3VmCOy6Y+hh9O1Fj6OrYRv7dATJ3xSyEij/cg2E=; b=x9asHKuEaHLEfHYOSQbNH6LX4yDhItrp8Ul+3I1GKj0ITrROritg2+8MtxtuS0HnDr T1xmeqEexlyyCYN67Usjsk2sZjlBRFypM7zrhfIZuF/hIFeFj/xzaaekorS9iPqg1d2w Z97xFSGL5nU003XaXGW/NcxDDeFHx0wR+L6DF1ThAUgieiNgDkX05uIw3iorQaqPntfK Tmw/USrLYgkVScfjATBz1ROlBukTO+J+BBcHE5vSBPtSzaKMCcHvhaIf7PMZD5qEDieS Gc9xmngsIvFMiaJ9dhwI+G6emHR6oBX9tbLcCOL8z8XQ/Nvr4gUoAS/ouf36UlbBUkwJ zXRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Joxw6dC+; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-56508-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56508-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCVbG2LQoQrxAm/EHxE46aELfx1BUFI31yC+hPtS2eYCeQw2/1CFgA5AqfWodTfC4PdQfX8DP4Gkt5voa5PXTk8BkiM17ol6877+OdS2fQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k93-20020a17090a3ee600b00296890c7545si3345825pjc.161.2024.02.07.05.08.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56508-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Joxw6dC+; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-56508-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56508-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2F96DB25A88 for ; Wed, 7 Feb 2024 13:05:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30FD2768F3; Wed, 7 Feb 2024 13:05:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Joxw6dC+" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 0E7C859178; Wed, 7 Feb 2024 13:04:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311100; cv=none; b=JerZZzpe+NEUvVxOHG9yHMcLdaIgcfOC4xkq4jwMFoJTvp3ByAq4OTtDd7a5xtyX6JaYPsnLfQLbeXnmJaR1ExWcaLpVkLpxjfY1CKRPNmMG/tq20jKPdnHLrNwWONestIiUAYdI8QtW2EkxYto5GbGXdElL4/bBpSy/0WziX/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311100; c=relaxed/simple; bh=ous0MH1KPZJPfO8wzVGi7xPdc7ON7llYysO4R/VPbGc=; h=Content-Type:MIME-Version:In-Reply-To:References:Subject:From:Cc: To:Date:Message-ID; b=EaZCHQAE4PRaSQ1cYy4YPRpR/2aS92id1pnMFd8oHcwNGSzpdruEKPAllHOq7gIG6ZwiOB+nC2C5O2mWRbCOOafjcy56qMh+AEKfkOlX8Y2fDfHoBD+QN+U3kCPpJFgE0npEY7jt8PzmHN4ttZrJ6v3VdCoCmugsnajYAc+qQtE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=Joxw6dC+; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pendragon.ideasonboard.com (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A38DEA27; Wed, 7 Feb 2024 14:03:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1707311007; bh=ous0MH1KPZJPfO8wzVGi7xPdc7ON7llYysO4R/VPbGc=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Joxw6dC+Kf6+vZVGbKclT283ZdQpJOdh2McfsJ7j9hSwJrzWJ0mCFzNp40kguAZSq d+P3gY5wwbOHjQvgkliFGKw0g8lTBan1YyTzl+xYjrpsXfPv47FHTdEDMXXcu28wao 2h6QqHA042qlUNs3q14ux6pXti9Cj61yCoC2at9I= Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20240206032301.6e4tmbvmk7vs72gg@synopsys.com> Subject: Re: duplicate requests on host side while streaming via uvcvideo gadget From: Kieran Bingham Cc: linux-kernel@vger.kernel.org , linux-usb@vger.kernel.org To: Michael Grzeschik , Thinh Nguyen Date: Wed, 07 Feb 2024 13:04:48 +0000 Message-ID: <170731108881.252503.6282895768429052406@ping.linuxembedded.co.uk> User-Agent: alot/0.10 Hi Michael, Quoting Michael Grzeschik (2024-02-06 21:30:17) > On Tue, Feb 06, 2024 at 03:23:17AM +0000, Thinh Nguyen wrote: > >On Tue, Feb 06, 2024, Michael Grzeschik wrote: > >> Hi Thinh > >> > >> I found some strange situation while streaming via uvc-gadget to some > >> usb host. It happens when some requests are missed due to higher load = on > >> the gadget machine. In some cases some requests will reach the host > >> twice. In my special case, I added the following changes [1] for the > >> host and gadget side. > > > >Does this only happen to some specific hosts? >=20 > >Are all the data of the duplicate requests matching or just some bits of > >the transfer? Were you able to confirm from some usb analyzer/sniffer > >that the data out the wire is actually duplicate? >=20 > Turns out, this duplicates are just misinterpretations. I'm glad there's no deeper issue to worry about here. > The linux uvcvideo driver will parse the uvc header payload twice. (If > the FID was incremented inbetween). This led to those double misleading > outputs. Although this means that there is a bug in > uvc_video_stats_decode for incrementing the error count. Do you plan/are you able to submit a patch to fix this? Hopefully that would prevent anyone else following the same rabbit-hole. -- Kieran >=20 > Anyway, so just ignore this whole thread and be thanked for even having a= ny > thoghts on this. >=20 > Regards, > Michael >=20 > --=20 > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |