Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp712389lqj; Sun, 2 Jun 2024 19:47:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdtD2GbPliief7a2mjG2HNwOn9FdAmmJ7f9zAqkFFOj8SxD2SWc/0BZXaiYSSe+Pjzlq4/1SrPWS4WiTK4WG6geRkyV6G28qfG5puKbQ== X-Google-Smtp-Source: AGHT+IFgs2kH248O78PifPwAv8aEh3u/IIo76McQcLbzYpPwzKVLk9j0TBZvznU4W5MQnVcd7LQl X-Received: by 2002:a05:6214:4988:b0:6af:67b3:9cf3 with SMTP id 6a1803df08f44-6af67b39d20mr43482756d6.40.1717382858527; Sun, 02 Jun 2024 19:47:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717382858; cv=pass; d=google.com; s=arc-20160816; b=DnQfyE23makBilN5PjJqYvflNDznvbho1UzR6Wew4t8uFYuyOuS8ts1kgKUEi80ZQo bYv0zL1BapsbEmrNDhDXRKH/OJWffd83cn2ShsYpXfoXmwawVgHxxkF+tnSuotqWvYPa NjRN3uBJvZ9kdcMXVqrPP+lTDW7bZ7wcQjRNh4MmPU8b+n7z/YmqNrrpsuqXu4nqYg75 bxc+LgZhf6ZCRKhC8x+aJkPVaXXd/KqSp4/8Bkzm3IGkg3TH2xdpFdvkNjHBQORsrf5i tL37UA68y1WwgV4jEx4ZOZaeHsBtQh8yu6Lzuui8VRNdcbT0GhWCn+XeCVc0+LrGJlgI B9HA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Q4F8EDSKxCHWPtiAZk6DlscnSsk75S8hh8hQFs1rs8g=; fh=T27QnONB81A+Cjn+MTd5LSsVmiM+pe1FYthz2KpViJo=; b=TZecnOQF6IjMwTSqAED8MxKLLu5+SmtOV+iQaO0J+r7vFGdBP3XzszLyfzAmCTe5/4 SqOCqL82ICcGtjK7sOU8adC2Lk+MXB7SFH6m72wHV+g0YV/7vZMAvEhzNYdtszlOeOa4 wkx1xtgusu3m1ow8S1vIrTJcLhfwYN+6WtlG8CfPkyhffJqwhFv0d9it8rUsG7EMl290 pZhDzcw7TpCOpdMuNn9RsDbrgicA2btO23jegjf+Rgh3eTXIKv04GATAHap/BgnUHo4N kBl1p45FKdH6z/1BSIxrSSJeDVV8tCWJXP8+YN7QxARtFff0fqNTn0xC1lGKmyxHZJDK 23dg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TdoyQ8FC; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8389-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8389-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b402108si78505176d6.275.2024.06.02.19.47.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 19:47:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8389-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TdoyQ8FC; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8389-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8389-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 38DD91C20613 for ; Mon, 3 Jun 2024 02:47:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04E19F9E9; Mon, 3 Jun 2024 02:47:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="TdoyQ8FC" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 078B7F9E6 for ; Mon, 3 Jun 2024 02:47:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717382855; cv=none; b=nSTBACr22VpmRqWxpLgKdKhYbFxNW5d9raO41g8Y3JYU2Aol5Hd2f/UoIkdjdZaTzefpA0HyefHDWJGext/V3/gKl3kg6/ZgnrIWWqgsVT9T0vg2WOGghPB9CZRpwsybDXkg3U1JQQHHLvvdHrhsh3UPpPtdEuSmLutK3HMVMDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717382855; c=relaxed/simple; bh=MV5/di/VX2af1s335wKKbMAmVjxNVlw1JGJ3Ba6/E7Y=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=er925SVGoDKct/91OU0yLJkxEfjrhI5KlgorhEGNvu9VbSAARLf9+JsgiUVKaiJubOi8XzJ3LtRnDraeGq3AmjKCrVM/0Yb1u4MECNbzmijQXllWsErEdVKGchpsa9vrqglsc4VUpNjnf4YM0QvGlCBPTez0JT+cwGz0mK36HDo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=TdoyQ8FC; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4530TiOU004549; Mon, 3 Jun 2024 02:47:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Q4F8EDSKxCHWPtiAZk6DlscnSsk75S8hh8hQFs1rs8g=; b=TdoyQ8FCtxC7HWcO QjfL07EJll/W+IuEiEhKvPo0WHoT1FkXnZMr5ATT30jANDQEq1y+LDlCngLY0ch3 8XHjsrgN+DOyWuaMUf8Qhi8PCaH1iu/9+tUoZ+XP+gUGJLXfY5zbzeoyPB7VtoXr TC7OIQSNioyfaLstgcYfQGsiMXwVee6cq+6ZRiGzvDhDmLDEg1QgI6VeJb59vPmB ctF1sDux6YE+lyRdiVZfUon840lxaY2t3YKnoAaGED33h/AQ45xB0ALPmV77+TyA kwNnL/u1MAe+AtbpbbyXGprZrTxS/18TzBdmgv8UkUi2vzvgm0bouGZCznRu8i1H Vc/yyQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yfw4ajypg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 02:47:21 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4532lKls020329 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Jun 2024 02:47:20 GMT Received: from [10.231.195.67] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sun, 2 Jun 2024 19:47:19 -0700 Message-ID: <8559ced4-cc59-4cbb-83c1-92bf7401cf0d@quicinc.com> Date: Mon, 3 Jun 2024 10:47:16 +0800 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 6/8] wifi: ath12k: support ARP and NS offload To: Jeff Johnson , CC: References: <20240530072714.25671-1-quic_bqiang@quicinc.com> <20240530072714.25671-7-quic_bqiang@quicinc.com> <17721436-19fb-4337-9058-b20f4df2792c@quicinc.com> <29f1a482-2ead-474a-93a1-00616bcf06f8@quicinc.com> Content-Language: en-US From: Baochen Qiang In-Reply-To: <29f1a482-2ead-474a-93a1-00616bcf06f8@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: mYm0kOkM7P8dBvFc90U8jHw74peKibhY X-Proofpoint-ORIG-GUID: mYm0kOkM7P8dBvFc90U8jHw74peKibhY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-06-02_15,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 mlxscore=0 bulkscore=0 spamscore=0 adultscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406030023 On 6/1/2024 1:26 AM, Jeff Johnson wrote: > On 5/30/2024 10:11 PM, Baochen Qiang wrote: >> >> >> On 5/31/2024 11:42 AM, Baochen Qiang wrote: >>>>> +static void ath12k_wow_prepare_ns_offload(struct ath12k_vif *arvif, >>>>> + struct wmi_arp_ns_offload_arg *offload) >>>>> +{ >>>>> + struct inet6_dev *idev = arvif->idev; >>>> as noted above does it make more sense to get the netdev associated with the >>>> arvif and then use in6_dev_get(net_device) to get the inet6_dev rather than >>>> caching the pointer from the ipv6_addr_changed() callback? >>> Ah.. I didn't note that we can get inet6_dev in such a way, just thought the only way is to cache it in ipv6_changed() callback. >>> >>> will get it using the following in next version: >>> struct ieee80211_vif *vif = container_of(arvif) >>> struct ieee80211_sub_if_data *sub_if_data = container_of(vif) >>> struct net_dev *ndev = sub_if_data->dev >>> struct inet6_dev *idev = in6_dev_get(ndev) >> Just found that ieee80211_sub_if_data is internal to mac80211, so not possible to get netdev in this way. >> >> any other ideas on how to get netdev? > > Thinking about this some more, it seems like you'd want to send these down to > firmware immediately so that they'd be available for NS offload. Does firmware > support NS offload even when host is awake (I think the downstream Android > driver supports that)? Checked with firmware team and they confirmed it is supported. But do we really want to do this? Any benefit from offloading when awake? And won't there be any issues? at least it would make me confused if a arp/NS request/response pair are seen in sniffer but neither of them seen in host ... > So perhaps an alternative approach is to collect the information you need from > the notification and then schedule a workqueue to actually send the > information to firmware?