X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_pmd_e1000%2Fem_ethdev.c;h=f025338de835ce355bc50cc6f2051776957ca0f2;hb=71d74422e27c7891e734bdcb593d4e390e79aaee;hp=d8c9a9b31acbe3595492c3dc36a7a390f630d4c6;hpb=e659b6b43928c33de7625cd62540cdfc55792f01;p=dpdk.git diff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_ethdev.c index d8c9a9b31a..f025338de8 100644 --- a/lib/librte_pmd_e1000/em_ethdev.c +++ b/lib/librte_pmd_e1000/em_ethdev.c @@ -1,13 +1,13 @@ /*- * BSD LICENSE - * + * * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright @@ -17,7 +17,7 @@ * * Neither the name of Intel Corporation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -51,6 +51,7 @@ #include #include #include +#include #include "e1000_logs.h" #include "e1000/e1000_api.h" @@ -279,14 +280,14 @@ static struct eth_driver rte_em_pmd = { { .name = "rte_em_pmd", .id_table = pci_id_em_map, - .drv_flags = RTE_PCI_DRV_NEED_IGB_UIO, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING, }, .eth_dev_init = eth_em_dev_init, .dev_private_size = sizeof(struct e1000_adapter), }; -int -rte_em_pmd_init(void) +static int +rte_em_pmd_init(const char *name __rte_unused, const char *params __rte_unused) { rte_eth_driver_register(&rte_em_pmd); return 0; @@ -644,7 +645,7 @@ em_hardware_init(struct e1000_hw *hw) * frames to be received after sending an XOFF. * - Low water mark works best when it is very near the high water mark. * This allows the receiver to restart by sending XON when it has - * drained a bit. Here we use an arbitary value of 1500 which will + * drained a bit. Here we use an arbitrary value of 1500 which will * restart after one full frame is pulled from the buffer. There * could be several smaller frames in the buffer and if so they will * not trigger the XON until their total number reduces the buffer @@ -1181,7 +1182,7 @@ eth_em_vlan_offload_set(struct rte_eth_dev *dev, int mask) else em_vlan_hw_strip_disable(dev); } - + if(mask & ETH_VLAN_FILTER_MASK){ if (dev->data->dev_conf.rxmode.hw_vlan_filter) em_vlan_hw_filter_enable(dev); @@ -1433,3 +1434,10 @@ eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index) e1000_rar_set(hw, addr, index); } + +struct rte_driver em_pmd_drv = { + .type = PMD_PDEV, + .init = rte_em_pmd_init, +}; + +PMD_REGISTER_DRIVER(em_pmd_drv);