From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by dpdk.org (Postfix) with ESMTP id 277D9293C for ; Wed, 30 Mar 2016 18:48:47 +0200 (CEST) Received: by mail-pa0-f46.google.com with SMTP id zm5so45209165pac.0 for ; Wed, 30 Mar 2016 09:48:47 -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=AH9VbM0DlYuimP/fZhkVb4IlZAI+Lm69jhvYmuE4mcM=; b=E5sk3/b6ygkCJg2VcVZoO6TEcZOgLgW3WFZPuIhFcFCrWFRhXYvtj1w57BYDXUPqV8 FsHsGQFCT+kmbCKfFrRSTqduI0yt3YCSmZUEDspwx8zPvJnpysAbByz9rK3fqcqhfbJE wDCkI+zdH/fBwtvG2BZfLn5fNP+/TTn/XDM1S/1GL5WTzqfNb6ywm/CPJ0JXSiCw0tIS BKzuJyy0fe/8ZOuLvbxgvvcZlSu74sSJBYLRm1QPv8SjlVAoDAlcn5W7zJDrS3czN2xh +utrqo1KEm8s5cquYHdR4AwMUQVIpc3hStOjw6+z72byf+4+VSRxyV7nHz4i/1foREGA 2l0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AH9VbM0DlYuimP/fZhkVb4IlZAI+Lm69jhvYmuE4mcM=; b=JkIUZyzTKAGjY0RWLyOsPQ+B8gn8SIwJ6WfJHFIJFH3vKjQI5HKV7n/PVBC3LvPF4X 1T+Q2zKAbCI3A1Cu6vb4QYCaA/qVkXacjMXPn0SoWbu1NeQw5vBjCvgxr3wVuCDiOVPm rOecPsVLgs3c2uMv9+pS140ElsWBvdfqdGFipgTdweoflayJBqYIXhBCtRDN7/Ara3G3 mGRo3JDr7IV+js+s1RWN7BfHVpF1bWsK5LrY/zBVejcyAuF0LCw1/XD0DmUoC3272hZP O6eq5SHhnBNA5Ol+c0jd9pQo+0TfQdcJJaVlNEnFn+cVN2HNB6h2GnxVTkubvhZAz5Gy gVjg== X-Gm-Message-State: AD7BkJK+cUxOsix7tLKi4R4RD8bNQzXL8iMtejKzXFh+OZWeRGSa8I5nu1f3CQLH8hLDBQ== X-Received: by 10.66.246.165 with SMTP id xx5mr14776508pac.87.1459356526589; Wed, 30 Mar 2016 09:48:46 -0700 (PDT) Received: from xeon-e3 (static-50-53-73-178.bvtn.or.frontiernet.net. [50.53.73.178]) by smtp.gmail.com with ESMTPSA id f65sm7179146pfd.47.2016.03.30.09.48.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Mar 2016 09:48:46 -0700 (PDT) Date: Wed, 30 Mar 2016 09:49:02 -0700 From: Stephen Hemminger To: Rasesh Mody Cc: , , , , , Message-ID: <20160330094902.66658927@xeon-e3> In-Reply-To: <1459315705-25001-6-git-send-email-rasesh.mody@qlogic.com> References: <1459315705-25001-1-git-send-email-rasesh.mody@qlogic.com> <1459315705-25001-6-git-send-email-rasesh.mody@qlogic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 05/10] qede: Add core driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 16:48:47 -0000 On Tue, 29 Mar 2016 22:28:20 -0700 Rasesh Mody wrote: > + > +void qede_config_rx_mode(struct rte_eth_dev *eth_dev) > +{ > + struct qede_dev *qdev = eth_dev->data->dev_private; > + struct ecore_dev *edev = &qdev->edev; > + /* TODO: - QED_FILTER_TYPE_UCAST */ > + enum qed_filter_rx_mode_type accept_flags = > + QED_FILTER_RX_MODE_TYPE_REGULAR; > + struct qed_filter_params rx_mode; > + int rc; > + > + /* Configure the struct for the Rx mode */ > + memset(&rx_mode, 0, sizeof(struct qed_filter_params)); > + rx_mode.type = QED_FILTER_TYPE_RX_MODE; > + > + rc = qede_set_ucast_rx_mac(qdev, QED_FILTER_XCAST_TYPE_REPLACE, > + eth_dev->data->mac_addrs[0].addr_bytes); > + if (rte_eth_promiscuous_get(eth_dev->data->port_id) == 1) { > + accept_flags = QED_FILTER_RX_MODE_TYPE_PROMISC; > + } else { > + rc = qede_set_ucast_rx_mac(qdev, QED_FILTER_XCAST_TYPE_ADD, > + eth_dev->data-> > + mac_addrs[0].addr_bytes); > + if (rc) { > + DP_ERR(edev, "Unable to add filter\n"); > + return; > + } > + } > + > + /* take care of VLAN mode */ > + if (rte_eth_promiscuous_get(eth_dev->data->port_id) == 1) { > + qede_config_accept_any_vlan(qdev, true); > + } else if (!qdev->non_configured_vlans) { > + /* If we dont have non-configured VLANs and promisc > + * is not set, then check if we need to disable > + * accept_any_vlan mode. > + * Because in this case, accept_any_vlan mode is set > + * as part of IFF_RPOMISC flag handling. > + */ > + qede_config_accept_any_vlan(qdev, false); > + } > + rx_mode.filter.accept_flags = accept_flags; > + (void)qdev->ops->filter_config(edev, &rx_mode); Please don't use lint suppressing dummy (void) casts. I don't think GCC or any check tool needs these. Better yet check the return value and log errors.