Olivier Matz [Fri, 26 Oct 2018 07:04:06 +0000 (09:04 +0200)]
net: add compat headers without rte prefix
Restore the unprefixed net structures, functions and defines, so
that external applications can compile using the old API.
This compatibility layer is enabled by default. It can be disabled by
defining RTE_NET_NO_COMPAT before including the net header files.
This compatibility layer will be removed in a future release.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:06 +0000 (09:04 +0200)]
net: add rte prefix to udp structure
Add 'rte_' prefix to structures:
- rename struct udp_hdr as struct rte_udp_hdr.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:05 +0000 (09:04 +0200)]
net: add rte prefix to tcp structure
Add 'rte_' prefix to structures:
- rename struct tcp_hdr as struct rte_tcp_hdr.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:05 +0000 (09:04 +0200)]
net: add rte prefix to sctp structure
Add 'rte_' prefix to structures:
- rename struct sctp_hdr as struct rte_sctp_hdr.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:05 +0000 (09:04 +0200)]
net: add rte prefix to ip defines
Add 'RTE_' prefix to defines:
- rename IPv4( as RTE_IPv4(.
- rename IPV4_MAX_PKT_LEN as RTE_IPV4_MAX_PKT_LEN.
- rename IPV4_HDR_IHL_MASK as RTE_IPV4_HDR_IHL_MASK.
- rename IPV4_IHL_MULTIPLIER as RTE_IPV4_IHL_MULTIPLIER.
- rename IPV4_HDR_DF_SHIFT as RTE_IPV4_HDR_DF_SHIFT.
- rename IPV4_HDR_MF_SHIFT as RTE_IPV4_HDR_MF_SHIFT.
- rename IPV4_HDR_FO_SHIFT as RTE_IPV4_HDR_FO_SHIFT.
- rename IPV4_HDR_DF_FLAG as RTE_IPV4_HDR_DF_FLAG.
- rename IPV4_HDR_MF_FLAG as RTE_IPV4_HDR_MF_FLAG.
- rename IPV4_HDR_OFFSET_MASK as RTE_IPV4_HDR_OFFSET_MASK.
- rename IPV4_HDR_OFFSET_UNITS as RTE_IPV4_HDR_OFFSET_UNITS.
- rename IPV4_ANY as RTE_IPV4_ANY.
- rename IPV4_LOOPBACK as RTE_IPV4_LOOPBACK.
- rename IPV4_BROADCAST as RTE_IPV4_BROADCAST.
- rename IPV4_ALLHOSTS_GROUP as RTE_IPV4_ALLHOSTS_GROUP.
- rename IPV4_ALLRTRS_GROUP as RTE_IPV4_ALLRTRS_GROUP.
- rename IPV4_MAX_LOCAL_GROUP as RTE_IPV4_MAX_LOCAL_GROUP.
- rename IPV4_MIN_MCAST as RTE_IPV4_MIN_MCAST.
- rename IPV4_MAX_MCAST as RTE_IPV4_MAX_MCAST.
- rename IS_IPV4_MCAST as RTE_IS_IPV4_MCAST.
- rename IPV6_HDR_FL_SHIFT as RTE_IPV6_HDR_FL_SHIFT.
- rename IPV6_HDR_TC_SHIFT as RTE_IPV6_HDR_TC_SHIFT.
- rename IPV6_HDR_FL_MASK as RTE_IPV6_HDR_FL_MASK.
- rename IPV6_HDR_TC_MASK as RTE_IPV6_HDR_TC_MASK.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:02 +0000 (09:04 +0200)]
net: add rte prefix to ip structure
Add 'rte_' prefix to structures:
- rename struct ipv4_hdr as struct rte_ipv4_hdr.
- rename struct ipv6_hdr as struct rte_ipv6_hdr.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:01 +0000 (09:04 +0200)]
net: add rte prefix to icmp defines
Add 'RTE_' prefix to defines:
- rename IP_ICMP_ECHO_REPLY as RTE_IP_ICMP_ECHO_REPLY.
- rename IP_ICMP_ECHO_REQUEST as RTE_IP_ICMP_ECHO_REQUEST.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:01 +0000 (09:04 +0200)]
net: add rte prefix to icmp structure
Add 'rte_' prefix to structures:
- rename struct icmp_hdr as struct rte_icmp_hdr.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:01 +0000 (09:04 +0200)]
net: add rte prefix to gre structure
Add 'rte_' prefix to structures:
- rename struct gre_hdr as struct rte_gre_hdr.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:00 +0000 (09:04 +0200)]
net: add rte prefix to esp structure
Add 'rte_' prefix to structures:
- rename struct esp_hdr as struct rte_esp_hdr.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:04:00 +0000 (09:04 +0200)]
net: add rte prefix to ether defines
Add 'RTE_' prefix to defines:
- rename ETHER_ADDR_LEN as RTE_ETHER_ADDR_LEN.
- rename ETHER_TYPE_LEN as RTE_ETHER_TYPE_LEN.
- rename ETHER_CRC_LEN as RTE_ETHER_CRC_LEN.
- rename ETHER_HDR_LEN as RTE_ETHER_HDR_LEN.
- rename ETHER_MIN_LEN as RTE_ETHER_MIN_LEN.
- rename ETHER_MAX_LEN as RTE_ETHER_MAX_LEN.
- rename ETHER_MTU as RTE_ETHER_MTU.
- rename ETHER_MAX_VLAN_FRAME_LEN as RTE_ETHER_MAX_VLAN_FRAME_LEN.
- rename ETHER_MAX_VLAN_ID as RTE_ETHER_MAX_VLAN_ID.
- rename ETHER_MAX_JUMBO_FRAME_LEN as RTE_ETHER_MAX_JUMBO_FRAME_LEN.
- rename ETHER_MIN_MTU as RTE_ETHER_MIN_MTU.
- rename ETHER_LOCAL_ADMIN_ADDR as RTE_ETHER_LOCAL_ADMIN_ADDR.
- rename ETHER_GROUP_ADDR as RTE_ETHER_GROUP_ADDR.
- rename ETHER_TYPE_IPv4 as RTE_ETHER_TYPE_IPv4.
- rename ETHER_TYPE_IPv6 as RTE_ETHER_TYPE_IPv6.
- rename ETHER_TYPE_ARP as RTE_ETHER_TYPE_ARP.
- rename ETHER_TYPE_VLAN as RTE_ETHER_TYPE_VLAN.
- rename ETHER_TYPE_RARP as RTE_ETHER_TYPE_RARP.
- rename ETHER_TYPE_QINQ as RTE_ETHER_TYPE_QINQ.
- rename ETHER_TYPE_ETAG as RTE_ETHER_TYPE_ETAG.
- rename ETHER_TYPE_1588 as RTE_ETHER_TYPE_1588.
- rename ETHER_TYPE_SLOW as RTE_ETHER_TYPE_SLOW.
- rename ETHER_TYPE_TEB as RTE_ETHER_TYPE_TEB.
- rename ETHER_TYPE_LLDP as RTE_ETHER_TYPE_LLDP.
- rename ETHER_TYPE_MPLS as RTE_ETHER_TYPE_MPLS.
- rename ETHER_TYPE_MPLSM as RTE_ETHER_TYPE_MPLSM.
- rename ETHER_VXLAN_HLEN as RTE_ETHER_VXLAN_HLEN.
- rename ETHER_ADDR_FMT_SIZE as RTE_ETHER_ADDR_FMT_SIZE.
- rename VXLAN_GPE_TYPE_IPV4 as RTE_VXLAN_GPE_TYPE_IPV4.
- rename VXLAN_GPE_TYPE_IPV6 as RTE_VXLAN_GPE_TYPE_IPV6.
- rename VXLAN_GPE_TYPE_ETH as RTE_VXLAN_GPE_TYPE_ETH.
- rename VXLAN_GPE_TYPE_NSH as RTE_VXLAN_GPE_TYPE_NSH.
- rename VXLAN_GPE_TYPE_MPLS as RTE_VXLAN_GPE_TYPE_MPLS.
- rename VXLAN_GPE_TYPE_GBP as RTE_VXLAN_GPE_TYPE_GBP.
- rename VXLAN_GPE_TYPE_VBNG as RTE_VXLAN_GPE_TYPE_VBNG.
- rename ETHER_VXLAN_GPE_HLEN as RTE_ETHER_VXLAN_GPE_HLEN.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:03:54 +0000 (09:03 +0200)]
net: add rte prefix to ether functions
Add 'rte_' prefix to functions:
- rename is_same_ether_addr() as rte_is_same_ether_addr().
- rename is_zero_ether_addr() as rte_is_zero_ether_addr().
- rename is_unicast_ether_addr() as rte_is_unicast_ether_addr().
- rename is_multicast_ether_addr() as rte_is_multicast_ether_addr().
- rename is_broadcast_ether_addr() as rte_is_broadcast_ether_addr().
- rename is_universal_ether_addr() as rte_is_universal_ether_addr().
- rename is_local_admin_ether_addr() as rte_is_local_admin_ether_addr().
- rename is_valid_assigned_ether_addr() as rte_is_valid_assigned_ether_addr().
- rename eth_random_addr() as rte_eth_random_addr().
- rename ether_addr_copy() as rte_ether_addr_copy().
- rename ether_format_addr() as rte_ether_format_addr().
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:03:49 +0000 (09:03 +0200)]
net: add rte prefix to ether structures
Add 'rte_' prefix to structures:
- rename struct ether_addr as struct rte_ether_addr.
- rename struct ether_hdr as struct rte_ether_hdr.
- rename struct vlan_hdr as struct rte_vlan_hdr.
- rename struct vxlan_hdr as struct rte_vxlan_hdr.
- rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr.
Additionally, adapt the command line library to use the rte
structures and defines.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:03:48 +0000 (09:03 +0200)]
net: add rte prefix to arp defines
Add 'RTE_' prefix to defines:
- rename ARP_HRD_ETHER as RTE_ARP_HRD_ETHER.
- rename ARP_OP_REQUEST as RTE_ARP_OP_REQUEST.
- rename ARP_OP_REPLY as RTE_ARP_OP_REPLY.
- rename ARP_OP_REVREQUEST as RTE_ARP_OP_REVREQUEST.
- rename ARP_OP_REVREPLY as RTE_ARP_OP_REVREPLY.
- rename ARP_OP_INVREQUEST as RTE_ARP_OP_INVREQUEST.
- rename ARP_OP_INVREPLY as RTE_ARP_OP_INVREPLY.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 26 Oct 2018 07:03:47 +0000 (09:03 +0200)]
net: add rte prefix to arp structures
Add 'rte_' prefix to structures:
- rename struct arp_hdr as struct rte_arp_hdr.
- rename struct arp_ipv4 as struct rte_arp_ipv4.
Also rename arp_hrd, arp_pro, arp_hln, arp_pln and arp_op fields
to avoid conflict with the #defines in gnu libc.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Anatoly Burakov [Mon, 22 Oct 2018 12:57:03 +0000 (13:57 +0100)]
mem: fix resource leak
Segment preallocation code allocates an array of structures on the
heap but does not free the memory afterwards. Fix it by freeing it
at the end of the function, and changing control flow to always go
through that code path.
Coverity issue: 323524
Fixes:
1dd342d0fdc4 ("mem: improve segment list preallocation")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Dan Gora [Wed, 17 Oct 2018 00:22:44 +0000 (21:22 -0300)]
test: fix build of external memory test
There was a compilation error in test_external_mem.c:
CC test_external_mem.o
test_external_mem.c: In function ‘test_external_mem’:
test_external_mem.c:375:2: error: ‘for’ loop initial declarations are
only allowed in C99 mode
for (int i = 0; i < n_pages; i++) {
^
test_external_mem.c:375:2: note: use option -std=c99 or -std=gnu99 to
compile your code
Fixes:
b270daa43b3d ("test: support external memory")
Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Qi Zhang [Mon, 22 Oct 2018 06:15:16 +0000 (14:15 +0800)]
eal: fix bus name read for removal in multi-process
A crash may appear when removing some PCI devices because
dev->devargs is not always initialized. So use dev->bus instead of
dev->devargs->bus when building devargs string to remove a device.
Fixes:
244d5130719c ("eal: enable hotplug on multi-process")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Qi Zhang [Mon, 22 Oct 2018 05:47:11 +0000 (13:47 +0800)]
bus/vdev: fix uninitialized device bus
Device bus should be initialized after bus scan.
While it does not happened when scan vdev from secondary process,
that cause segment fault at rte_dev_probe when call dev->bus->xxx.
Fixes:
cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Anatoly Burakov [Fri, 5 Oct 2018 08:29:44 +0000 (09:29 +0100)]
mem: improve segment list preallocation
Current code to preallocate segment lists is trying to do
everything in one go, and thus ends up being convoluted,
hard to understand, and, most importantly, does not scale beyond
initial assumptions about number of NUMA nodes and number of
page sizes, and therefore has issues on some configurations.
Instead of fixing these issues in the existing code, simply
rewrite it to be slightly less clever but much more logical, and
provide ample comments to explain exactly what is going on.
We cannot use the same approach for 32-bit code because the
limitations of the target dictate current socket-centric
approach rather than type-centric approach we use on 64-bit
target, so 32-bit code is left unmodified. FreeBSD doesn't
support NUMA so there's no complexity involved there, and thus
its code is much more readable and not worth changing.
Fixes:
1d406458db47 ("mem: make segment preallocation OS-specific")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 4 Oct 2018 10:20:39 +0000 (11:20 +0100)]
eal: improve musl compatibility of thread log
Musl complains about pthread id being of wrong size, because on
musl, pthread_t is a struct pointer, not an unsigned int. Fix the
printing code by casting pthread id to unsigned pointer type and
adjusting the format specifier to be of appropriate size.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Thu, 4 Oct 2018 10:20:38 +0000 (11:20 +0100)]
eal: improve musl compatibility of string functions
Musl wraps various string functions such as strlcpy in order to
harden them. However, the fortify wrappers are included without
including the actual string functions being wrapped, which
throws missing definition compile errors. Fix by including
string.h in string functions header.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Thu, 4 Oct 2018 10:20:37 +0000 (11:20 +0100)]
mem: improve musl compatibility
When built against musl, fcntl.h doesn't silently get included.
Fix by including it explicitly.
Bugzilla ID: 31
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Thu, 4 Oct 2018 10:20:36 +0000 (11:20 +0100)]
eal/linux: improve musl compatibility
When built against musl, fcntl.h doesn't silently get included.
Fix by including it explicitly.
Bugzilla ID: 33
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Thu, 4 Oct 2018 10:20:35 +0000 (11:20 +0100)]
fbarray: improve musl compatibility
When built against musl, fcntl.h doesn't silently get included.
Fix by including it explicitly.
Bugzilla ID: 34
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Thu, 4 Oct 2018 10:20:34 +0000 (11:20 +0100)]
vfio: improve musl compatibility
Musl already has PAGE_SIZE defined, and our define clashed with it.
Rename our define to SYS_PAGE_SIZE.
Bugzilla ID: 36
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Thu, 4 Oct 2018 10:20:33 +0000 (11:20 +0100)]
mk: build with _GNU_SOURCE defined by default
We use _GNU_SOURCE all over the place, but often times we miss
defining it, resulting in broken builds on musl. Rather than
fixing every library's and driver's and application's makefile,
fix it by simply defining _GNU_SOURCE by default for all
builds.
Remove all usages of _GNU_SOURCE in source files and makefiles,
and also fixup a couple of instances of using __USE_GNU instead
of _GNU_SOURCE.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Thomas Monjalon [Wed, 17 Oct 2018 23:42:52 +0000 (01:42 +0200)]
devargs: fix freeing during device removal
After calling unplug function of a bus, the device is expected
to be freed. It is too late for getting devargs to remove.
Anyway, the buses which implement unplug are already freeing
the devargs, except the PCI bus.
So the call to rte_devargs_remove() is removed from EAL and
added in PCI.
Fixes:
2effa126fbd8 ("devargs: simplify parameters of removal function")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Raslan Darawsheh [Wed, 17 Oct 2018 15:22:11 +0000 (18:22 +0300)]
app/testpmd: set packet dump based on verbosity level
when changing verbosity level it will configure rx/tx callbacks to dump
packets based on the verbosity value as following:
1- dump only received packets:
testpmd> set verbose 1
2- dump only sent packets:
testpmd> set verbose 2
3- dump sent and received packets:
testpmd> set verbose (any number > 2)
4- disable dump
testpmd> set verbose 0
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Raslan Darawsheh [Wed, 17 Oct 2018 15:22:10 +0000 (18:22 +0300)]
app/testpmd: add packet dump callbacks
add new rx/tx callback functions to be used for dumping the packets.
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Raslan Darawsheh [Wed, 17 Oct 2018 15:22:09 +0000 (18:22 +0300)]
app/testpmd: move dumping packets to a separate function
verbosity for the received/sent packets is needed in all of the
forwarding engines so moving it to be in a separate function
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Phil Yang [Wed, 17 Oct 2018 01:36:30 +0000 (09:36 +0800)]
app/testpmd: fix physical port socket initialization
Once the lcore list setting excluded the socket which physical device
attached, it will cause failure. Meanwhile, it will disable Testpmd
cross NUMA scenario.
Fixes:
dbfb8ec7094c ("app/testpmd: optimize mbuf pool allocation")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Raslan Darawsheh [Wed, 10 Oct 2018 07:01:41 +0000 (07:01 +0000)]
net/tap: fix reported number of Tx packets
When writev fails to send packets it doesn't update the
number of Tx packets, but it still num_tx is updated.
The value that should be returned is the actual number
of sent packets which is num_packets.
Fixes:
02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
CC: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Stephen Hemminger [Wed, 25 Jul 2018 18:20:19 +0000 (11:20 -0700)]
net/ixgbe: remove mild profanity
At the tail end of comment about barriers (I feel your pain);
remove mild profanity.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Jul 2018 18:20:17 +0000 (11:20 -0700)]
net/bnx2x: remove profanity
No need for profanity in comments.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Tue, 16 Oct 2018 13:16:43 +0000 (13:16 +0000)]
doc: clarify VLAN and QinQ Tx offload prerequisite
- Fix missing PKT_TX_VLAN mbuf.ol_flag and mbuf.vlan_tci
fields for Tx VLAN INSERT offload.
- Fix missing mbuf.vlan_tci_outer field for Tx QINQ INSERT offload.
- Rename deprecated PKT_TX_QINQ_PKT to PKT_TX_QINQ
Fixes:
cba7f53b717d ("ethdev: introduce Tx queue offloads API")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nithin Dabilpuram [Tue, 16 Oct 2018 12:45:43 +0000 (12:45 +0000)]
mbuf: fix missing Tx outer UDP checksum flag name
Fix missing Tx outer udp checksum flag name
Fixes:
df694a05bfff ("ethdev: add Tx offload outer UDP checksum definition")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Jerin Jacob [Tue, 16 Oct 2018 12:45:40 +0000 (12:45 +0000)]
mbuf: fix offload flag name and list
Fix missing PKT_TX* & PKT_RX* ol_flag name and fix ol_flag list.
Fixes:
6d18505efaa6 ("vhost: support UDP Fragmentation Offload")
Fixes:
829a1c2c41dc ("mbuf: extend flow director field")
Fixes:
63c0d74daaa9 ("mbuf: add Tx side tunneling type")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Shahaf Shuler [Tue, 16 Oct 2018 06:05:17 +0000 (09:05 +0300)]
net/mlx5: fix build on Arm
On some ARM environment, the below compilation error will be seen
dpdk/drivers/net/mlx5/mlx5_flow_dv.c: In function
'flow_dv_translate_item_nvgre':
/tmp/dpdk/drivers/net/mlx5/mlx5_flow_dv.c:785:22: error: pointer targets
in initialization differ in signedness [-Werror=pointer-sign]
const char *tni_v = nvgre_v->tni;
The reason for this error is that nvgre_v->tni is defined as byte array
in size of 3B. However the code in the function iterate till the 4B in
order to copy/set also the subsequent field after it (flow_id)
Fixing by pointing to this struct from a different pointer.
Fixes:
fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:47 +0000 (14:40 +0200)]
vhost: enable postcopy protocol feature
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:46 +0000 (14:40 +0200)]
net/vhost: add parameter to enable postcopy
Introduce a new postcopy-support parameter to Vhost PMD that
passes the RTE_VHOST_USER_POSTCOPY_SUPPORT flag at vhost
device register time.
Flag should only be set if application does not prefault guest
memory using, for example, mlockall() syscall.
Default value is 0, meaning that postcopy support is disabled
unless specified explicitly.
Example to enable postcopy support for a given device:
--vdev 'net_vhost0,iface=/tmp/vhost-user1,postcopy-support=1'
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:45 +0000 (14:40 +0200)]
vhost: restrict postcopy live-migration enablement
Postcopy live-migration feature requires the application to
not populate the guest memory. As the vhost library cannot
prevent the application to that (e.g. preventing the
application to call mlockall()), the feature is disabled by
default.
The application should only enable the feature if it does not
force the guest memory to be populated.
In case the user passes the RTE_VHOST_USER_POSTCOPY_SUPPORT
flag at registration but the feature was not compiled,
registration fails.
For the same reason, postcopy and dequeue zero copy features
are not compatible, so don't advertize postcopy support if
dequeue zero copy is requested.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:44 +0000 (14:40 +0200)]
vhost: support postcopy end request
The master sends this message before stopping handling
userfaults, so that the backend closes the userfaultfd.
The master waits for the slave to acknowledge the request
with an empty 64bits payload for synchronization purpose.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:43 +0000 (14:40 +0200)]
vhost: send userfault range addresses back to Qemu
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:42 +0000 (14:40 +0200)]
vhost: avoid useless VhostUserMemory copy
The VHOST_USER_SET_MEM_TABLE payload is copied when handled,
whereas it could directly be referenced.
This is not very important, but next, we'll need to update the
payload and send it back to Qemu.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:41 +0000 (14:40 +0200)]
vhost: register new regions with userfaultfd
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:40 +0000 (14:40 +0200)]
vhost: support postcopy listen message
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:39 +0000 (14:40 +0200)]
vhost: introduce postcopy advise message
This patch opens a userfaultfd and sends it back to Qemu's
VHOST_USER_POSTCOPY_ADVISE request.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:38 +0000 (14:40 +0200)]
vhost: add config flag for postcopy
Postcopy live-migration features relies on userfaultfd,
which was only introduced in kernel v4.3.
This patch introduces a new define to allow building vhost
library on kernels not supporting userfaultfd.
With legacy build system, user has to explicitly set
CONFIG_RTE_LIBRTE_VHOST_POSTCOPY to 'y'.
With Meson build system, RTE_LIBRTE_VHOST_POSTCOPY gets
automatically defined if userfaultfd kernel header is
present.
Suggested-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:37 +0000 (14:40 +0200)]
vhost: enable fds passing in vhost-user messages
Passing userfault fds to Qemu will be required for postcopy
live-migration feature.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:36 +0000 (14:40 +0200)]
vhost: pass socket fd to message handling callbacks
This is not used for now, but will be needed for the
special handling of VHOST_USER_SET_MEM_TABLE message
once postcopy will be supported.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:35 +0000 (14:40 +0200)]
vhost: add number of fds to vhost-user messages
As soon as some ancillary data (fds) are received, it is copied
without checking its length.
This patch adds the number of fds received to the message,
which is set in read_vhost_message().
This is preliminary work to support sending fds to Qemu.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:34 +0000 (14:40 +0200)]
vhost: define postcopy protocol flag
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:33 +0000 (14:40 +0200)]
vhost: fix error handling when mem table gets updated
When the memory table gets updated, the rings addresses need
to be translated again. If it fails, we need to exit cleanly
by unmapping memory regions.
Fixes:
d5022533c20a ("vhost: retranslate vring addr when memory table changes")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:32 +0000 (14:40 +0200)]
vhost: fix payload size of reply
QEMU doesn't expect any payload for the reply of
VHOST_USER_SET_LOG_BASE request, so don't send any.
Note that the Vhost-user specification isn't clear about
it and would need to be fixed.
Fixes:
54f9e32305d4 ("vhost: handle dirty pages logging request")
Cc: stable@dpdk.org
Reported-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:31 +0000 (14:40 +0200)]
vhost: clarify reply-ack in case a reply was already sent
For messages that require a reply, a second ack should not be
sent when reply-ack protocol feature is negotiated, even if
the corresponding flag is set in the message.
The code is compliant with the spec but it isn't clear it is,
so this patch adds a comment to make it explicit.
Suggested-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:30 +0000 (14:40 +0200)]
vhost: fix return code of messages requiring replies
VHOST_USER_GET_PROTOCOL_FEATURES, VHOST_USER_GET_VRING_BASE
and VHOST_USER_SET_LOG_BASE require replies, so their handlers
should return VH_RESULT_REPLY, not VH_RESULT_OK.
Fixes:
0bff510b5ea6 ("vhost: unify message handling function signature")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Maxime Coquelin [Fri, 12 Oct 2018 12:40:29 +0000 (14:40 +0200)]
vhost: fix messages results handling
Return of message handling has now changed to an enum that can
take non-negative value that is not zero in case a reply is
needed. But the code checking the variable afterwards has not
been updated, leading to success messages handling being
treated as errors.
External post and pre callbacks return type needs also to be
changed to the new enum, so that its handling is consistent.
This is done in this patch alongside with the convertion of
its only user, vhost-crypto backend.
Fixes:
0bff510b5ea6 ("vhost: unify message handling function signature")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xiaolong Ye [Fri, 12 Oct 2018 08:52:21 +0000 (16:52 +0800)]
vhost: add doxygen comment to vDPA header
As APIs in rte_vdpa.h are public, we need to add doxygen comments
to all APIs and structures.
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tiwei Bie [Thu, 11 Oct 2018 14:22:34 +0000 (22:22 +0800)]
vhost: fix notification for packed ring
The notification can't be disabled in packed ring when
application tries to disable notification, because the
device event flags field is overwritten by an unexpected
value. This patch fixes this issue.
Fixes:
b1cce26af1dc ("vhost: add notification for packed ring")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Xiaoyu Min [Thu, 11 Oct 2018 13:31:46 +0000 (13:31 +0000)]
net/mlx5: rewrite MAC address by E-Switch
Offload following modify MAC address actions to E-Switch
via TC-Flower driver
- RTE_FLOW_ACTION_TYPE_SET_MAC_SRC
- RTE_FLOW_ACTION_TYPE_SET_MAC_DST
The corresponding rte_flow_item_eth must be present in
rte_flow pattern
Only support modify outer layer MAC address
The example testpmd command is:
flow create 0 transfer ingress
pattern eth / ipv4 / udp dst is 7000 / end
actions set_mac_dst mac_addr dd:00:aa:11:bb:33 /
set_mac_src mac_addr bb:00:cc:11:aa:22 /
port_id id 1 / end
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Xiaoyu Min [Thu, 11 Oct 2018 13:31:43 +0000 (13:31 +0000)]
app/testpmd: add commands to modify MAC address
add commands to support following actions:
- RTE_FLOW_ACTION_TYPE_SET_MAC_SRC
- RTE_FLOW_ACTION_TYPE_SET_MAC_DST
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Xiaoyu Min [Thu, 11 Oct 2018 13:31:39 +0000 (13:31 +0000)]
ethdev: add generic MAC address rewrite actions
rte_flow actions:
- RTE_FLOW_ACTION_TYPE_SET_MAC_SRC
- RTE_FLOW_ACTION_TYPE_SET_MAC_DST
added in order to offload to NIC
The rte_flow_itme_eth must be present in rte_flow pattern
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Xiaoyu Min [Tue, 16 Oct 2018 08:14:30 +0000 (08:14 +0000)]
net/mlx5: rewrite TTL by E-Switch
Offload following modify TTL actions to E-Switch via
TC-Flower driver
- RTE_FLOW_ACTION_TYPE_SET_TTL
- RTE_FLOW_ACTION_TYPE_DEC_TTL
The corresponding IP protocol rte_flow_item_ipv[4|6]
must be present in rte_flow pattern otherwith PMD
return error
The example testpmd commands are:
flow create 0 transfer ingress
pattern eth / ipv4 / udp dst is 7000 / end
actions dec_ttl /
port_id id 1 / end
flow create 0 transfer ingress
pattern eth / ipv4 / udp dst is 7001 / end
actions set_ttl ttl_value 10 /
port_id id 1 / end
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Xiaoyu Min [Tue, 16 Oct 2018 08:14:27 +0000 (08:14 +0000)]
app/testpmd: add commands to modify TTL
add commands which supports following TTL actions:
- RTE_FLOW_ACTION_TYPE_DEC_TTL
- RTE_FLOW_ACTION_TYPE_SET_TTL
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Xiaoyu Min [Tue, 16 Oct 2018 08:14:23 +0000 (08:14 +0000)]
ethdev: add generic TTL rewrite actions
rewrite TTL by decrease or just set it directly
it's not necessary to check if the final result
is zero or not
This is slightly different from the one defined
by openflow and more generic
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Alejandro Lucero [Mon, 15 Oct 2018 14:11:02 +0000 (15:11 +0100)]
ethdev: add field for device data per process
Primary and secondary processes share a per-device private data. With
current design it is not possible to have data per-device per-process.
This is required for handling properly the CPP interface inside the NFP
PMD with multiprocess support.
There is also at least another PMD driver, tap, with similar
requirements for per-process device data.
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiaoyun Li [Mon, 15 Oct 2018 04:36:34 +0000 (00:36 -0400)]
doc: add ixgbe known issue with legacy interrrupt
When using uio_pci_generic module or using legacy interrupt mode of
igb_uio or vfio, X550 cannot get interrupts. Because the Interrupt
Status bit is not implemented, then the irq cannot be handled correctly
and cannot report the event fd to DPDK apps.
Add this hw limitation and details into ixgbe known issue.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Rahul Lakkireddy [Mon, 15 Oct 2018 14:05:13 +0000 (19:35 +0530)]
net/cxgbe: add action to swap MAC addresses
Implement RTE_FLOW_ACTION_TYPE_MAC_SWAP to offload flows with
action to swap the source and destination MAC addresses in the
outermost Ethernet header.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Ed Czeck [Mon, 15 Oct 2018 12:53:26 +0000 (08:53 -0400)]
net/ark: support updated hardware and Tx meta data
Support for version 2 of DDM hardware and user tx meta data.
Verify version during initialization.
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Ed Czeck [Mon, 15 Oct 2018 12:53:11 +0000 (08:53 -0400)]
net/ark: remove useless hardware notifications
Only send notification to mpu when crossing 64 index boundary.
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Ed Czeck [Mon, 15 Oct 2018 12:52:41 +0000 (08:52 -0400)]
net/ark: add recovery for lack of mbufs
Attempt to allocate smaller chunk of mbufs when larger amount is
not available. Report error when small chunk not available.
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Phil Yang [Fri, 12 Oct 2018 09:34:55 +0000 (17:34 +0800)]
app/testpmd: fix vdev socket initialization
The cmdline settings of port-numa-config and rxring-numa-config have
been flushed by the following init_config. If we don't configure the
port-numa-config, the virtual device will allocate the device ports to
socket 0. It will cause failure when the socket 0 is unavailable.
eg:
testpmd -l <cores from socket 1> --vdev net_pcap0,iface=lo
--socket-mem=64 -- --numa --port-numa-config="(0,1)"
--ring-numa-config="(0,1,1),(0,2,1)" -i
...
Configuring Port 0 (socket 0)
Failed to setup RX queue:No mempool allocation on the socket 0
EAL: Error - exiting with code: 1
Cause: Start ports failed
Fix by allocate the devices port to the first available socket or the
socket configured in port-numa-config.
Fixes:
487f9a592a27 ("app/testpmd: fix NUMA structures initialization")
Fixes:
20a0286fd2c0 ("app/testpmd: check socket id validity")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Fri, 12 Oct 2018 23:42:52 +0000 (16:42 -0700)]
net/qede: remove invalid config option checks
Now that logging of initialization is controlled by dynamic debug
level, remove the #ifdef for RTE_LIBRTE_QEDE_DEBUG_INIT since that
config option does not exist in common_base and is not documented.
Fixes:
69b6573980c1 ("net/qede: implement dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Fri, 12 Oct 2018 23:42:51 +0000 (16:42 -0700)]
doc: remove invalid config options from liquidio guide
The config options for init and debug driver were replaced by
dynamic log levels.
Fixes:
70e28c612d65 ("net/liquidio: implement dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Fri, 12 Oct 2018 23:42:50 +0000 (16:42 -0700)]
doc: remove invalid config option from ena guide
The ena driver has used dynamic log type to enable init debugging since
18.05 but the documentation still has leftover mention of the config
option.
Fixes:
8bc0acae970d ("net/ena: implement dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Haiyue Wang [Sun, 14 Oct 2018 02:34:05 +0000 (10:34 +0800)]
net/avf: fix build with debug enabled
DEBUG_DUMP_DESC flag is enabled/disabled from Makefile and enabling it
causing the build issue.
Add the missed 'volatile' keyword to avoid the warning for type
mismatch, which will be treated as compiler error if WERROR_FLAGS
is enabled.
Fixes:
bfd38e4d708b ("net/avf: fix missing compiler error flags")
CC: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiaoyu Min [Mon, 15 Oct 2018 01:45:23 +0000 (01:45 +0000)]
net/mlx5: fix build with zero-size array
If the build environment doesn't have 'linux/tc_act/tc_pedit.h' header,
compiler will use needed structs defined in mlx5_flow_tcf.c.
However, there is a zero-size array defined in one struct and
ISO C forbids this when -Wpedantic is set by debug mode.
Simply put __extension__ keyword before the struct in question.
Fixes:
2ed2fe5f0a9c ("net/mlx5: rewrite IP address UDP/TCP port by E-Switch")
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Yongseok Koh [Fri, 12 Oct 2018 08:42:33 +0000 (08:42 +0000)]
net/mlx5: support multiple groups and jump action
rte_flow has 'group' attribute and 'jump' action in order to support
multiple groups. This feature is known as multi-table support ('chain' in
linux TC flower) in general because a group means a table of flows. Example
commands are:
flow create 0 transfer priority 1 ingress
pattern eth / vlan vid is 100 / end
actions jump group 1 / end
flow create 0 transfer priority 1 ingress
pattern eth / vlan vid is 200 / end
actions jump group 2 / end
flow create 0 transfer group 1 priority 2 ingress
pattern eth / vlan vid is 100 /
ipv4 dst spec 192.168.40.0 dst prefix 24 / end
actions drop / end
flow create 0 transfer group 1 priority 2 ingress
pattern end
actions of_pop_vlan / port_id id 1 / end
flow create 0 transfer group 2 priority 2 ingress
pattern eth / vlan vid is 200 /
ipv4 dst spec 192.168.40.0 dst prefix 24 / end
actions of_pop_vlan / port_id id 2 / end
flow create 0 transfer group 2 priority 2 ingress
pattern end
actions port_id id 2 / end
With theses flows, if a packet having vlan 200 and src_ip as 192.168.40.1,
this packet will firstly hit the 1st flow. Then it will hit the 5th flow
because of the 'jump' action. As a result, the packet will be forwarded to
port 2 (VF representor) with vlan tag being stripped off. If the packet had
vlan 100 instead, it would be dropped by the 3rd flow.
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Igor Russkikh [Fri, 12 Oct 2018 11:09:55 +0000 (11:09 +0000)]
net/atlantic: add release notes
Release notes for Aquantia atlantic driver.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:53 +0000 (11:09 +0000)]
net/atlantic: read MAC registers for debug purposes
This patch add support for dumping MAC registers.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:51 +0000 (11:09 +0000)]
net/atlantic: implement EEPROM get/set
Add support for EEPROM reading/writing.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:49 +0000 (11:09 +0000)]
net/atlantic: implement VLAN filters and offloads
VLAN filters and VLAN offloads implementation.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:45 +0000 (11:09 +0000)]
net/atlantic: implement MTU configuration
Add support for updating MTU value.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:43 +0000 (11:09 +0000)]
net/atlantic: implement MAC address manipulations
Add support for adding/removing MAC addresses.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:41 +0000 (11:09 +0000)]
net/atlantic: add flow control configuration
Add support for flow control feature.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Igor Russkikh [Fri, 12 Oct 2018 11:09:38 +0000 (11:09 +0000)]
net/atlantic: implement RSS and RETA manipulation API
Add support for Receive Side Scaling feature.
RSS hash and reta table configuration.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:36 +0000 (11:09 +0000)]
net/atlantic: implement promisc and allmulti modes
Add support for promiscuous/allmulticast modes configuration.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:34 +0000 (11:09 +0000)]
net/atlantic: add Rx/Tx descriptors information
Add support for Rx/Tx descriptors status information.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:31 +0000 (11:09 +0000)]
net/atlantic: implement device statistics
Add support for device stats, xstats and queue stats
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:29 +0000 (11:09 +0000)]
net/atlantic: add link status and interrupt management
Implement link interrupt, link info, link polling.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:27 +0000 (11:09 +0000)]
net/atlantic: implement Tx path
Add implementation for TX datapath.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Igor Russkikh [Fri, 12 Oct 2018 11:09:25 +0000 (11:09 +0000)]
net/atlantic: implement Rx path
Add implementation for RX datapath.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:22 +0000 (11:09 +0000)]
net/atlantic: implement core logic for Tx/Rx
Add RX/TX function prototypes for further datapath development.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Fri, 12 Oct 2018 11:09:20 +0000 (11:09 +0000)]
net/atlantic: configure device start/stop
Start, stop and reset are all done via hw_atl layer.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Igor Russkikh [Fri, 12 Oct 2018 11:09:17 +0000 (11:09 +0000)]
net/atlantic: add b0 hardware layer
This is hw_atl logic layer derived from linux atlantic
driver. It contains RX/TX hardware initialization
sequences, various hw configuration.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Igor Russkikh [Fri, 12 Oct 2018 11:09:14 +0000 (11:09 +0000)]
net/atlantic: implement firmware operations
AQC NICs comes in fields with two major
FW generations: 1x and 3x.
This is part of linux atlantic driver shared code,
responsible for internal NIC firmware interactions,
including link management ops, FW initialization,
various lifecycle features.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Igor Russkikh [Fri, 12 Oct 2018 11:09:11 +0000 (11:09 +0000)]
net/atlantic: add hardware access layer
This patch introduces hw_atl layer which is maintained
in sync with linux kernel driver.
It will generally be in sync with linux upstream.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Igor Russkikh [Fri, 12 Oct 2018 11:09:08 +0000 (11:09 +0000)]
net/atlantic: add hardware registers access routines
Add implementation for hardware registers access routines.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Igor Russkikh [Fri, 12 Oct 2018 11:09:06 +0000 (11:09 +0000)]
net/atlantic: add logging structure
Implement logging macroses for debug purposes.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>