X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc_log.h;h=b1a9df44767af65f3a55eebade4e528265f620d4;hb=863f34f710d49e1a5e134214f86bea094fa8d34d;hp=7e174cd1106de3fb156277f52a63825900c1847c;hpb=63d588ff2692df3c54337b98a8eb6b9c8bf3d801;p=dpdk.git diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h index 7e174cd110..b1a9df4476 100644 --- a/drivers/net/sfc/sfc_log.h +++ b/drivers/net/sfc/sfc_log.h @@ -1,5 +1,7 @@ /*- - * Copyright (c) 2016 Solarflare Communications Inc. + * BSD LICENSE + * + * Copyright (c) 2016-2017 Solarflare Communications Inc. * All rights reserved. * * This software was jointly developed between OKTET Labs (under contract @@ -33,17 +35,16 @@ /* Log PMD message, automatically add prefix and \n */ #define SFC_LOG(sa, level, ...) \ do { \ - const struct rte_eth_dev *_dev = (sa)->eth_dev; \ - const struct rte_pci_device *_pci_dev = SFC_DEV_TO_PCI(_dev); \ + const struct sfc_adapter *__sa = (sa); \ \ RTE_LOG(level, PMD, \ RTE_FMT("sfc_efx " PCI_PRI_FMT " #%" PRIu8 ": " \ RTE_FMT_HEAD(__VA_ARGS__,) "\n", \ - _pci_dev->addr.domain, \ - _pci_dev->addr.bus, \ - _pci_dev->addr.devid, \ - _pci_dev->addr.function, \ - _dev->data->port_id, \ + __sa->pci_addr.domain, \ + __sa->pci_addr.bus, \ + __sa->pci_addr.devid, \ + __sa->pci_addr.function, \ + __sa->port_id, \ RTE_FMT_TAIL(__VA_ARGS__,))); \ } while (0)