diff options
author | Madalin Bucur <madalin.bucur@nxp.com> | 2017-08-27 16:13:41 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-29 02:41:00 +0300 |
commit | 056057e288e70755a423ddfd2e45b97cd147a411 (patch) | |
tree | cd74a0a65449c37009cf7bb0543ec8472dfcdf02 /drivers/net/ethernet/freescale/fman | |
parent | bcf0994b23fed62cfd55e922e74b0dd43958e6fd (diff) | |
download | linux-056057e288e70755a423ddfd2e45b97cd147a411.tar.xz |
dpaa_eth: add NETIF_F_RXHASH
Set the skb hash when then FMan Keygen hash result is available.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/fman_port.c | 11 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fman/fman_port.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_port.c b/drivers/net/ethernet/freescale/fman/fman_port.c index f571b3c37f27..1789b206be58 100644 --- a/drivers/net/ethernet/freescale/fman/fman_port.c +++ b/drivers/net/ethernet/freescale/fman/fman_port.c @@ -1720,6 +1720,17 @@ u32 fman_port_get_qman_channel_id(struct fman_port *port) } EXPORT_SYMBOL(fman_port_get_qman_channel_id); +int fman_port_get_hash_result_offset(struct fman_port *port, u32 *offset) +{ + if (port->buffer_offsets.hash_result_offset == ILLEGAL_BASE) + return -EINVAL; + + *offset = port->buffer_offsets.hash_result_offset; + + return 0; +} +EXPORT_SYMBOL(fman_port_get_hash_result_offset); + static int fman_port_probe(struct platform_device *of_dev) { struct fman_port *port; diff --git a/drivers/net/ethernet/freescale/fman/fman_port.h b/drivers/net/ethernet/freescale/fman/fman_port.h index 5a99611fa1dc..e86ca6a34e4e 100644 --- a/drivers/net/ethernet/freescale/fman/fman_port.h +++ b/drivers/net/ethernet/freescale/fman/fman_port.h @@ -151,6 +151,8 @@ int fman_port_enable(struct fman_port *port); u32 fman_port_get_qman_channel_id(struct fman_port *port); +int fman_port_get_hash_result_offset(struct fman_port *port, u32 *offset); + struct fman_port *fman_port_bind(struct device *dev); #endif /* __FMAN_PORT_H */ |