Hi all,
I'm still working on my setup for performance testing (in an automotive
environment).
To get an idea of the link quality (influence of interference) I have
implemented and tested the following setup and some things are confusing me.
Maybe you can help me:
Two 11s nodes: On the first I have written a simple raw socket send application
(sending raw Ethernet packets + ID + timestamp, total 26 bytes). (source files
attached). On the second node I use a pcap application to receive and parse the
packets (check if I received each sent ID) + Wireshark to check my application.
When I send e.g. 5 packets everything works fine. For 1000 packets I lose e.g.
200-400 packets. I don't see the packets in Wireshark as well as in my
application. (when I add a stupid while loop to slow down the sender it also
works for 1000 packets; Evaluation of the lost packets based on the ID of the
packet: I lose packets in bulk: e.g. 0-70 & 500-600 & 750 - 1000. On the sender
side no errors are reported )
-> Now I'm not sure if the problem is on the sender or the receiver side.
When I check station dump on the sender side I see the following (after sending
1000 packets; receiving 609 packets in my application & wireshark -> 391
packets lost)
rx bytes: 9034339
rx packets: 193058 ==> permanently increasing; also when I'm not
sending anything and Wireshark doesn't show any new packets
tx bytes: 983504
tx packets: 16828 ==> not increasing
tx retries: 0
tx failed: 1666
The difference between (tx packets before and after sending 1000 packets is
609; rx packets is hard to say because it is increasing every second)
Additionally I've checked ifconfig mesh:
RX packets:14952 errors:0 dropped:0 overruns:0 frame:0 ==> compared to
the output of station dump this value is much lower. Why?
TX packets:30380 errors:0 dropped:0 overruns:0 carrier:0 ==> When I sum
up the tx packet value of all stations I get this number or at least almost the
same number
The tx packet value increases (+1000) compared to the value before sending 1000
packets. So this outputs seems to count all sent packets
Now my questions: Is there an explanation for the "strange" rx packet numbers?
Am I missing something here?
The number for tx packets are not equal for 'station dump' and 'ifconfig mesh'
commands. Why? Which is the correct number of transmitted packets (it seems
that the station dump is correct because I receive the same number of packets
on the receiver node but as I said I'm not sure about that)?
Would be great to hear your opinion!
Best regards,
Marco
>-----Ursprüngliche Nachricht-----
>Von: Yeoh Chun-Yeow [mailto:[email protected]]
>Gesendet: Donnerstag, 05. März 2015 15:47
>An: Steger, Marco; [email protected]
>Cc: Bob Copeland ([email protected])
>Betreff: Re: 802.11s performance testing - tools and tips
>
>If you are using "ath9k_htc" driver, setting bit rate is not possible.
>This driver is using the firmware rate control mechanism
>(IEEE80211_HW_HAS_RATE_CONTROL).
>
>----
>Chun-Yeow
>
>On Thu, Mar 5, 2015 at 9:17 PM, Steger, Marco via Devel
><[email protected]> wrote:
>> Dear Bob, dear all,
>>
>> I have performed several tests using 11s in the last days and the
>> results are really looking promising. Like expected the bitrate is decreasing
>when I move one node away from a second one. For further experiments it would
>be great to use one specific bitrate. I tried to use iw command for that "iw
>dev
>mesh set bitrates mcs-2.4 4"
>> "iw dev mesh set bitrates legacy-2.4 1"
>>
>> But this don't work for me. Is there a way to set the bitrate to a fixed
>> value?
>>
>> Would be really great if you can help me with that!
>>
>> Best regards and thanks in advance,
>> Marco
>>
>>>-----Ursprüngliche Nachricht-----
>>>Von: Bob Copeland [mailto:[email protected]]
>>>Gesendet: Mittwoch, 18. Februar 2015 16:53
>>>An: Steger, Marco; [email protected]
>>>Betreff: Re: 802.11s performance testing - tools and tips
>>>
>>>On Wed, Feb 18, 2015 at 03:40:53PM +0000, Steger, Marco via Devel wrote:
>>>> How is the bitrate set? Who is setting/changing the bitrate? Why? Is
>>>> there a formula? I think it is maybe somehow related to the metric
>>>> but I'm not sure.
>>>> Would be great if someone has a short explanation or a link for me!!!
>>>
>>>Bitrate selection is the province of the rate control algorithm,
>>>generally it is Minstrel.
>>>
>>>See:
>>>https://wireless.wiki.kernel.org/en/developers/documentation/mac80211/
>>>ratec
>>>ontrol/minstrel
>>>
>>>--
>>>Bob Copeland %% http://bobcopeland.com/
>> _______________________________________________
>> Devel mailing list
>> [email protected]
>> http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/ether.h>
#define NBR_OF_PKT 1000
#define MY_DEST_MAC0 0xe8
#define MY_DEST_MAC1 0xde
#define MY_DEST_MAC2 0x27
#define MY_DEST_MAC3 0x1f
#define MY_DEST_MAC4 0xcb
#define MY_DEST_MAC5 0xcb
#define DEFAULT_IF "mesh"
#define BUF_SIZ 1024
int main(int argc, char *argv[])
{
unsigned long long ts = 0;
unsigned int id = 0;
int sockfd;
struct ifreq if_idx;
struct ifreq if_mac;
int tx_len = 0;
char sendbuf[BUF_SIZ];
struct ether_header *eh = (struct ether_header *) sendbuf;
struct iphdr *iph = (struct iphdr *) (sendbuf + sizeof(struct ether_header));
struct sockaddr_ll socket_address;
char ifName[IFNAMSIZ];
/* Get interface name */
if (argc > 1)
strcpy(ifName, argv[1]);
else
strcpy(ifName, DEFAULT_IF);
/* Open RAW socket to send on */
if ((sockfd = socket(AF_PACKET, SOCK_RAW, IPPROTO_RAW)) == -1) {
perror("socket");
}
/* Get the index of the interface to send on */
memset(&if_idx, 0, sizeof(struct ifreq));
strncpy(if_idx.ifr_name, ifName, IFNAMSIZ-1);
if (ioctl(sockfd, SIOCGIFHWADDR, &if_mac) < 0)
perror("SIOCGIFHWADDR");
/* Construct the Ethernet header */
memset(sendbuf, 0, BUF_SIZ);
/* Ethernet header */
eh->ether_shost[0] = ((uint8_t *)&if_mac.ifr_hwaddr.sa_data)[0];
eh->ether_shost[1] = ((uint8_t *)&if_mac.ifr_hwaddr.sa_data)[1];
eh->ether_shost[2] = ((uint8_t *)&if_mac.ifr_hwaddr.sa_data)[2];
eh->ether_shost[3] = ((uint8_t *)&if_mac.ifr_hwaddr.sa_data)[3];
eh->ether_shost[4] = ((uint8_t *)&if_mac.ifr_hwaddr.sa_data)[4];
eh->ether_shost[5] = ((uint8_t *)&if_mac.ifr_hwaddr.sa_data)[5];
eh->ether_dhost[0] = MY_DEST_MAC0;
eh->ether_dhost[1] = MY_DEST_MAC1;
eh->ether_dhost[2] = MY_DEST_MAC2;
eh->ether_dhost[3] = MY_DEST_MAC3;
eh->ether_dhost[4] = MY_DEST_MAC4;
eh->ether_dhost[5] = MY_DEST_MAC5;
/* Ethertype field */
eh->ether_type = htons(ETH_P_IP);
tx_len += sizeof(struct ether_header);
/* Index of the network device */
socket_address.sll_ifindex = if_idx.ifr_ifindex;
/* Address length*/
socket_address.sll_halen = ETH_ALEN;
/* Destination MAC */
socket_address.sll_addr[0] = MY_DEST_MAC0;
socket_address.sll_addr[1] = MY_DEST_MAC1;
socket_address.sll_addr[2] = MY_DEST_MAC2;
socket_address.sll_addr[3] = MY_DEST_MAC3;
socket_address.sll_addr[4] = MY_DEST_MAC4;
socket_address.sll_addr[5] = MY_DEST_MAC5;
int i = 0;
int tx_len_cur = tx_len;
for(i=0; i < NBR_OF_PKT; i++) {
tx_len = tx_len_cur;
/* Packet data */
//packet id
//test-id: id = 120150100;
sendbuf[tx_len++] = (id >> 24) & 0xFF;
sendbuf[tx_len++] = (id >> 16) & 0xFF;
sendbuf[tx_len++] = (id >> 8) & 0xFF;
sendbuf[tx_len++] = id & 0xFF;
id++;
struct timeval tv;
gettimeofday(&tv,NULL);
ts = 1000000ULL * tv.tv_sec + tv.tv_usec;
//test-ts: ts = (unsigned long long)0x1234567890abcdef;
sendbuf[tx_len++] = ((unsigned long long)ts) >> 56 & 0xFF;
sendbuf[tx_len++] = ((unsigned long long)ts) >> 48 & 0xFF;
sendbuf[tx_len++] = ((unsigned long long)ts) >> 40 & 0xFF;
sendbuf[tx_len++] = ((unsigned long long)ts) >> 32 & 0xFF;
sendbuf[tx_len++] = (ts >> 24) & 0xFF;
sendbuf[tx_len++] = (ts >> 16) & 0xFF;
sendbuf[tx_len++] = (ts >> 8) & 0xFF;
sendbuf[tx_len++] = ts & 0xFF;
//for debugging purposes
//int j = 0;
//for( j=0; j < 8; j++)
// printf("sendbuf[%d]=%X\n",tx_len+j-8, sendbuf[tx_len+j-8]);
/* Send packet */
if (sendto(sockfd, sendbuf, tx_len, 0, (struct sockaddr*)&socket_address, s$
printf("Send failed <%d>\n",id);
//just for testing ... give sender more time
int test = 100;//working val 50000;
while(--test > 0)
;
}
return 0;
}
_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel