From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 86599A00E6 for ; Mon, 15 Apr 2019 17:54:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B563A1B39F; Mon, 15 Apr 2019 17:54:40 +0200 (CEST) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id 53DF31B2AE for ; Mon, 15 Apr 2019 17:54:39 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id y13so8789788pfm.11 for ; Mon, 15 Apr 2019 08:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OkQvjgh8yya1EYqVQ3IxSVCHqrF17ckCw0dnfP/c3LQ=; b=040sNJyNnXhaPEkMkn9lBtnkBK0YXbQzONlnOyRsudTXrcylWk/ttf/z7hDw4XsOwK Igq4sDANSrB3Jj0BWqaqFUHfOgh592edRgpnT4+u4LFRJh7eygst8Nfr47mTRr0B8JNH QMbP+25F74Akh7xiTRoellcEPkcd17v1Ez4HjG4ohDaMbUhiXR/uoknmInUgA+f460/j N06wdA/AhL2gp5p0CeF4R4by+14CsA6pA0Ve1eDs0R12e+SXzuabcoUDFihOPTtoXkAo 1ZQmjuyOlq1tEKMITf4Z1pC9FWOVVyJ4EhDql8OFOKsnFN/SaD8ybyW4T19Jf71OkjwO +9tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OkQvjgh8yya1EYqVQ3IxSVCHqrF17ckCw0dnfP/c3LQ=; b=RzL9dr9IngXYYUkqlvCncMaZEm+0YIEQFZNcO+kLfZLHYFkQ7P8ciPGmq/JzUtFYQ4 FwqzEfC3j3Gh+dqFLc33Whee5OeNjGrI/rGnjV6KQLmQFSD56vKBsamCPK2JZpMTLGnq OL40cTtEtTHELpOAHR3ZDjCkk2/jxOQy0eCd8NZ7WmOVXRnJGsgv9jsOO1BuAT+xHFcp vmijD/53yHD5NXFICAMugRgxujHfzd4KcsT76N7Zsq/6644FoZbALMtZSFqproxwIQGd UShZJm3Ue5MFMQpJku1fjdROGRcQUecS+gJ0gNrPlzwJrcpZvYHcUZrilmIZo+Csr570 A+dw== X-Gm-Message-State: APjAAAUIl8TFwQyax+LPZC4Th1pOWgV9i0gf4hZ6yKmC2LklhwIhFnNU RxEu06TY2f/vnvaeLme5mpxDVQ== X-Google-Smtp-Source: APXvYqxUgBBCy3DJ51ZItN3ETT29gFH6Hw3FZxuD2jeW9wDomngPFr3D2667bzYiDNKR3zJqdcBwfQ== X-Received: by 2002:aa7:8289:: with SMTP id s9mr75681313pfm.208.1555343678559; Mon, 15 Apr 2019 08:54:38 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id e8sm104284272pfc.47.2019.04.15.08.54.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Apr 2019 08:54:38 -0700 (PDT) Date: Mon, 15 Apr 2019 08:54:35 -0700 From: Stephen Hemminger To: Cc: , , , , Message-ID: <20190415085435.3f616c8c@shemminger-XPS-13-9360> In-Reply-To: <1555240302-9771-1-git-send-email-viveksharma@marvell.com> References: <1555240302-9771-1-git-send-email-viveksharma@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] ethdev: fix QinQ strip offload support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190415155435.nbscH2DwOpprJoySxQBF9EJkn-P7p9jZXlytBkmRB6o@z> On Sun, 14 Apr 2019 16:41:42 +0530 wrote: > > + cur = !!(offload_mask & ETH_QINQ_STRIP_OFFLOAD); > + org = !!(dev->data->dev_conf.rxmode.offloads & > + DEV_RX_OFFLOAD_QINQ_STRIP); > + if (cur != org) { > + if (cur) > + dev->data->dev_conf.rxmode.offloads |= > + DEV_RX_OFFLOAD_QINQ_STRIP; > + else > + dev->data->dev_conf.rxmode.offloads &= > + ~DEV_RX_OFFLOAD_QINQ_STRIP; > + mask |= ETH_QINQ_STRIP_MASK; > + } > + > /*no change*/ Using a local (pointer) variable for dev->data->dev_conf.rxmode.offloads would make the code more readable and lines shorter.