Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4280465ybl; Tue, 20 Aug 2019 09:31:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxMHlbDD7dNLKI+enJtfLv1gr1a8Pg6lD+qx43CdD4fYwv6bvl6wSrU2rjZavjbeQIXim1 X-Received: by 2002:a63:5f01:: with SMTP id t1mr23284559pgb.200.1566318682250; Tue, 20 Aug 2019 09:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566318682; cv=none; d=google.com; s=arc-20160816; b=Dcq8kcj90BvfTLzm3jO6frQajf89ZIWkXV/Srxm6VXPn1eZtwAaC5AGxsLjZshVcK0 EIfV4qA1ys9PtYpVu2DJNqq+Sz1AEc+NB54tcvXNhLpOG0xSYcV0FN3YtQn1PUaS0sEg 8Tn4+3BL1M0qHUzfocb7ecUR7z1FcfincDuxFAw9AUkzAFTRgf6Kp/NzIXpDbJ7DgGGh cBOw4zK3HKbskSyJSKleqZWBZKP6hfc8tQ1ctE4cAVUO/UN1QJbiycB++GFSmEKCdo6w WKWuK6qDqIBGwGB0Yy68VHffb1ybO9YxaPyXADo7bUifj1o1AXUCV6Y0dYqOTks2dzi3 x54Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=unpFzPMywWO68rfoFFYX9S8rEWh+wxA5cn8gEFYw2A0=; b=F6zbfK86sIAHTbJUxwPy+fsFd5RwpLCwemBTLQAq4UjTqC2kVEUEncKk6qOFQRtVvl SLMixZ4QcSQd91w/e+YCu/RC02ZGhh14TME0TbmvDhvNKXwlqo8jtJDvxIP37TWLYNSr k9LJPKr64lmU3+2+XBnY7RKEyIEWiAR2HILuJ8RQb/+7HX/HNWTZByQcJjMpNI2dPt+a HWv7b2K9aN3x9WBGQY3gsD3H6PdVXhM7mG7P9lOVRrqVfsV20ZMW0bEaD8wA8yYhK3kW Mc8FeaezPKlF51GxMjEgHVHgNQGpqMoMkeRulQybGHEgjMMyYMXqqmjVug3J1dY5bgIG 62dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dell.com header.s=smtpout1 header.b=BKGB7dnE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be3si12425442plb.383.2019.08.20.09.31.06; Tue, 20 Aug 2019 09:31:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@dell.com header.s=smtpout1 header.b=BKGB7dnE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730379AbfHTQaB (ORCPT + 99 others); Tue, 20 Aug 2019 12:30:01 -0400 Received: from mx0b-00154904.pphosted.com ([148.163.137.20]:28110 "EHLO mx0b-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725971AbfHTQaB (ORCPT ); Tue, 20 Aug 2019 12:30:01 -0400 Received: from pps.filterd (m0170395.ppops.net [127.0.0.1]) by mx0b-00154904.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7KGG563025076; Tue, 20 Aug 2019 12:29:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=smtpout1; bh=unpFzPMywWO68rfoFFYX9S8rEWh+wxA5cn8gEFYw2A0=; b=BKGB7dnEw2n5kBrvHqgBbsubf40XpiD/rOba5eXfqLv6+3LFlguP3rqIDim2f729wFdO gQYLPmehk5sDtU3OSAZa3KmNBiyl9AvQDMWoC0w9zfWnKoGK9vslimK1szC+aU7hYxc8 HazxyaSvowv2z1aoImhY58rqMntdPCILRuLKaP9bzlHDqFaOzFeJ1NkThem+uX8QF82w /93nfy6TkWdlHlqbAO/Z9VmojJ4aDZcYKVo50HjatjTBzteEVPheXhNkW4WFrpD04Eon MtVi4VKD48A5W7udmmWX05QisAN26b2gJbXwj/NNlT5JvZHu3gMjLYj0LCI+FJ83+lYP SQ== Received: from mx0a-00154901.pphosted.com (mx0a-00154901.pphosted.com [67.231.149.39]) by mx0b-00154904.pphosted.com with ESMTP id 2ugh9gs4ad-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Aug 2019 12:29:59 -0400 Received: from pps.filterd (m0133268.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7KGS6H4192096; Tue, 20 Aug 2019 12:29:58 -0400 Received: from ausxipps301.us.dell.com (ausxipps301.us.dell.com [143.166.148.223]) by mx0a-00154901.pphosted.com with ESMTP id 2uey0sy78c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Aug 2019 12:29:58 -0400 X-LoopCount0: from 10.166.135.92 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.60,349,1549951200"; d="scan'208";a="384864590" From: To: CC: , , , , , Subject: RE: [PATCH] net/ncsi: add control packet payload to NC-SI commands from netlink Thread-Topic: [PATCH] net/ncsi: add control packet payload to NC-SI commands from netlink Thread-Index: AdVWRzWK9Wcjcdd/SW6uTu9wV1cgUQAe69YgAALeARAAKCEBYA== Date: Tue, 20 Aug 2019 16:29:55 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Enabled=True; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SiteId=945c199a-83a2-4e80-9f8c-5a91be5752dd; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Owner=Justin_Lee1@Dell.com; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SetDate=2019-08-19T20:17:25.5740389Z; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Name=External Public; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Application=Microsoft Azure Information Protection; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Extended_MSFT_Method=Manual; aiplabel=External Public x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.242.75] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-20_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908200151 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908200150 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ben,=20 > Hi Justin,=20 >=20 > > Hi Ben, > > > > I have similar fix locally with different approach as the command handl= er may have some expectation for those byes. > > We can use NCSI_PKT_CMD_OEM handler as it only copies data based on the= payload length. >=20 > Great! Yes I was thinking the same, we just need some way to take data pa= yload sent from netlink message and sent it over NC-SI. >=20 > > > > diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi-cmd.c index 5c3fad8..3= b01f65 100644 > > --- a/net/ncsi/ncsi-cmd.c > > +++ b/net/ncsi/ncsi-cmd.c > > @@ -309,14 +309,19 @@ static struct ncsi_request *ncsi_alloc_command(st= ruct ncsi_cmd_arg *nca) > > =20 > > int ncsi_xmit_cmd(struct ncsi_cmd_arg *nca) { > > + struct ncsi_cmd_handler *nch =3D NULL; > > struct ncsi_request *nr; > > + unsigned char type; > > struct ethhdr *eh; > > - struct ncsi_cmd_handler *nch =3D NULL; > > int i, ret; > > =20 > > + if (nca->req_flags =3D=3D NCSI_REQ_FLAG_NETLINK_DRIVEN) > > + type =3D NCSI_PKT_CMD_OEM; > > + else > > + type =3D nca->type; > > /* Search for the handler */ > > for (i =3D 0; i < ARRAY_SIZE(ncsi_cmd_handlers); i++) { > > - if (ncsi_cmd_handlers[i].type =3D=3D nca->type) { > > + if (ncsi_cmd_handlers[i].type =3D=3D type) { > > if (ncsi_cmd_handlers[i].handler) > > nch =3D &ncsi_cmd_handlers[i]; > > else > > >=20 > So in this case NCSI_PKT_CMD_OEM would be the default handler for all NC-= SI command over netlink (standard and OEM), correct? Yes, that is correct. The handler for NCSI_PKT_CMD_OEM command is generic. > Should we rename this to something like NCSI_PKT_CMD_GENERIC for clarity = perhaps? Do you plan to upstream this patch? =20 NCSI_PKT_CMD_OEM is a real command type and it is defined by the NC-SI spec= ific.=20 We can add comments to indicate that we use the generic command handler fro= m NCSI_PKT_CMD_OEM command. Does the change work for you? If so, I will prepare the patch. >=20 >=20 > Also do you have local patch to support NCSI_PKT_CMD_PLDM and the PLDM ov= er NC-SI commands defined here (https://www.dmtf.org/sites/default/files/NC= -SI_1.2_PLDM_Support_over_RBT_Commands_Proposal.pdf)? > If not I can send my local changes - but I think we can use the same NCSI= _PKT_CMD_OEM handler to transport PLDM payload over NC-SI. > What do you think? No, I don't have any change currently to support these commands. It should = be very similar to NCSI_PKT_CMD_OEM handler with some minor modification. >=20 > (CC Deepak as I think once this is in place we can use pldmtool to send b= asic PLDM payloads over NC-SI) >=20 > Regards, > -Ben Thanks, Justin