From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C37043A72; Mon, 5 Feb 2024 14:21:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A101402BE; Mon, 5 Feb 2024 14:21:52 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2083.outbound.protection.outlook.com [40.107.96.83]) by mails.dpdk.org (Postfix) with ESMTP id EA02A402A2 for ; Mon, 5 Feb 2024 14:21:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fyIWMdQtB/6sFVaYOBnkV5qFHfQlMlH9XedSdtV/OujhS+G7aTwRSyMLz43ZUxMKa0MT43B7eRhNHYDwlK+60M7uVGNtTOkJCLujuam61KXLuqcKDwYYoRY6z2FJiqS1XXQ88FAf5XVNqG7lI6IILyxNDAnRGSHT/eLH1yeXumzGgLY7YUB+AHgFeF8WPO1l+Q421RkAaQmR0kG9vOd8da4kblgWKOrHkt1u41LT6yGyhSC6ytz7UjiGuUn+L3XE8iA+bZXLHf3O8KxPZbgtNtl/GWucH7UJgqAQgJow3U78hSkSWlCdc52XXsKMzb3Ltn+Rz+EPWKrbqOea/VL6fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=sMIYIAQ9HbTGJzNK1POqOVvMfnyXqUv7BsVrq/f02sA=; b=HoWdxVo/wjY7tMndXFRKAicLuf86uomGNH7w32781LG0c4VcjDx2fmMP/m6jb/ssRyNHtm+TFjhdQtiDkDHChlJY/w45g345o/qtcWTmDkUNjjsuZ5O8NhOFVuMwdslAb8jc5tmWSYQvTPHcCcjD1Swr0nlxfW+seqdnXdV4vEuArXlJW8f1qVsv0FP4NZ2Bh22DHrJVx9MYHV6MQ4ly8auobuMrM4rvYAJqv+tcidB2qRcPgcGQ1M0Rsrv0lpmoWrEFkse5EmWWqUkR5BoS8b0dDDsGXVGk/LhjLBxD5TLayYTkgF1A2TY3Y2ftP8ODzF0gYyQSlUlY/akZq8Oa5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sMIYIAQ9HbTGJzNK1POqOVvMfnyXqUv7BsVrq/f02sA=; b=TxuRjo+80mJX2INvuTSLhZ6DsDWwIFcOb8ShqljH8xqJKeahKUNY4G65Qv7kpDRhC1QcsTF4H/N8gDtJ3qqMeH4vSvg6kRUX4NwqITooVKNVbBgIHi1BSvHupKxyQt24WcbCSPvDOdquhtNNA1tbFeM/xStGpNqg8mNw965uP6o= Received: from MW6PR12MB8999.namprd12.prod.outlook.com (2603:10b6:303:247::8) by CH3PR12MB9282.namprd12.prod.outlook.com (2603:10b6:610:1cb::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.11; Mon, 5 Feb 2024 13:21:44 +0000 Received: from MW6PR12MB8999.namprd12.prod.outlook.com ([fe80::b2d3:710f:1b2e:81ef]) by MW6PR12MB8999.namprd12.prod.outlook.com ([fe80::b2d3:710f:1b2e:81ef%4]) with mapi id 15.20.7270.012; Mon, 5 Feb 2024 13:21:44 +0000 From: "Boyer, Andrew" To: Stephen Hemminger CC: "Boyer, Andrew" , "dev@dpdk.org" Subject: Re: [PATCH 13/13] net/ionic: optimize device start operation Thread-Topic: [PATCH 13/13] net/ionic: optimize device start operation Thread-Index: AQHaVg65C9K9XzYN1ESGcw5FlBV7LLD4BqqAgAO5sYA= Date: Mon, 5 Feb 2024 13:21:43 +0000 Message-ID: <2872EF1D-23D0-4EDF-8CB0-338386476840@amd.com> References: <20240202193238.62669-1-andrew.boyer@amd.com> <20240202193238.62669-14-andrew.boyer@amd.com> <20240202202809.07318f89@hermes.local> In-Reply-To: <20240202202809.07318f89@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW6PR12MB8999:EE_|CH3PR12MB9282:EE_ x-ms-office365-filtering-correlation-id: e37aec73-63ee-4965-dd57-08dc264d65a5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AG0vAgjjTZK0P3X3jCAviE8h6tAbq4Mk006S+zh2EDTwiTaeNb+6fPK1RQ+m+Gm5gqohrfZ034sleorR0CsI4jB+k1rtjW8UwRY7HHpIUploedTx7IQqxCJfK98PMQz9CrsKF3EluAjgFWK7m2Icwew5LSXDbY6FVEsDwtCCcImbW+O1CgsDAhRhWm2hYTY52U7QzSzbY7eiUTtOmLFeuK34KsHnbc83sBS2/sCeMnpR+dPqGgxlpQ7UF7WGDtG2sJjFbtBpuesExhjIwuCZ0mDw44XI423jn4p09Ju8uEEzYHdCJBradFrpLlSE/4wmh305Iv2GV2C786VzlXlgFTFyMQYcU6jQ1ID74XKag7O57piNTjzH6YWLfVy4AL0Z7mT4Gzxq844scU35tR7lM5qGlCYUviJAG3cl0Tuy+1YNX975SVIkjZ5YZBvFVszfkzslrBJR8U6WYyw9fXyr+pqtGYxbx8v+QiR1c2adC1sXuOffXk5jS62U5XvvsyHm+z1Lr0ocFfLUDrcPwa8L43ngcmACGJ5bWuLIPjREilgOiB1Dzvbl5pDaEwaXbsFYYtGApAnPK0ARt4/ablubI26pu/LfY0tF5wrRH0fQyIUywebgXormhdDV2gC1nDoAE9dYJjEpqm8KnjfdoKrbaw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW6PR12MB8999.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(376002)(136003)(366004)(39860400002)(346002)(230922051799003)(230273577357003)(1800799012)(451199024)(64100799003)(186009)(83380400001)(38070700009)(6486002)(33656002)(2616005)(86362001)(41300700001)(66574015)(66556008)(6512007)(122000001)(36756003)(6506007)(38100700002)(8676002)(26005)(8936002)(6916009)(54906003)(76116006)(2906002)(66476007)(66946007)(53546011)(64756008)(478600001)(66446008)(316002)(4326008)(5660300002)(71200400001)(45980500001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?s/5rnfFshJVxULqfaaqbTYr/l9/E4jGYVCEFuePwTptqgkfNWU5kdOJUkSmN?= =?us-ascii?Q?yQqEwEjNN52xpr3JwHRDlOu6m3DhU0igq1Nr7hilPNhp8Oks0fpPL2UNcCKW?= =?us-ascii?Q?yAf2lsXs3cTPk/K/Y+jOwipfbFH62bYA1bwmJ8vLBkoMFaoJcsMkPg2pa6K8?= =?us-ascii?Q?V5Q4rzzM8D9EMe9bvCJSpmQIppX4880wayQPsa3I5dX2XQaKcY3VBoZlgiid?= =?us-ascii?Q?dqsn4eYKfJi+GC+03O6zm2cbg+VybKjVuFHgyw2dwUVOHFq07aSzm0SDsdoX?= =?us-ascii?Q?76dE+JR7I8ZTz1AhcayWJDA5MuJ2N5Uyst3z6/yFybeqLWiLif+JLiWJkBUg?= =?us-ascii?Q?rQHgq4PtVDg5nX/U2CAtIRcRFnEdQyk7XywhwQlB7Hiv5pt+BzrMxjHJB1gF?= =?us-ascii?Q?bKFNNwXWeZQd9baU/v1YevkZ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TJ0Pvzs?= =?us-ascii?Q?Uo3EhRmAvfhBxqHoxwE088D75SK6IVi/YGQT+NFiFN7WdQSgM6A/9kaZAtri?= =?us-ascii?Q?o2bhcvrys7DZ5r4IxaJjMKsRhzB2oOWzkaD8VKM1+wZVj5J+kLarVUvtv/Eb?= =?us-ascii?Q?httVJHZB6gNCDN8htpLORo+KR2KC6f1tPtgwJTomOpzLw1ZLlXiuMRbEo0By?= =?us-ascii?Q?4V6v16msdbCx1O7pwkXTnmkKC3gFVPgMCHrAlE138W05zY9udrvZAQsaq52x?= =?us-ascii?Q?B5LI713JRsmSZ/YJ46gSU2InG2RjyKhRgfwBtfLC?= Content-Type: text/plain; charset="us-ascii" Content-ID: <631A9AD1AF84E24B961568360A62D223@namprd12.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW6PR12MB8999.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e37aec73-63ee-4965-dd57-08dc264d65a5 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2024 13:21:43.9011 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FOIRMQw0nyy7RcvaqFuLOytITd+Oohx9S1IYsio6mQbVHFBnSw/QxcwxYOCMyRs1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9282 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > On Feb 2, 2024, at 11:28 PM, Stephen Hemminger wrote: >=20 > Caution: This message originated from an External Source. Use proper caut= ion when opening attachments, clicking links, or responding. >=20 >=20 > On Fri, 2 Feb 2024 11:32:38 -0800 > Andrew Boyer wrote: >=20 >> + memset(ctx, 0, sizeof(*ctx)); >> + ctx->pending_work =3D true; >> + ctx->cmd.q_init.opcode =3D IONIC_CMD_Q_INIT; >> + ctx->cmd.q_init.type =3D q->type; >> + ctx->cmd.q_init.ver =3D lif->qtype_info[q->type].version; >> + ctx->cmd.q_init.index =3D rte_cpu_to_le_32(q->index); >> + ctx->cmd.q_init.flags =3D rte_cpu_to_le_16(IONIC_QINIT_F_ENA); >> + ctx->cmd.q_init.intr_index =3D rte_cpu_to_le_16(IONIC_INTR_NONE); >> + ctx->cmd.q_init.ring_size =3D rte_log2_u32(q->num_descs); >> + ctx->cmd.q_init.cq_ring_base =3D rte_cpu_to_le_64(cq->base_pa); >> + ctx->cmd.q_init.sg_ring_base =3D rte_cpu_to_le_64(q->sg_base_pa); >> + >=20 > memset followed by assignment is technically slower than structure > initialization because it requires two writes to the data. > But the optimizer may in some cases figure that out. Thanks for looking. Since DPDK requires C11 now, and I see other users of c= ompound literals in lib/, I'll respin this to use that instead. (The internet says unset fields are implicitly initialized to zero, hopeful= ly that's correct.) It makes the diff a lot cleaner, too. Thanks, Andrew=