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 9AEAD42DFC; Fri, 7 Jul 2023 22:32:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 718344021F; Fri, 7 Jul 2023 22:32:15 +0200 (CEST) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by mails.dpdk.org (Postfix) with ESMTP id CAE434014F for ; Fri, 7 Jul 2023 22:32:14 +0200 (CEST) Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-3463dd0bd4eso8218575ab.1 for ; Fri, 07 Jul 2023 13:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688761934; x=1691353934; 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=NL3cGbfwER9PRoUlP9cBxojoP4VL7bL2Lnsf7ehyiX0=; b=UZpiaBMBGv5oa53kWPpMa9uRGVYaN3PGAlgVTA8rHz03WezCxA1jO7GRgoWX25h2Ut 50hAv8+8wYafbRyvAfJpVEo1zE3TgJKL2nhyD0ikpGT/jDPdZsmhbeuvDFE+QufTaQ+e gx0/Ms0N3DTDiwWBFfEcVH1FtQotx/GkYFg/TLHht9k9FG4e3mAioKDVhNICYFxu1h5N 8ePgWZu/OVeKFf3/ROytw+WzdTJ8Ix5PpD6N4u/O13iLLWs8QSd38236dYcjudAjf/Dt snZNGYDZlUPYGheFHwQah98z9Aj3bD0/jiE+by9dD2m7EbuJ8B54zVpXg4wsNwfG3Y14 VHRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688761934; x=1691353934; 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=NL3cGbfwER9PRoUlP9cBxojoP4VL7bL2Lnsf7ehyiX0=; b=Si0ldLqjX1lsYkBgHeqLooBJNk+A/ku0MzAYKz56sD1TqP/Va1wk66xOuaD/+jXV/n xI/eSHKhRowfu87ReVTIWxL84cjBTuMb1xfd5xMEKsE8+ve58uYNA2kPBqyf0pAg/3F3 8btvE5oxNoWgT/g3RwDkoLGHDxcjpPf0fuj8PvxreLrmdJhG7jQcZji42F1dx+rsiIkB tLW++SG+R1+avOeTDN5d1vo4pspP5qD/7wL7zF/k+Z2lDoQ1PWR2NUGFcFWSIB9vhE3N F29rHrAWF43jvThoLFRj6R6sL26vXJgsHUQu1vm8kVJYtxkLoH1Hbfic6iD2dDe9MBVa iyBA== X-Gm-Message-State: ABy/qLaefBTvFdrzEJnXMRUcJaXiNbIF1jdAGP5qrhHbN4mVvOyH/JJ4 lHmy3Nlvyluqoniv94gx5uCO4w== X-Google-Smtp-Source: APBJJlERXXQD7MRkR3bbOsAsrvy5oMYsYbJLy49RWTtTA2KpH9NiVFbGhELrRUIU/R1gI7Yf8/Wb9w== X-Received: by 2002:a92:dc0e:0:b0:345:c050:b25f with SMTP id t14-20020a92dc0e000000b00345c050b25fmr5677827iln.20.1688761934201; Fri, 07 Jul 2023 13:32:14 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id c8-20020a633508000000b005579c73d209sm3313023pga.1.2023.07.07.13.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 13:32:13 -0700 (PDT) Date: Fri, 7 Jul 2023 13:32:11 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: dev@dpdk.org, Akhil Goyal , Fan Zhang Subject: Re: [PATCH v3 04/14] test: cryptodev use rte_pktmbuf_mtod_offset Message-ID: <20230707133211.56dbb39b@hermes.local> In-Reply-To: References: <20230505174813.133894-1-stephen@networkplumber.org> <20230706175938.62721-1-stephen@networkplumber.org> <20230706175938.62721-5-stephen@networkplumber.org> 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, 7 Jul 2023 13:46:07 +0100 Ferruh Yigit wrote: > On 7/6/2023 6:59 PM, Stephen Hemminger wrote: > > Based off patch generated by cocci/mtod-offset.cocci. > > With some cleanup to shorten lines by using conditional > > with omitted operand. > > > > Signed-off-by: Stephen Hemminger > > <...> > > > @@ -5163,9 +5169,9 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata, > > debug_hexdump(stdout, "ciphertext expected:", > > tdata->ciphertext.data, tdata->ciphertext.len >> 3); > > > > - ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *) > > - + (tdata->digest.offset_bytes == 0 ? > > - plaintext_pad_len : tdata->digest.offset_bytes); > > + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, > > + uint8_t *, > > + tdata->digest.offset_bytes ? : plaintext_pad_len); > > > > As far as I know "x ?: y" support is gcc extention, what about sticking > to standard syntax? Already used five places in DPDK, so didn't seem like a problem.