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 E923B43A57; Sat, 3 Feb 2024 05:28:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D41B042E62; Sat, 3 Feb 2024 05:28:13 +0100 (CET) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id E745C402BB for ; Sat, 3 Feb 2024 05:28:11 +0100 (CET) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-5d8b70b39efso2593515a12.0 for ; Fri, 02 Feb 2024 20:28:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1706934491; x=1707539291; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=CqOCr9I6ktJmSw8oMN6Jy/f5M8s0sSVgHbkpKvWYvhA=; b=Y82UoHU6bh5BnkeIPXpUBzA34boO51iMIU6BPimMSyIfjEqeFjgw28UAqmjdRo3vR7 c6ORYFNuxE9IVsvlvZKJUYAjvMLErFLwrCrjBea2KVdH3ggSllq6EYXWh5tZu1xmlAsj GV+Wk8g+hGRe1zmB1annSs0RuQhiys3A5NDxAOyDDAbGREWnpOB0cIfT1qjE1hRnJoqc szF/2CHZGDphhIRptNWxu01BSJzB85luvJsrf+soA9imEOG6VjgLAnjTGCfsufh5/ep/ DYxe2KOvO393sChqG3I39dDBk+9Y/BsWKa2dHryXkoGgNJWQjiKmRMpGXgKtz2tck8On PVsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706934491; x=1707539291; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CqOCr9I6ktJmSw8oMN6Jy/f5M8s0sSVgHbkpKvWYvhA=; b=ZAoMCkDFQh5smh1K7B1fk8lpt+/XpK6dflhb3ylCpaifimTNvTIpcZFQ0XED+sd3YJ RJ8BsLWi+xqnMvVuZ+81XfHj9DfU3v9MsEQI4UJwYZudcP9oBsgDQKBx34dHG8As4pmF llN9SLQzzzvOAiENNU00/iTbPR8F6d5pgpuHYoQp9xq+wigQdj1FPnZH/1XY8diAK2RG KDQv7uqoSCCIUOonzF+frqvSHNhA0J9V8H9olygzbL1A/l947kDkdo6gLrKvDYePkv6V 7Juan/b1xVJ9mamuprr3PnII4HfU/XnWu+F0vf+BuT+ZmellPxFOEZpcNbd2sb9ibOuO JCiw== X-Gm-Message-State: AOJu0YyWeoWxJrgiCQ00ghw3b3H/HrpUl5/WdL0WPvzCWzA1CP0STwsx N3MP5zopqToAX3ZyrkponW2GDMIq5yl0NFZeVVMUMUAmRfv5lXRQmyI9a5hJITk= X-Google-Smtp-Source: AGHT+IHtcmvmcOAJDQbcw/EypgKAgo/jjxNMsUSEb03iQLSib6tB/lZxGMqcaLTRl+SMgonQqVQfIQ== X-Received: by 2002:a17:902:c44b:b0:1d4:caea:5fad with SMTP id m11-20020a170902c44b00b001d4caea5fadmr3206260plm.33.1706934491089; Fri, 02 Feb 2024 20:28:11 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id 19-20020a170902c15300b001d8fe502661sm2414945plj.19.2024.02.02.20.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 20:28:10 -0800 (PST) Date: Fri, 2 Feb 2024 20:28:09 -0800 From: Stephen Hemminger To: Andrew Boyer Cc: Subject: Re: [PATCH 13/13] net/ionic: optimize device start operation Message-ID: <20240202202809.07318f89@hermes.local> In-Reply-To: <20240202193238.62669-14-andrew.boyer@amd.com> References: <20240202193238.62669-1-andrew.boyer@amd.com> <20240202193238.62669-14-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Fri, 2 Feb 2024 11:32:38 -0800 Andrew Boyer wrote: > + memset(ctx, 0, sizeof(*ctx)); > + ctx->pending_work = true; > + ctx->cmd.q_init.opcode = IONIC_CMD_Q_INIT; > + ctx->cmd.q_init.type = q->type; > + ctx->cmd.q_init.ver = lif->qtype_info[q->type].version; > + ctx->cmd.q_init.index = rte_cpu_to_le_32(q->index); > + ctx->cmd.q_init.flags = rte_cpu_to_le_16(IONIC_QINIT_F_ENA); > + ctx->cmd.q_init.intr_index = rte_cpu_to_le_16(IONIC_INTR_NONE); > + ctx->cmd.q_init.ring_size = rte_log2_u32(q->num_descs); > + ctx->cmd.q_init.cq_ring_base = rte_cpu_to_le_64(cq->base_pa); > + ctx->cmd.q_init.sg_ring_base = rte_cpu_to_le_64(q->sg_base_pa); > + 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.