From: Stephen Hemminger <stephen@networkplumber.org>
To: Rasesh Mody <rasesh.mody@qlogic.com>
Cc: <bruce.richardson@intel.com>, <thomas.monjalon@6wind.com>,
<dev@dpdk.org>, <ameen.rahman@qlogic.com>,
<harish.patil@qlogic.com>, <sony.chacko@qlogic.com>
Subject: Re: [dpdk-dev] [PATCH v4 05/10] qede: Add core driver
Date: Wed, 30 Mar 2016 09:49:02 -0700 [thread overview]
Message-ID: <20160330094902.66658927@xeon-e3> (raw)
In-Reply-To: <1459315705-25001-6-git-send-email-rasesh.mody@qlogic.com>
On Tue, 29 Mar 2016 22:28:20 -0700
Rasesh Mody <rasesh.mody@qlogic.com> 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.
next prev parent reply other threads:[~2016-03-30 16:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 5:28 [dpdk-dev] [PATCH v4 00/10] qede: Add qede PMD Rasesh Mody
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 01/10] qede: Add maintainers Rasesh Mody
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 02/10] qede: Add documentation Rasesh Mody
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 03/10] qede: Add license file Rasesh Mody
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 04/10] qede: Add base driver Rasesh Mody
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 05/10] qede: Add core driver Rasesh Mody
2016-03-30 16:39 ` Stephen Hemminger
2016-03-30 22:16 ` Harish Patil
2016-03-30 22:37 ` Stephen Hemminger
2016-03-31 19:36 ` Harish Patil
2016-03-31 21:51 ` Stephen Hemminger
2016-03-30 16:40 ` Stephen Hemminger
2016-03-30 22:23 ` Harish Patil
2016-03-30 16:42 ` Stephen Hemminger
2016-03-30 16:43 ` Stephen Hemminger
2016-03-30 16:45 ` Stephen Hemminger
2016-03-31 7:03 ` Harish Patil
2016-03-30 16:47 ` Stephen Hemminger
2016-03-30 16:49 ` Stephen Hemminger [this message]
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 06/10] qede: Add L2 support Rasesh Mody
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 07/10] qede: Add SRIOV support Rasesh Mody
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 08/10] qede: Add attention support Rasesh Mody
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 09/10] qede: Add DCBX support Rasesh Mody
2016-03-30 5:28 ` [dpdk-dev] [PATCH v4 10/10] qede: Enable PMD build Rasesh Mody
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160330094902.66658927@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=ameen.rahman@qlogic.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=harish.patil@qlogic.com \
--cc=rasesh.mody@qlogic.com \
--cc=sony.chacko@qlogic.com \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).