[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-31 Thread Harish Patil
>

>On Wed, 30 Mar 2016 22:16:51 +
>Harish Patil  wrote:
>
>> >
>> >On Tue, 29 Mar 2016 22:28:20 -0700
>> >Rasesh Mody  wrote:
>> >
>> >> +
>> >> +static void qede_print_adapter_info(struct qede_dev *qdev)
>> >> +{
>> >> + struct ecore_dev *edev = >edev;
>> >> + struct qed_dev_info *info = >dev_info.common;
>> >> + char ver_str[QED_DRV_VER_STR_SIZE] = { 0 };
>> >> +
>> >> + RTE_LOG(INFO, PMD,
>> >> +   " Chip details : %s%d\n",
>> >> +   ECORE_IS_BB(edev) ? "BB" : "AH",
>> >> +   CHIP_REV_IS_A0(edev) ? 0 : 1);
>> >> +
>> >> + sprintf(ver_str, "%s %s_%d.%d.%d.%d", QEDE_PMD_VER_PREFIX,
>> >> + edev->ver_str, QEDE_PMD_VERSION_MAJOR, QEDE_PMD_VERSION_MINOR,
>> >> + QEDE_PMD_VERSION_REVISION, QEDE_PMD_VERSION_PATCH);
>> >> + strcpy(qdev->drv_ver, ver_str);
>> >> + RTE_LOG(INFO, PMD, " Driver version : %s\n", ver_str);
>> >> +
>> >> + ver_str[0] = '\0';
>> >> + sprintf(ver_str, "%d.%d.%d.%d", info->fw_major, info->fw_minor,
>> >> + info->fw_rev, info->fw_eng);
>> >> + RTE_LOG(INFO, PMD, " Firmware version : %s\n", ver_str);
>> >> +
>> >> + ver_str[0] = '\0';
>> >> + sprintf(ver_str, "%d.%d.%d.%d",
>> >> + (info->mfw_rev >> 24) & 0xff,
>> >> + (info->mfw_rev >> 16) & 0xff,
>> >> + (info->mfw_rev >> 8) & 0xff, (info->mfw_rev) & 0xff);
>> >> + RTE_LOG(INFO, PMD, " Management firmware version : %s\n", ver_str);
>> >> +
>> >> + RTE_LOG(INFO, PMD, " Firmware file : %s\n", QEDE_FW_FILE_NAME);
>> >
>> >This means the driver is far too chatty in the logs.
>> >Can't this be made DEBUG level?
>> >
>> Not clear what is the issue here?
>> RTE_LOG is used here to display basic adapter info like firmware/driver
>> versions etc without the need to enable any debug flags.
>> The driver debug logging is under the control of appropriate debug
>>flags.
>> 
>
>The DPDK log messages end up being examined by tech support and customers.
>Too much code puts extra stuff in so it is hard to find the real problem.
>This is obviously debug info, so either:
>  1) make it conditionally compiled
>  2) change log level to DEBUG
>  3) remove it.
>

This is not really a debug msg per se. We want it to be printed on the
stdout unconditionally (displayed only once) so that we can readily know
what firmware/driver/hw versions we are dealing with. We don?t want to
depend on the apps to print those and many of the apps may not do so
including testpmd. Even the linux drivers prints basic stuff  under dmesg.
We have found this to be useful for triage and would like to retain it if
there is no objection.




[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-31 Thread Stephen Hemminger
On Thu, 31 Mar 2016 19:36:55 +
Harish Patil  wrote:

> >
> 
> >On Wed, 30 Mar 2016 22:16:51 +
> >Harish Patil  wrote:
> >
> >> >
> >> >On Tue, 29 Mar 2016 22:28:20 -0700
> >> >Rasesh Mody  wrote:
> >> >
> >> >> +
> >> >> +static void qede_print_adapter_info(struct qede_dev *qdev)
> >> >> +{
> >> >> +   struct ecore_dev *edev = >edev;
> >> >> +   struct qed_dev_info *info = >dev_info.common;
> >> >> +   char ver_str[QED_DRV_VER_STR_SIZE] = { 0 };
> >> >> +
> >> >> +   RTE_LOG(INFO, PMD,
> >> >> + " Chip details : %s%d\n",
> >> >> + ECORE_IS_BB(edev) ? "BB" : "AH",
> >> >> + CHIP_REV_IS_A0(edev) ? 0 : 1);
> >> >> +
> >> >> +   sprintf(ver_str, "%s %s_%d.%d.%d.%d", QEDE_PMD_VER_PREFIX,
> >> >> +   edev->ver_str, QEDE_PMD_VERSION_MAJOR, 
> >> >> QEDE_PMD_VERSION_MINOR,
> >> >> +   QEDE_PMD_VERSION_REVISION, QEDE_PMD_VERSION_PATCH);
> >> >> +   strcpy(qdev->drv_ver, ver_str);
> >> >> +   RTE_LOG(INFO, PMD, " Driver version : %s\n", ver_str);
> >> >> +
> >> >> +   ver_str[0] = '\0';
> >> >> +   sprintf(ver_str, "%d.%d.%d.%d", info->fw_major, info->fw_minor,
> >> >> +   info->fw_rev, info->fw_eng);
> >> >> +   RTE_LOG(INFO, PMD, " Firmware version : %s\n", ver_str);
> >> >> +
> >> >> +   ver_str[0] = '\0';
> >> >> +   sprintf(ver_str, "%d.%d.%d.%d",
> >> >> +   (info->mfw_rev >> 24) & 0xff,
> >> >> +   (info->mfw_rev >> 16) & 0xff,
> >> >> +   (info->mfw_rev >> 8) & 0xff, (info->mfw_rev) & 0xff);
> >> >> +   RTE_LOG(INFO, PMD, " Management firmware version : %s\n", 
> >> >> ver_str);
> >> >> +
> >> >> +   RTE_LOG(INFO, PMD, " Firmware file : %s\n", QEDE_FW_FILE_NAME);
> >> >
> >> >This means the driver is far too chatty in the logs.
> >> >Can't this be made DEBUG level?
> >> >
> >> Not clear what is the issue here?
> >> RTE_LOG is used here to display basic adapter info like firmware/driver
> >> versions etc without the need to enable any debug flags.
> >> The driver debug logging is under the control of appropriate debug
> >>flags.
> >> 
> >
> >The DPDK log messages end up being examined by tech support and customers.
> >Too much code puts extra stuff in so it is hard to find the real problem.
> >This is obviously debug info, so either:
> >  1) make it conditionally compiled
> >  2) change log level to DEBUG
> >  3) remove it.
> >
> 
> This is not really a debug msg per se. We want it to be printed on the
> stdout unconditionally (displayed only once) so that we can readily know
> what firmware/driver/hw versions we are dealing with. We don?t want to
> depend on the apps to print those and many of the apps may not do so
> including testpmd. Even the linux drivers prints basic stuff  under dmesg.
> We have found this to be useful for triage and would like to retain it if
> there is no objection.

And Linux drivers are wrong to do this. This a case where developer thinks 
printing stuff
is important, but for operations it isn't. Better to provide this info through 
some API,
(maybe DPDK needs extensions to get_info).

Also, you don't have to format twice, once into a buffer (with sprintf) then 
again by
calling RTE_LOG.  Not only that sprintf() is guaranteed to null terminate the 
string,
so your paranoid ver_str[0] = 0; is not needed either.

Sorry for being so picky, but you are getting the feedback that comes from
experience dealing with large volumes of log info.


[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-31 Thread Harish Patil
>
>On Tue, 29 Mar 2016 22:28:20 -0700
>Rasesh Mody  wrote:
>
>> +static void
>> +qede_alloc_etherdev(struct qede_dev *qdev, struct qed_dev_eth_info
>>*info)
>> +{
>> +rte_memcpy(>dev_info, info, sizeof(*info));
>
>Why bother with rte_memcpy here? why not just assignment or memcpy()?

Basically, I have tried using rte_* equivalent macros if available.
Would it be a problem?
OR is it that rte_memcpy() is meant to be used only in data path?

>
>> +qdev->num_tc = qdev->dev_info.num_tc;
>> +qdev->ops = qed_ops;
>> +}
>




[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-30 Thread Harish Patil
>
>On Tue, 29 Mar 2016 22:28:20 -0700
>Rasesh Mody  wrote:
>
>> +static void
>> +qede_mac_addr_remove(__rte_unused struct rte_eth_dev *eth_dev,
>> + __rte_unused uint32_t index)
>> +{
>> +struct qede_dev *qdev = eth_dev->data->dev_private;
>> +struct ecore_dev *edev = >edev;
>> +
>> +/* TBD: Not implemented currently because DPDK does not provide
>> + * macaddr and instead just passes the index. So pmd needs to
>> + * maintain index mapping to macaddr.
>> + */
>> +DP_NOTICE(edev, false, "%s: Unsupported operation\n", __func__);
>> +}
>> +
>
>Rather than have a stub and break software, why not just
>not define the operation and let base DPDK handle the error?
>
Okay. I shall have it implemented and not leave it as stubbed one.



[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-30 Thread Harish Patil
>
>On Tue, 29 Mar 2016 22:28:20 -0700
>Rasesh Mody  wrote:
>
>> +
>> +static void qede_print_adapter_info(struct qede_dev *qdev)
>> +{
>> +struct ecore_dev *edev = >edev;
>> +struct qed_dev_info *info = >dev_info.common;
>> +char ver_str[QED_DRV_VER_STR_SIZE] = { 0 };
>> +
>> +RTE_LOG(INFO, PMD,
>> +  " Chip details : %s%d\n",
>> +  ECORE_IS_BB(edev) ? "BB" : "AH",
>> +  CHIP_REV_IS_A0(edev) ? 0 : 1);
>> +
>> +sprintf(ver_str, "%s %s_%d.%d.%d.%d", QEDE_PMD_VER_PREFIX,
>> +edev->ver_str, QEDE_PMD_VERSION_MAJOR, QEDE_PMD_VERSION_MINOR,
>> +QEDE_PMD_VERSION_REVISION, QEDE_PMD_VERSION_PATCH);
>> +strcpy(qdev->drv_ver, ver_str);
>> +RTE_LOG(INFO, PMD, " Driver version : %s\n", ver_str);
>> +
>> +ver_str[0] = '\0';
>> +sprintf(ver_str, "%d.%d.%d.%d", info->fw_major, info->fw_minor,
>> +info->fw_rev, info->fw_eng);
>> +RTE_LOG(INFO, PMD, " Firmware version : %s\n", ver_str);
>> +
>> +ver_str[0] = '\0';
>> +sprintf(ver_str, "%d.%d.%d.%d",
>> +(info->mfw_rev >> 24) & 0xff,
>> +(info->mfw_rev >> 16) & 0xff,
>> +(info->mfw_rev >> 8) & 0xff, (info->mfw_rev) & 0xff);
>> +RTE_LOG(INFO, PMD, " Management firmware version : %s\n", ver_str);
>> +
>> +RTE_LOG(INFO, PMD, " Firmware file : %s\n", QEDE_FW_FILE_NAME);
>
>This means the driver is far too chatty in the logs.
>Can't this be made DEBUG level?
>
Not clear what is the issue here?
RTE_LOG is used here to display basic adapter info like firmware/driver
versions etc without the need to enable any debug flags.
The driver debug logging is under the control of appropriate debug flags.



[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-30 Thread Stephen Hemminger
On Wed, 30 Mar 2016 22:16:51 +
Harish Patil  wrote:

> >
> >On Tue, 29 Mar 2016 22:28:20 -0700
> >Rasesh Mody  wrote:
> >
> >> +
> >> +static void qede_print_adapter_info(struct qede_dev *qdev)
> >> +{
> >> +  struct ecore_dev *edev = >edev;
> >> +  struct qed_dev_info *info = >dev_info.common;
> >> +  char ver_str[QED_DRV_VER_STR_SIZE] = { 0 };
> >> +
> >> +  RTE_LOG(INFO, PMD,
> >> +" Chip details : %s%d\n",
> >> +ECORE_IS_BB(edev) ? "BB" : "AH",
> >> +CHIP_REV_IS_A0(edev) ? 0 : 1);
> >> +
> >> +  sprintf(ver_str, "%s %s_%d.%d.%d.%d", QEDE_PMD_VER_PREFIX,
> >> +  edev->ver_str, QEDE_PMD_VERSION_MAJOR, QEDE_PMD_VERSION_MINOR,
> >> +  QEDE_PMD_VERSION_REVISION, QEDE_PMD_VERSION_PATCH);
> >> +  strcpy(qdev->drv_ver, ver_str);
> >> +  RTE_LOG(INFO, PMD, " Driver version : %s\n", ver_str);
> >> +
> >> +  ver_str[0] = '\0';
> >> +  sprintf(ver_str, "%d.%d.%d.%d", info->fw_major, info->fw_minor,
> >> +  info->fw_rev, info->fw_eng);
> >> +  RTE_LOG(INFO, PMD, " Firmware version : %s\n", ver_str);
> >> +
> >> +  ver_str[0] = '\0';
> >> +  sprintf(ver_str, "%d.%d.%d.%d",
> >> +  (info->mfw_rev >> 24) & 0xff,
> >> +  (info->mfw_rev >> 16) & 0xff,
> >> +  (info->mfw_rev >> 8) & 0xff, (info->mfw_rev) & 0xff);
> >> +  RTE_LOG(INFO, PMD, " Management firmware version : %s\n", ver_str);
> >> +
> >> +  RTE_LOG(INFO, PMD, " Firmware file : %s\n", QEDE_FW_FILE_NAME);
> >
> >This means the driver is far too chatty in the logs.
> >Can't this be made DEBUG level?
> >
> Not clear what is the issue here?
> RTE_LOG is used here to display basic adapter info like firmware/driver
> versions etc without the need to enable any debug flags.
> The driver debug logging is under the control of appropriate debug flags.
> 

The DPDK log messages end up being examined by tech support and customers.
Too much code puts extra stuff in so it is hard to find the real problem.
This is obviously debug info, so either:
  1) make it conditionally compiled
  2) change log level to DEBUG
  3) remove it.


[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-30 Thread Stephen Hemminger
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 = >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(_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, _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.


[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-30 Thread Stephen Hemminger
On Tue, 29 Mar 2016 22:28:20 -0700
Rasesh Mody  wrote:

> +static void qede_config_accept_any_vlan(struct qede_dev *qdev, bool action)
> +{
> + struct ecore_dev *edev = >edev;
> + struct qed_update_vport_params params;
> + int rc;
> +
> + /* Proceed only if action actually needs to be performed */
> + if (qdev->accept_any_vlan == action)
> + return;
> +
> + memset(, 0, sizeof(params));
> +
> + params.vport_id = 0;
> + params.accept_any_vlan = action;
> + params.update_accept_any_vlan_flg = 1;

Minor nit. A lot of this code uses memset() then sets structure elements.
Why not just use C99 style initialization:

struct qed_update_vport_params params = {
.vport_id = 0,
.accept_any_vlan = action,
.update_accept_any_vlan = 1,
};



[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-30 Thread Stephen Hemminger
On Tue, 29 Mar 2016 22:28:20 -0700
Rasesh Mody  wrote:

> +static void
> +qede_alloc_etherdev(struct qede_dev *qdev, struct qed_dev_eth_info *info)
> +{
> + rte_memcpy(>dev_info, info, sizeof(*info));

Why bother with rte_memcpy here? why not just assignment or memcpy()?

> + qdev->num_tc = qdev->dev_info.num_tc;
> + qdev->ops = qed_ops;
> +}


[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-30 Thread Stephen Hemminger
On Tue, 29 Mar 2016 22:28:20 -0700
Rasesh Mody  wrote:

> +
> +static void
> +qede_dev_info_get(struct rte_eth_dev *eth_dev,
> +   struct rte_eth_dev_info *dev_info)
> +{
> + struct qede_dev *qdev = eth_dev->data->dev_private;
> + struct ecore_dev *edev = >edev;
> +
> + PMD_INIT_FUNC_TRACE(edev);
> +
> + dev_info->min_rx_bufsize = (uint32_t)(ETHER_MIN_MTU +
> +   QEDE_ETH_OVERHEAD);
> + dev_info->max_rx_pktlen = (uint32_t)ETH_TX_MAX_NON_LSO_PKT_LEN;
> + dev_info->rx_desc_lim = qede_rx_desc_lim;
> + dev_info->tx_desc_lim = qede_tx_desc_lim;
> + /* Fix it for 8 queues for now */
> + dev_info->max_rx_queues = 8;
> + dev_info->max_tx_queues = 8;
> + dev_info->max_mac_addrs = (uint32_t)(RESC_NUM(>hwfns[0],
> +   ECORE_MAC));
> + dev_info->max_vfs = (uint16_t)NUM_OF_VFS(>edev);
> + dev_info->driver_name = qdev->drv_ver;
> + dev_info->reta_size = ETH_RSS_RETA_SIZE_128;
> + dev_info->flow_type_rss_offloads = (uint64_t)QEDE_RSS_OFFLOAD_ALL;
> + dev_info->default_txconf = (struct rte_eth_txconf) {
> + .txq_flags = QEDE_TXQ_FLAGS,};

Please indent this initialization, like other drivers
dev_info->default_txconf = (struct rte_eth_txconf) {
.txq_flags = QEDE_TXQ_FLAGS,
};


[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-30 Thread Stephen Hemminger
On Tue, 29 Mar 2016 22:28:20 -0700
Rasesh Mody  wrote:

> +
> +static void qede_print_adapter_info(struct qede_dev *qdev)
> +{
> + struct ecore_dev *edev = >edev;
> + struct qed_dev_info *info = >dev_info.common;
> + char ver_str[QED_DRV_VER_STR_SIZE] = { 0 };
> +
> + RTE_LOG(INFO, PMD,
> +   " Chip details : %s%d\n",
> +   ECORE_IS_BB(edev) ? "BB" : "AH",
> +   CHIP_REV_IS_A0(edev) ? 0 : 1);
> +
> + sprintf(ver_str, "%s %s_%d.%d.%d.%d", QEDE_PMD_VER_PREFIX,
> + edev->ver_str, QEDE_PMD_VERSION_MAJOR, QEDE_PMD_VERSION_MINOR,
> + QEDE_PMD_VERSION_REVISION, QEDE_PMD_VERSION_PATCH);
> + strcpy(qdev->drv_ver, ver_str);
> + RTE_LOG(INFO, PMD, " Driver version : %s\n", ver_str);
> +
> + ver_str[0] = '\0';
> + sprintf(ver_str, "%d.%d.%d.%d", info->fw_major, info->fw_minor,
> + info->fw_rev, info->fw_eng);
> + RTE_LOG(INFO, PMD, " Firmware version : %s\n", ver_str);
> +
> + ver_str[0] = '\0';
> + sprintf(ver_str, "%d.%d.%d.%d",
> + (info->mfw_rev >> 24) & 0xff,
> + (info->mfw_rev >> 16) & 0xff,
> + (info->mfw_rev >> 8) & 0xff, (info->mfw_rev) & 0xff);
> + RTE_LOG(INFO, PMD, " Management firmware version : %s\n", ver_str);
> +
> + RTE_LOG(INFO, PMD, " Firmware file : %s\n", QEDE_FW_FILE_NAME);

This means the driver is far too chatty in the logs.
Can't this be made DEBUG level?


[dpdk-dev] [PATCH v4 05/10] qede: Add core driver

2016-03-29 Thread Rasesh Mody
The Qlogic Everest Driver for Ethernet(QEDE) Poll Mode Driver(PMD) is
the DPDK specific module for QLogic FastLinQ QL4 25G/40G CNA family
of adapters as well as their virtual functions (VF) in SR-IOV context.

This patch adds QEDE PMD, which interacts with base driver and
initialises the HW.

This patch content also includes:
 - eth_dev_ops callbacks
 - Rx/Tx support for the driver
 - link default configuration
 - change link property
 - link up/down/update notifications
 - vlan offload and filtering capability
 - device/function/port statistics

Signed-off-by: Harish Patil 
Signed-off-by: Rasesh Mody 
Signed-off-by: Sony Chacko 
---
 drivers/net/qede/Makefile |   90 +++
 drivers/net/qede/qede_eth_if.h|  173 +
 drivers/net/qede/qede_ethdev.c|  957 +++
 drivers/net/qede/qede_ethdev.h|  158 
 drivers/net/qede/qede_if.h|  155 
 drivers/net/qede/qede_logs.h  |   93 +++
 drivers/net/qede/qede_main.c  |  548 ++
 drivers/net/qede/qede_rxtx.c  | 1172 +
 drivers/net/qede/qede_rxtx.h  |  187 +
 drivers/net/qede/rte_pmd_qede_version.map |4 +
 10 files changed, 3537 insertions(+)
 create mode 100644 drivers/net/qede/Makefile
 create mode 100644 drivers/net/qede/qede_eth_if.h
 create mode 100644 drivers/net/qede/qede_ethdev.c
 create mode 100644 drivers/net/qede/qede_ethdev.h
 create mode 100644 drivers/net/qede/qede_if.h
 create mode 100644 drivers/net/qede/qede_logs.h
 create mode 100644 drivers/net/qede/qede_main.c
 create mode 100644 drivers/net/qede/qede_rxtx.c
 create mode 100644 drivers/net/qede/qede_rxtx.h
 create mode 100644 drivers/net/qede/rte_pmd_qede_version.map

diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile
new file mode 100644
index 000..efaefb2
--- /dev/null
+++ b/drivers/net/qede/Makefile
@@ -0,0 +1,90 @@
+#Copyright (c) 2016 QLogic Corporation.
+#All rights reserved.
+#www.qlogic.com
+#
+#See LICENSE.qede_pmd for copyright and licensing details.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_qede.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+EXPORT_MAP := rte_pmd_qede_version.map
+
+LIBABIVER := 1
+
+#
+#OS
+#
+OS_TYPE := $(shell uname -s)
+
+#
+# CFLAGS
+#
+CFLAGS_ECORE_DRIVER = -Wno-unused-parameter
+CFLAGS_ECORE_DRIVER += -Wno-unused-value
+CFLAGS_ECORE_DRIVER += -Wno-sign-compare
+CFLAGS_ECORE_DRIVER += -Wno-missing-prototypes
+CFLAGS_ECORE_DRIVER += -Wno-cast-qual
+CFLAGS_ECORE_DRIVER += -Wno-unused-function
+CFLAGS_ECORE_DRIVER += -Wno-unused-variable
+CFLAGS_ECORE_DRIVER += -Wno-strict-aliasing
+CFLAGS_ECORE_DRIVER += -Wno-missing-prototypes
+CFLAGS_ECORE_DRIVER += -Wno-format-nonliteral
+ifeq ($(OS_TYPE),Linux)
+CFLAGS_ECORE_DRIVER += -Wno-shift-negative-value
+endif
+
+ifneq (,$(filter gcc gcc48,$(CC)))
+CFLAGS_ECORE_DRIVER += -Wno-unused-but-set-variable
+CFLAGS_ECORE_DRIVER += -Wno-missing-declarations
+CFLAGS_ECORE_DRIVER += -Wno-maybe-uninitialized
+CFLAGS_ECORE_DRIVER += -Wno-strict-prototypes
+else ifeq ($(CC), clang)
+CFLAGS_ECORE_DRIVER += -Wno-format-extra-args
+CFLAGS_ECORE_DRIVER += -Wno-visibility
+CFLAGS_ECORE_DRIVER += -Wno-empty-body
+CFLAGS_ECORE_DRIVER += -Wno-invalid-source-encoding
+CFLAGS_ECORE_DRIVER += -Wno-sometimes-uninitialized
+CFLAGS_ECORE_DRIVER += -Wno-pointer-bool-conversion
+else
+#icc flags
+endif
+
+#
+# Add extra flags for base ecore driver files
+# to disable warnings in them
+#
+#
+ECORE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
+$(foreach obj, $(ECORE_DRIVER_OBJS), $(eval CFLAGS+=$(CFLAGS_ECORE_DRIVER)))
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dev.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_hw.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_cxt.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sp_commands.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_fw_funcs.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_spq.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_ops.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_mcp.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_int.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/bcm_osal.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c
+SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_rxtx.c
+
+# dependent libs:
+DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_eal lib/librte_ether
+DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_mempool lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += lib/librte_net lib/librte_malloc
+
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/qede/qede_eth_if.h b/drivers/net/qede/qede_eth_if.h
new file mode 100644
index 000..95a58ac
--- /dev/null
+++ b/drivers/net/qede/qede_eth_if.h
@@ -0,0 +1,173 @@
+/*
+ * Copyright