[vpp-dev] vpp plugin path find error #plugin

2022-11-21 Thread aihua1980
dear all:
in  vpp_find_plugin_path () function,

there is some change from version 2005,
in version 2005 is this fragment
s = format (0, "%s/lib/" CLIB_TARGET_TRIPLET "/vpp_plugins:"
"%s/lib/vpp_plugins", path, path);
in version 2202 is this fragment
s = format (0, "%s/" CLIB_LIB_DIR "/vpp_plugins", path, path);
what is  the second path for?

in version  2202,split_plugin_path  Looks like it didn't work.

the same as  function vat_find_plugin_path()

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22215): https://lists.fd.io/g/vpp-dev/message/22215
Mute This Topic: https://lists.fd.io/mt/95189538/21656
Mute #plugin:https://lists.fd.io/g/vpp-dev/mutehashtag/plugin
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] pcap_write error: bad address

2022-10-17 Thread aihua1980
hi Dave:
I have been  gdb before,  vl(pm->pcap_data)    =   2,806,013,189, 
pm->n_pcap_data_written  = 0.
int  is 32 bits,size_t  is 64 bits.  n=0xA740 5D05   cast to size_t  is  0x 
 A740 5D05.
we can't use  n for   write  param.

code  fragment:

int n = vec_len (pm->pcap_data) - pm->n_pcap_data_written;

n = write (pm->file_descriptor,
vec_elt_at_index (pm->pcap_data, pm->n_pcap_data_written),
n);

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22043): https://lists.fd.io/g/vpp-dev/message/22043
Mute This Topic: https://lists.fd.io/mt/94377467/21656
Mute #pcap:https://lists.fd.io/g/vpp-dev/mutehashtag/pcap
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] pcap_write error: bad address #pcap

2022-10-16 Thread aihua1980
dear all:
pcap_write,use type int n;
if  n is negative。  int n = vec_len (pm->pcap_data) - pm->n_pcap_data_written;
write func will failed,errno = 14.
n = write (pm->file_descriptor,
vec_elt_at_index (pm->pcap_data, pm->n_pcap_data_written),
n);
int   cast   to  size_t  may case  some overflow?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22039): https://lists.fd.io/g/vpp-dev/message/22039
Mute This Topic: https://lists.fd.io/mt/94377467/21656
Mute #pcap:https://lists.fd.io/g/vpp-dev/mutehashtag/pcap
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] moniter interface is not correct#vnet

2022-07-19 Thread aihua1980
This change doesn't look right either.
We should use u64 instead of u32.

like this:

vlib_cli_output (
vm, "rx: %Upps %Ubps tx: %Upps %Ubps", format_base10,
(u64) ((vrx[spin].packets - vrx[spin ^ 1].packets) / tsd),
format_base10,
(u64) (8 * (vrx[spin].bytes - vrx[spin ^ 1].bytes) / tsd),
format_base10,
(u64) ((vtx[spin].packets - vtx[spin ^ 1].packets) / tsd),
format_base10,
(u64) (8 * (vtx[spin].bytes - vtx[spin ^ 1].bytes) / tsd));

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21683): https://lists.fd.io/g/vpp-dev/message/21683
Mute This Topic: https://lists.fd.io/mt/92478151/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] moniter interface is not correct#vnet

2022-07-19 Thread aihua1980
In vpp 22.02

I get inaccurate results with monitor interface command,tx data is incorrect

DBGvpp# monitor interface local0 interval 10 count 1
rx: 0pps 0bps tx: 2314885530.28Gpps 18446744069.41Gbps

in  src/vnet/interface/monitor.c
there use u32,but in  format_base10 it expects uword.
This looks out of bounds.

format_base10 (u8 *s, va_list *va)
{
uword size = va_arg (*va, uword);

92       vlib_cli_output (
93     vm, "rx: %Upps %Ubps tx: %Upps %Ubps%c", format_base10,
94     (u32) ((vrx[spin].packets - vrx[spin ^ 1].packets) / tsd),
95     format_base10, (u32) ((vrx[spin].bytes - vrx[spin ^ 1].bytes) / tsd),
96     format_base10,
97     (u32) ((vtx[spin].packets - vtx[spin ^ 1].packets) / tsd),
98     format_base10, (u32) ((vtx[spin].bytes - vtx[spin ^ 1].bytes) / tsd));
99     }

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21681): https://lists.fd.io/g/vpp-dev/message/21681
Mute This Topic: https://lists.fd.io/mt/92478151/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-