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 92090A00C4; Fri, 1 Jul 2022 18:34:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C6DA40A7D; Fri, 1 Jul 2022 18:34:23 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id DD8B140A7B for ; Fri, 1 Jul 2022 18:34:21 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id g7so3101771pjj.2 for ; Fri, 01 Jul 2022 09:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0Gpenn6rNd2BFir3+GatO8p6/ONx113cMvMVZSXc51M=; b=Zf1iQYGdw9Y8/gH1/hN3MSw310Zai75UqdoQDZYawGWpari3xtKv+3YYBn598JaDIK Bk4K8uywOZFad8JS0kSWUE4DdmUvHeT/TjgwXRjDQhOq0bITTasPbr24ceddhRnlaHns uQW5pE8q/uBUvhhhKabZc83tALVm6TMwFB/aV5yG+0HXjQbcZDkW/7nMFLzn4GCFZ1DZ P8vnAj/zEv15ajcW+uwxCuRwB7KFdzeIYQzBlm2mLHkqwMJ/+zmdSEV8DTOx43/kPe52 MaKbOXfdELTe+L7E/hxjokGDqKb9nH7YGPwIc0mARHELHxjZIOevtENfgoxrvHUBLK9b CEeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0Gpenn6rNd2BFir3+GatO8p6/ONx113cMvMVZSXc51M=; b=Ig/Q7Oay/QIh6H/9J1FbTUDHjugwuZemZCDzQCgZI/k666VdsbHBq4j6Ce1wh1qIB4 xzj1oZxeHnYuH4Na1OooYtXn9Lq8+F6muLnV4VObTApQynQoehtKHQlmL4SYagO9hLhc 6jfC8AtrowI4IKzTXhWl0DbbgMfVtQDLQO4LinQN/7+MElWY7v5UUeuMNFyODM8IxR5k UaeiWxvUauVjZpRXohlMtqRS+u6DbVds9CcGeBZNP19oD1sRBiYbV0VXR2bcmR49uTIW muezzCIQnoEiNo3HUToxf2mmzv69r0uZ6tsa4WqwK1qkJPgF4KcizBdNINgXEB7Xel8M uQ6g== X-Gm-Message-State: AJIora+T8SSmogBPVPjxHFKqCDrS7cvoKeyF4SasqlZ5N0xAZSTf2bdk uo3R3v3wJdzY8GDrumD8pbRUzw== X-Google-Smtp-Source: AGRyM1tE8mpRWk0r8vfVyV9ihDvnWLSZnfjMStmgpAkUMu4FjyFM9UMfXRbFqZPtMdt7U9EhABf2uw== X-Received: by 2002:a17:90b:3846:b0:1ef:791:efcd with SMTP id nl6-20020a17090b384600b001ef0791efcdmr19121201pjb.125.1656693261156; Fri, 01 Jul 2022 09:34:21 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id s7-20020a17090a13c700b001eca8d0b104sm4190872pjf.57.2022.07.01.09.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 09:34:20 -0700 (PDT) Date: Fri, 1 Jul 2022 09:34:18 -0700 From: Stephen Hemminger To: longli@linuxonhyperv.com Cc: longli@microsoft.com, Ferruh Yigit , dev@dpdk.org, Ajay Sharma , Stephen Hemminger Subject: Re: [PATCH 02/17] net/mana: add device configuration and stop Message-ID: <20220701093418.336f95a9@hermes.local> In-Reply-To: <1656666167-26035-3-git-send-email-longli@linuxonhyperv.com> References: <1656666167-26035-1-git-send-email-longli@linuxonhyperv.com> <1656666167-26035-3-git-send-email-longli@linuxonhyperv.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, 1 Jul 2022 02:02:32 -0700 longli@linuxonhyperv.com wrote: > + > + if (txmode->offloads & ~BNIC_DEV_TX_OFFLOAD_SUPPORT) { > + DRV_LOG(ERR, "Unsupported TX offload: %lx", txmode->offloads); > + return -EINVAL; > + } > + > + if (rxmode->offloads & ~BNIC_DEV_RX_OFFLOAD_SUPPORT) { > + DRV_LOG(ERR, "Unsupported RX offload: %lx", rxmode->offloads); > + return -EINVAL; > + } > + If the device reports the correct capabilities in dev_info.tx_offload_capa and dev_info.rx_offload_capa then these checks are unnecessary since the flags are already checked in ethdev_configure.