net/dpaa2: global symbol fixes
cover net/dpaa2: global symbol fixes
While looking at how some PMD's are sloppy about exporting global symbol names, found that dpaa2 driver was defining some globals that could cause problems.
These need to be tested on real hardware.
Stephen Hemminger (3):
net/dpaa2: remove unused frame array
net/dpaa2: make local array static
net/dpaa2: make total rx descriptors per device
drivers/net/dpaa2/dpaa2_ethdev.c | 9 +-- drivers/net/dpaa2/dpaa2_ethdev.h | 1 + drivers/net/dpaa2/dpaa2_sparser.c | 119 +----------------------------- 3 files changed, 6 insertions(+), 123 deletions(-)
Signature · 1 line
2.47.3
PATCH 1/3 net/dpaa2: remove unused frame array
The frame attribute variables were global but never used. Tried making them local, but then compiler flags as unused so remove them.
--- drivers/net/dpaa2/dpaa2_sparser.c | 117 ------------------------------ 1 file changed, 117 deletions(-)
drivers/net/dpaa2/dpaa2_sparser.c +0 -117
@@ -28,123 +28,6 @@ uint8_t wriop_bytecode[] = {0x18 ,0x00 ,0x87 ,0x3c ,0x00 ,0x02 ,0x18 ,0x00 ,0x00 ,0x00 }; -struct frame_attr frame_attr_arr[] = { -/* Frame Attribute Flags 1 */ -/* 000 */ {"Routing header present in IPv6 header 2 " ,0 ,0x80000000 }, -/* 001 */ {"GTP Primed was detected " ,0 ,0x40000000 }, -/* 002 */ {"VLAN with VID = 0 was detected " ,0 ,0x20000000 }, -/* 003 */ {"A PTP frame was detected " ,0 ,0x10000000 }, -/* 004 */ {"VXLAN was parsed " ,0 ,0x08000000 }, -/* 005 */ {"A VXLAN HXS parsing error was detected " ,0 ,0x04000000 }, -/* 006 */ {"Ethernet control protocol was detected " ,0 ,0x02000000 }, -/* 007 */ {"IKE was detected at UDP port 4500 " ,0 ,0x01000000 }, -/* 008 */ {"Shim Shell Soft Parsing Error " ,0 ,0x00800000 }, -/* 009 */ {"Parsing Error " ,0 ,0x00400000 }, -/* 010 */ {"Ethernet MAC Present " ,0 ,0x00200000 }, -/* 011 */ {"Ethernet Unicast " ,0 ,0x00100000 }, -/* 012 */ {"Ethernet Multicast " ,0 ,0x00080000 }, -/* 013 */ {"Ethernet Broadcast " ,0 ,0x00040000 }, -/* 014 */ {"BPDU frame (MAC DA is 01:80:C2:00:00:00)" ,0 ,0x00020000 }, -/* 015 */ {"FCoE detected (Ether type is 0x8906) " ,0 ,0x00010000 }, -/* 016 */ {"FIP detected (Ether type is 0x8914) " ,0 ,0x00008000 }, -/* 017 */ {"Ethernet Parsing Error " ,0 ,0x00004000 }, -/* 018 */ {"LLC+SNAP Present " ,0 ,0x00002000 }, -/* 019 */ {"Unknown LLC/OUI " ,0 ,0x00001000 }, -/* 020 */ {"LLC+SNAP Error " ,0 ,0x00000800 }, -/* 021 */ {"VLAN 1 Present " ,0 ,0x00000400 }, -/* 022 */ {"VLAN n Present " ,0 ,0x00000200 }, -/* 023 */ {"CFI bit in a \"8100\" VLAN tag is set " ,0 ,0x00000100 }, -/* 024 */ {"VLAN Parsing Error " ,0 ,0x00000080 }, -/* 025 */ {"PPPoE+PPP Present " ,0 ,0x00000040 }, -/* 026 */ {"PPPoE+PPP Parsing Error " ,0 ,0x00000020 }, -/* 027 */ {"MPLS 1 Present " ,0 ,0x00000010 }, -/* 028 */ {"MPLS n Present " ,0 ,0x00000008 }, -/* 029 */ {"MPLS Parsing Error " ,0 ,0x00000004 }, -/* 030 */ {"ARP frame Present (Ethertype 0x0806) " ,0 ,0x00000002 }, -/* 031 */ {"ARP Parsing Error " ,0 ,0x00000001 }, -/* Frame Attribute Flags 2 */ -/* 032 */ {"L2 Unknown Protocol " ,1 ,0x80000000 }, -/* 033 */ {"L2 Soft Parsing Error " ,1 ,0x40000000 }, -/* 034 */ {"IPv4 1 Present " ,1 ,0x20000000 }, -/* 035 */ {"IPv4 1 Unicast " ,1 ,0x10000000 }, -/* 036 */ {"IPv4 1 Multicast " ,1 ,0x08000000 }, -/* 037 */ {"IPv4 1 Broadcast " ,1 ,0x04000000 }, -/* 038 */ {"IPv4 n Present " ,1 ,0x02000000 }, -/* 039 */ {"IPv4 n Unicast " ,1 ,0x01000000 }, -/* 040 */ {"IPv4 n Multicast " ,1 ,0x00800000 }, -/* 041 */ {"IPv4 n Broadcast " ,1 ,0x00400000 }, -/* 042 */ {"IPv6 1 Present " ,1 ,0x00200000 }, -/* 043 */ {"IPv6 1 Unicast " ,1 ,0x00100000 }, -/* 044 */ {"IPv6 1 Multicast " ,1 ,0x00080000 }, -/* 045 */ {"IPv6 n Present " ,1 ,0x00040000 }, -/* 046 */ {"IPv6 n Unicast " ,1 ,0x00020000 }, -/* 047 */ {"IPv6 n Multicast " ,1 ,0x00010000 }, -/* 048 */ {"IP 1 option present " ,1 ,0x00008000 }, -/* 049 */ {"IP 1 Unknown Protocol " ,1 ,0x00004000 }, -/* 050 */ {"IP 1 Packet is a fragment " ,1 ,0x00002000 }, -/* 051 */ {"IP 1 Packet is an initial fragment " ,1 ,0x00001000 }, -/* 052 */ {"IP 1 Parsing Error " ,1 ,0x00000800 }, -/* 053 */ {"IP n option present " ,1 ,0x00000400 }, -/* 054 */ {"IP n Unknown Protocol " ,1 ,0x00000200 }, -/* 055 */ {"IP n Packet is a fragment " ,1 ,0x00000100 }, -/* 056 */ {"IP n Packet is an initial fragment " ,1 ,0x00000080 }, -/* 057 */ {"ICMP detected (IP proto is 1) " ,1 ,0x00000040 }, -/* 058 */ {"IGMP detected (IP proto is 2) " ,1 ,0x00000020 }, -/* 059 */ {"ICMPv6 detected (IP proto is 3a) " ,1 ,0x00000010 }, -/* 060 */ {"UDP Light detected (IP proto is 136) " ,1 ,0x00000008 }, -/* 061 */ {"IP n Parsing Error " ,1 ,0x00000004 }, -/* 062 */ {"Min. Encap Present " ,1 ,0x00000002 }, -/* 063 */ {"Min. Encap S flag set " ,1 ,0x00000001 }, -/* Frame Attribute Flags 3 */ -/* 064 */ {"Min. Encap Parsing Error " ,2 ,0x80000000 }, -/* 065 */ {"GRE Present " ,2 ,0x40000000 }, -/* 066 */ {"GRE R bit set " ,2 ,0x20000000 }, -/* 067 */ {"GRE Parsing Error " ,2 ,0x10000000 }, -/* 068 */ {"L3 Unknown Protocol " ,2 ,0x08000000 }, -/* 069 */ {"L3 Soft Parsing Error " ,2 ,0x04000000 }, -/* 070 */ {"UDP Present " ,2 ,0x02000000 }, -/* 071 */ {"UDP Parsing Error " ,2 ,0x01000000 }, -/* 072 */ {"TCP Present " ,2 ,0x00800000 }, -/* 073 */ {"TCP options present " ,2 ,0x00400000 }, -/* 074 */ {"TCP Control bits 6-11 set " ,2 ,0x00200000 }, -/* 075 */ {"TCP Control bits 3-5 set " ,2 ,0x00100000 }, -/* 076 */ {"TCP Parsing Error " ,2 ,0x00080000 }, -/* 077 */ {"IPSec Present " ,2 ,0x00040000 }, -/* 078 */ {"IPSec ESP found " ,2 ,0x00020000 }, -/* 079 */ {"IPSec AH found " ,2 ,0x00010000 }, -/* 080 */ {"IPSec Parsing Error " ,2 ,0x00008000 }, -/* 081 */ {"SCTP Present " ,2 ,0x00004000 }, -/* 082 */ {"SCTP Parsing Error " ,2 ,0x00002000 }, -/* 083 */ {"DCCP Present " ,2 ,0x00001000 }, -/* 084 */ {"DCCP Parsing Error " ,2 ,0x00000800 }, -/* 085 */ {"L4 Unknown Protocol " ,2 ,0x00000400 }, -/* 086 */ {"L4 Soft Parsing Error " ,2 ,0x00000200 }, -/* 087 */ {"GTP Present " ,2 ,0x00000100 }, -/* 088 */ {"GTP Parsing Error " ,2 ,0x00000080 }, -/* 089 */ {"ESP Present " ,2 ,0x00000040 }, -/* 090 */ {"ESP Parsing Error " ,2 ,0x00000020 }, -/* 091 */ {"iSCSI detected (Port# 860) " ,2 ,0x00000010 }, -/* 092 */ {"Capwap-control detected (Port# 5246) " ,2 ,0x00000008 }, -/* 093 */ {"Capwap-data detected (Port# 5247) " ,2 ,0x00000004 }, -/* 094 */ {"L5 Soft Parsing Error " ,2 ,0x00000002 }, -/* 095 */ {"IPv6 Route hdr1 present " ,2 ,0x00000001 }, -/* 096 */ {NULL ,0 ,0x00000000 } -}; - -struct frame_attr_ext frame_attr_ext_arr[] = { -/* Frame Attribute Flags Extension */ -/* 096 */ {"User defined soft parser bit #0 " ,0 ,0x8000 }, -/* 096 */ {"User defined soft parser bit #1 " ,0 ,0x4000 }, -/* 096 */ {"User defined soft parser bit #2 " ,0 ,0x2000 }, -/* 096 */ {"User defined soft parser bit #3 " ,0 ,0x1000 }, -/* 096 */ {"User defined soft parser bit #4 " ,0 ,0x0800 }, -/* 096 */ {"User defined soft parser bit #5 " ,0 ,0x0400 }, -/* 096 */ {"User defined soft parser bit #6 " ,0 ,0x0200 }, -/* 096 */ {"User defined soft parser bit #7 " ,0 ,0x0100 }, -/* 097 */ {"Reserved " ,0 ,0x00ff }, -/* 112 */ {NULL ,0 ,0x0000 } -}; -int dpaa2_eth_load_wriop_soft_parser (struct dpaa2_dev_priv *priv,enum dpni_soft_sequence_dest dest) {
Signature · 1 line
2.47.3
Re: [RFT 1/3] net/dpaa2: remove unused frame array
Quoted 8 lines · Stephen Hemminger
The frame attribute variables were global but never used. Tried making them local, but then compiler flags as unused so remove them.
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/dpaa2/dpaa2_sparser.c | 117 ------------------------------ 1 file changed, 117 deletions(-)
PATCH 2/3 net/dpaa2: make local array static
In reply to Stephen HemmingerThe table wriop_bytecode can be static to avoid name conflicts.
--- drivers/net/dpaa2/dpaa2_sparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dpaa2/dpaa2_sparser.c +1 -1
@@ -23,7 +23,7 @@#include <stdint.h> #include <inttypes.h> -uint8_t wriop_bytecode[] = { +static uint8_t wriop_bytecode[] = {0x00 ,0x04 ,0x29 ,0x42 ,0x03 ,0xe0 ,0x12 ,0x00 ,0x29 ,0x02 ,0x18 ,0x00 ,0x87 ,0x3c ,0x00 ,0x02 ,0x18 ,0x00 ,0x00 ,0x00 };
Signature · 1 line
2.47.3
Re: [RFT 2/3] net/dpaa2: make local array static
Quoted 12 lines · Stephen Hemminger
The table
wriop_bytecodecan be static to avoid name conflicts.Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/dpaa2/dpaa2_sparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/dpaa2/dpaa2_sparser.c +0
-0
drivers/net/dpaa2/dpaa2_sparser.c line 29
Quoted 8 lines
drivers/net/dpaa2/dpaa2_sparser.c +1
-1@@ -23,7 +23,7 @@#include <stdint.h> #include <inttypes.h> -uint8_t wriop_bytecode[] = { +static uint8_t wriop_bytecode[] = {0x00 ,0x04 ,0x29 ,0x42 ,0x03 ,0xe0 ,0x12 ,0x00 ,0x29 ,0x02 ,0x18 ,0x00 ,0x87 ,0x3c ,0x00 ,0x02 ,0x18 ,0x00 ,0x00 ,0x00 };
PATCH 3/3 net/dpaa2: make total rx descriptors per device
In reply to Stephen HemmingerThe limit on number of receive descriptors should be per-device. Discovered while looking at globally exported symbols.
--- drivers/net/dpaa2/dpaa2_ethdev.c | 9 ++++----- drivers/net/dpaa2/dpaa2_ethdev.h | 1 + 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/dpaa2/dpaa2_ethdev.c +4 -5
@@ -79,7 +79,6 @@ bool dpaa2_enable_err_queue;bool dpaa2_print_parser_result;#define MAX_NB_RX_DESC 11264 -int total_nb_rx_desc;int dpaa2_valid_dev;struct rte_mempool *dpaa2_tx_sg_pool;
@@ -720,9 +719,9 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,DPAA2_PMD_DEBUG ("dev =%p, queue =%d, pool = %p, conf =%p" , dev, rx_queue_id, mb_pool, rx_conf); - total_nb_rx_desc += nb_rx_desc; -if (total_nb_rx_desc >MAX_NB_RX_DESC ) { -DPAA2_PMD_WARN ("Total nb_rx_desc exceeds %d limit. Please use Normal buffers" , + priv->nb_rx_desc += nb_rx_desc; +if (priv->nb_rx_desc >MAX_NB_RX_DESC ) { +DPAA2_PMD_WARN ("Total nb_rx_desc exceeds %u limit. Please use Normal buffers" ,MAX_NB_RX_DESC );DPAA2_PMD_WARN ("To use Normal buffers, run 'export DPNI_NORMAL_BUF=1' before running dynamic_dpl.sh script" ); }
@@ -1029,7 +1028,7 @@ dpaa2_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t rx_queue_id)memset (&cfg,0 ,sizeof (struct dpni_queue ));PMD_INIT_FUNC_TRACE (); - total_nb_rx_desc -= dpaa2_q->nb_desc; + priv->nb_rx_desc -= dpaa2_q->nb_desc;if (dpaa2_q->cgid !=DPAA2_INVALID_CGID ) { options =DPNI_QUEUE_OPT_CLEAR_CGID ;
drivers/net/dpaa2/dpaa2_ethdev.h +1 -0
@@ -385,6 +385,7 @@ struct dpaa2_dev_priv {uint8_t num_tx_tc;uint16_t qos_entries;uint16_t fs_entries; +uint16_t nb_rx_desc;uint8_t dist_queues;uint8_t num_channels;uint8_t en_ordered;
Signature · 1 line
2.47.3
Hemant Agrawal
NAKRe: [RFT 3/3] net/dpaa2: make total rx descriptors per device
Quoted 17 lines · Stephen Hemminger
The limit on number of receive descriptors should be per-device. Discovered while looking at globally exported symbols.
Fixes 35dc25d12792 ("net/dpaa2: warn on high Rx descriptor number")Signed-off-by Stephen Hemminger<[email protected]>--- drivers/net/dpaa2/dpaa2_ethdev.c | 9 ++++----- drivers/net/dpaa2/dpaa2_ethdev.h | 1 + 2 files changed, 5 insertions(+), 5 deletions(-)drivers/net/dpaa2/dpaa2_ethdev.c +0
-0
drivers/net/dpaa2/dpaa2_ethdev.c bool dpaa2_enable_err_queue; · line 82
Quoted 4 lines
drivers/net/dpaa2/dpaa2_ethdev.c +0
-1@@ -79,7 +79,6 @@ bool dpaa2_enable_err_queue;bool dpaa2_print_parser_result;#define MAX_NB_RX_DESC 11264 -int total_nb_rx_desc;
NACK, However, we can change it to static variable.
DPAA2 supports two methods for allocating the RX descriptors.
1. Fast memory - low-latency PEB memory - The size is limited, so we globally track the number of buffers across devices.
2. Normal memory - no limit as they are from DDR.
This variable help in tracking that overall rx descriptor across devices are not crossing the memory limit of MAX_NB_RX_DESC
Quoted 37 lines
drivers/net/dpaa2/dpaa2_ethdev.c +4
-4int dpaa2_valid_dev;struct rte_mempool *dpaa2_tx_sg_pool;@@ -720,9 +719,9 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,DPAA2_PMD_DEBUG ("dev =%p, queue =%d, pool = %p, conf =%p" , dev, rx_queue_id, mb_pool, rx_conf); - total_nb_rx_desc += nb_rx_desc; -if (total_nb_rx_desc >MAX_NB_RX_DESC ) { -DPAA2_PMD_WARN ("Total nb_rx_desc exceeds %d limit. Please use Normal buffers" , + priv->nb_rx_desc += nb_rx_desc; +if (priv->nb_rx_desc >MAX_NB_RX_DESC ) { +DPAA2_PMD_WARN ("Total nb_rx_desc exceeds %u limit. Please use Normal buffers" ,MAX_NB_RX_DESC );DPAA2_PMD_WARN ("To use Normal buffers, run 'export DPNI_NORMAL_BUF=1' before running dynamic_dpl.sh script" ); }@@ -1029,7 +1028,7 @@ dpaa2_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t rx_queue_id)memset (&cfg,0 ,sizeof (struct dpni_queue ));PMD_INIT_FUNC_TRACE (); - total_nb_rx_desc -= dpaa2_q->nb_desc; + priv->nb_rx_desc -= dpaa2_q->nb_desc;if (dpaa2_q->cgid !=DPAA2_INVALID_CGID ) { options =DPNI_QUEUE_OPT_CLEAR_CGID ;drivers/net/dpaa2/dpaa2_ethdev.h +1
-0@@ -385,6 +385,7 @@ struct dpaa2_dev_priv {uint8_t num_tx_tc;uint16_t qos_entries;uint16_t fs_entries; +uint16_t nb_rx_desc;uint8_t dist_queues;uint8_t num_channels;uint8_t en_ordered;
v2 cover net/dpaa2: make symbols static
In reply to Stephen HemmingerWhile looking at how some PMD's are sloppy about exporting global symbol names, found that dpaa2 driver was defining some globals that could cause problems.
Stephen Hemminger (3):
net/dpaa2: remove unused frame array
net/dpaa2: make local array static
net/dpaa2: make total_rx_descriptors static
drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_sparser.c | 119 +----------------------------- 2 files changed, 2 insertions(+), 119 deletions(-)
Signature · 1 line
2.47.3
PATCH v2 1/3 net/dpaa2: remove unused frame array
The frame attribute variables were global but never used. Tried making them local, but then compiler flags as unused so remove them.
--- drivers/net/dpaa2/dpaa2_sparser.c | 117 ------------------------------ 1 file changed, 117 deletions(-)
drivers/net/dpaa2/dpaa2_sparser.c +0 -117
@@ -28,123 +28,6 @@ uint8_t wriop_bytecode[] = {0x18 ,0x00 ,0x87 ,0x3c ,0x00 ,0x02 ,0x18 ,0x00 ,0x00 ,0x00 }; -struct frame_attr frame_attr_arr[] = { -/* Frame Attribute Flags 1 */ -/* 000 */ {"Routing header present in IPv6 header 2 " ,0 ,0x80000000 }, -/* 001 */ {"GTP Primed was detected " ,0 ,0x40000000 }, -/* 002 */ {"VLAN with VID = 0 was detected " ,0 ,0x20000000 }, -/* 003 */ {"A PTP frame was detected " ,0 ,0x10000000 }, -/* 004 */ {"VXLAN was parsed " ,0 ,0x08000000 }, -/* 005 */ {"A VXLAN HXS parsing error was detected " ,0 ,0x04000000 }, -/* 006 */ {"Ethernet control protocol was detected " ,0 ,0x02000000 }, -/* 007 */ {"IKE was detected at UDP port 4500 " ,0 ,0x01000000 }, -/* 008 */ {"Shim Shell Soft Parsing Error " ,0 ,0x00800000 }, -/* 009 */ {"Parsing Error " ,0 ,0x00400000 }, -/* 010 */ {"Ethernet MAC Present " ,0 ,0x00200000 }, -/* 011 */ {"Ethernet Unicast " ,0 ,0x00100000 }, -/* 012 */ {"Ethernet Multicast " ,0 ,0x00080000 }, -/* 013 */ {"Ethernet Broadcast " ,0 ,0x00040000 }, -/* 014 */ {"BPDU frame (MAC DA is 01:80:C2:00:00:00)" ,0 ,0x00020000 }, -/* 015 */ {"FCoE detected (Ether type is 0x8906) " ,0 ,0x00010000 }, -/* 016 */ {"FIP detected (Ether type is 0x8914) " ,0 ,0x00008000 }, -/* 017 */ {"Ethernet Parsing Error " ,0 ,0x00004000 }, -/* 018 */ {"LLC+SNAP Present " ,0 ,0x00002000 }, -/* 019 */ {"Unknown LLC/OUI " ,0 ,0x00001000 }, -/* 020 */ {"LLC+SNAP Error " ,0 ,0x00000800 }, -/* 021 */ {"VLAN 1 Present " ,0 ,0x00000400 }, -/* 022 */ {"VLAN n Present " ,0 ,0x00000200 }, -/* 023 */ {"CFI bit in a \"8100\" VLAN tag is set " ,0 ,0x00000100 }, -/* 024 */ {"VLAN Parsing Error " ,0 ,0x00000080 }, -/* 025 */ {"PPPoE+PPP Present " ,0 ,0x00000040 }, -/* 026 */ {"PPPoE+PPP Parsing Error " ,0 ,0x00000020 }, -/* 027 */ {"MPLS 1 Present " ,0 ,0x00000010 }, -/* 028 */ {"MPLS n Present " ,0 ,0x00000008 }, -/* 029 */ {"MPLS Parsing Error " ,0 ,0x00000004 }, -/* 030 */ {"ARP frame Present (Ethertype 0x0806) " ,0 ,0x00000002 }, -/* 031 */ {"ARP Parsing Error " ,0 ,0x00000001 }, -/* Frame Attribute Flags 2 */ -/* 032 */ {"L2 Unknown Protocol " ,1 ,0x80000000 }, -/* 033 */ {"L2 Soft Parsing Error " ,1 ,0x40000000 }, -/* 034 */ {"IPv4 1 Present " ,1 ,0x20000000 }, -/* 035 */ {"IPv4 1 Unicast " ,1 ,0x10000000 }, -/* 036 */ {"IPv4 1 Multicast " ,1 ,0x08000000 }, -/* 037 */ {"IPv4 1 Broadcast " ,1 ,0x04000000 }, -/* 038 */ {"IPv4 n Present " ,1 ,0x02000000 }, -/* 039 */ {"IPv4 n Unicast " ,1 ,0x01000000 }, -/* 040 */ {"IPv4 n Multicast " ,1 ,0x00800000 }, -/* 041 */ {"IPv4 n Broadcast " ,1 ,0x00400000 }, -/* 042 */ {"IPv6 1 Present " ,1 ,0x00200000 }, -/* 043 */ {"IPv6 1 Unicast " ,1 ,0x00100000 }, -/* 044 */ {"IPv6 1 Multicast " ,1 ,0x00080000 }, -/* 045 */ {"IPv6 n Present " ,1 ,0x00040000 }, -/* 046 */ {"IPv6 n Unicast " ,1 ,0x00020000 }, -/* 047 */ {"IPv6 n Multicast " ,1 ,0x00010000 }, -/* 048 */ {"IP 1 option present " ,1 ,0x00008000 }, -/* 049 */ {"IP 1 Unknown Protocol " ,1 ,0x00004000 }, -/* 050 */ {"IP 1 Packet is a fragment " ,1 ,0x00002000 }, -/* 051 */ {"IP 1 Packet is an initial fragment " ,1 ,0x00001000 }, -/* 052 */ {"IP 1 Parsing Error " ,1 ,0x00000800 }, -/* 053 */ {"IP n option present " ,1 ,0x00000400 }, -/* 054 */ {"IP n Unknown Protocol " ,1 ,0x00000200 }, -/* 055 */ {"IP n Packet is a fragment " ,1 ,0x00000100 }, -/* 056 */ {"IP n Packet is an initial fragment " ,1 ,0x00000080 }, -/* 057 */ {"ICMP detected (IP proto is 1) " ,1 ,0x00000040 }, -/* 058 */ {"IGMP detected (IP proto is 2) " ,1 ,0x00000020 }, -/* 059 */ {"ICMPv6 detected (IP proto is 3a) " ,1 ,0x00000010 }, -/* 060 */ {"UDP Light detected (IP proto is 136) " ,1 ,0x00000008 }, -/* 061 */ {"IP n Parsing Error " ,1 ,0x00000004 }, -/* 062 */ {"Min. Encap Present " ,1 ,0x00000002 }, -/* 063 */ {"Min. Encap S flag set " ,1 ,0x00000001 }, -/* Frame Attribute Flags 3 */ -/* 064 */ {"Min. Encap Parsing Error " ,2 ,0x80000000 }, -/* 065 */ {"GRE Present " ,2 ,0x40000000 }, -/* 066 */ {"GRE R bit set " ,2 ,0x20000000 }, -/* 067 */ {"GRE Parsing Error " ,2 ,0x10000000 }, -/* 068 */ {"L3 Unknown Protocol " ,2 ,0x08000000 }, -/* 069 */ {"L3 Soft Parsing Error " ,2 ,0x04000000 }, -/* 070 */ {"UDP Present " ,2 ,0x02000000 }, -/* 071 */ {"UDP Parsing Error " ,2 ,0x01000000 }, -/* 072 */ {"TCP Present " ,2 ,0x00800000 }, -/* 073 */ {"TCP options present " ,2 ,0x00400000 }, -/* 074 */ {"TCP Control bits 6-11 set " ,2 ,0x00200000 }, -/* 075 */ {"TCP Control bits 3-5 set " ,2 ,0x00100000 }, -/* 076 */ {"TCP Parsing Error " ,2 ,0x00080000 }, -/* 077 */ {"IPSec Present " ,2 ,0x00040000 }, -/* 078 */ {"IPSec ESP found " ,2 ,0x00020000 }, -/* 079 */ {"IPSec AH found " ,2 ,0x00010000 }, -/* 080 */ {"IPSec Parsing Error " ,2 ,0x00008000 }, -/* 081 */ {"SCTP Present " ,2 ,0x00004000 }, -/* 082 */ {"SCTP Parsing Error " ,2 ,0x00002000 }, -/* 083 */ {"DCCP Present " ,2 ,0x00001000 }, -/* 084 */ {"DCCP Parsing Error " ,2 ,0x00000800 }, -/* 085 */ {"L4 Unknown Protocol " ,2 ,0x00000400 }, -/* 086 */ {"L4 Soft Parsing Error " ,2 ,0x00000200 }, -/* 087 */ {"GTP Present " ,2 ,0x00000100 }, -/* 088 */ {"GTP Parsing Error " ,2 ,0x00000080 }, -/* 089 */ {"ESP Present " ,2 ,0x00000040 }, -/* 090 */ {"ESP Parsing Error " ,2 ,0x00000020 }, -/* 091 */ {"iSCSI detected (Port# 860) " ,2 ,0x00000010 }, -/* 092 */ {"Capwap-control detected (Port# 5246) " ,2 ,0x00000008 }, -/* 093 */ {"Capwap-data detected (Port# 5247) " ,2 ,0x00000004 }, -/* 094 */ {"L5 Soft Parsing Error " ,2 ,0x00000002 }, -/* 095 */ {"IPv6 Route hdr1 present " ,2 ,0x00000001 }, -/* 096 */ {NULL ,0 ,0x00000000 } -}; - -struct frame_attr_ext frame_attr_ext_arr[] = { -/* Frame Attribute Flags Extension */ -/* 096 */ {"User defined soft parser bit #0 " ,0 ,0x8000 }, -/* 096 */ {"User defined soft parser bit #1 " ,0 ,0x4000 }, -/* 096 */ {"User defined soft parser bit #2 " ,0 ,0x2000 }, -/* 096 */ {"User defined soft parser bit #3 " ,0 ,0x1000 }, -/* 096 */ {"User defined soft parser bit #4 " ,0 ,0x0800 }, -/* 096 */ {"User defined soft parser bit #5 " ,0 ,0x0400 }, -/* 096 */ {"User defined soft parser bit #6 " ,0 ,0x0200 }, -/* 096 */ {"User defined soft parser bit #7 " ,0 ,0x0100 }, -/* 097 */ {"Reserved " ,0 ,0x00ff }, -/* 112 */ {NULL ,0 ,0x0000 } -}; -int dpaa2_eth_load_wriop_soft_parser (struct dpaa2_dev_priv *priv,enum dpni_soft_sequence_dest dest) {
Signature · 1 line
2.47.3
PATCH v2 2/3 net/dpaa2: make local array static
In reply to Stephen HemmingerThe table wriop_bytecode can be static to avoid name conflicts.
--- drivers/net/dpaa2/dpaa2_sparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dpaa2/dpaa2_sparser.c +1 -1
@@ -23,7 +23,7 @@#include <stdint.h> #include <inttypes.h> -uint8_t wriop_bytecode[] = { +static uint8_t wriop_bytecode[] = {0x00 ,0x04 ,0x29 ,0x42 ,0x03 ,0xe0 ,0x12 ,0x00 ,0x29 ,0x02 ,0x18 ,0x00 ,0x87 ,0x3c ,0x00 ,0x02 ,0x18 ,0x00 ,0x00 ,0x00 };
Signature · 1 line
2.47.3
PATCH v2 3/3 net/dpaa2: make total_rx_descriptors static
In reply to Stephen HemmingerDo not expose total_nb_rx_desc, can be static.
--- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
@@ -79,7 +79,7 @@ bool dpaa2_enable_err_queue;bool dpaa2_print_parser_result;#define MAX_NB_RX_DESC 11264 -int total_nb_rx_desc; +static int total_nb_rx_desc;int dpaa2_valid_dev;struct rte_mempool *dpaa2_tx_sg_pool;
Signature · 1 line
2.47.3
RE: [PATCH v2 3/3] net/dpaa2: make total_rx_descriptors static