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 6E96641D5F; Fri, 24 Feb 2023 17:29:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A1DD40697; Fri, 24 Feb 2023 17:29:12 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 6D54B40693 for ; Fri, 24 Feb 2023 17:29:10 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id ky4so52776plb.3 for ; Fri, 24 Feb 2023 08:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=F5H03CD/ZreqXD9/Gs+cvfQHJNBfrQ5B77l3vI9HCSA=; b=d1ySuckfltavvq0XhmeGXR9iGDQ01nOy4jCt/rxq5/J6zQjeux+tO5jLm288xHfaoT HVa3kgTrBhOmIz6AST1W5dtTwvhgnm93uq7Qv1FhBAJYhV4zaNQ06LcNE5UuYvUuF5UH nCwH/Tdg3fTrcaAgTT5ou2Wm/DGUDAOzm804YqAX3pSzfBAbshtXIcGRt0IsanHUAXfr 15Y484hZtmt4oEjfHMEot/g+KW+xp2RcLijTIyvxJ9YlhG3G9FQHuevhVm6nXhIHoqN6 lrb8p11eorNeLlwCiigy+FKm/IvgAw0MNXQxTpeRF3XSnyewpdGWt5C3b210MPakZfkD jdKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=F5H03CD/ZreqXD9/Gs+cvfQHJNBfrQ5B77l3vI9HCSA=; b=5jDEzF4CRbh5SFANQ69kwgPz2j0lyojt9dk71ed2dMtq8JXwLRTAjaHtN4Os7vmPxb KPrHAP5HhTkOa375xOcJLTvgoxKV5LDCUOcEv9U8Atu36jF86WSA9r8vrzIczyrhI4eH nf1wz0KnZzQDoJAjkVna///9bg8U2vKJkefx5AScORG1P4JkCDUpG2ySU+kwryC+/JuD 5nhP8VsTSEU7Gxs5ifsOab7Q+BZP2hanpe+NCq0VQ4DVTlM/AdrETXwUKrcLJCy4z6/i B+P/K2ezeuuvzHCDKG2Vs2MtEPZfcqOzSf0Xf06sv+PuQzObgbxAupbC+UzDgBPfpD9e Sd5w== X-Gm-Message-State: AO0yUKWr0zk9WwPyjL+SRc651LLvOM9LwYjDRewrpheZ6qv42kkSqjZD Dshw201QIImnTdOXJ71NgNiZxA== X-Google-Smtp-Source: AK7set8jCvsWKfx217Ag5ibUvnzcPB56RF2EI9if5T/e5Vm0QlPosqxlhfm0JdDWNITY/WUMESuwmA== X-Received: by 2002:a05:6a21:99a8:b0:c6:babf:e48f with SMTP id ve40-20020a056a2199a800b000c6babfe48fmr20088958pzb.19.1677256149409; Fri, 24 Feb 2023 08:29:09 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id v23-20020aa78097000000b0058d54960eccsm8813980pff.151.2023.02.24.08.29.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 08:29:09 -0800 (PST) Date: Fri, 24 Feb 2023 08:29:07 -0800 From: Stephen Hemminger To: Tanzeel-inline Cc: olivier.matz@6wind.com, thomas@monjalon.net, tanzeelahmed713@gmail.com, dev@dpdk.org Subject: Re: [PATCH v3] lib/net: add MPLS insert and strip functionality Message-ID: <20230224082907.004773be@hermes.local> In-Reply-To: <20230224112521.27-1-tanxeel1.ahmed@gmail.com> References: <20230219224334.309-1-tanxeel1.ahmed@gmail.com> <20230224112521.27-1-tanxeel1.ahmed@gmail.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, 24 Feb 2023 16:25:21 +0500 Tanzeel-inline wrote: > + oh = rte_pktmbuf_mtod(*m, struct rte_ether_hdr *); > + nh = (struct rte_ether_hdr *)(void *) > + rte_pktmbuf_prepend(*m, sizeof(struct rte_mpls_hdr)); Don't need void * cast. Can cast result of prepend (char *) to ether header directly. Note: rte_pktmbuf_append/prepend should have been written initially to return void * to reduce the number of casts.