Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0f2404e

Browse files
matthewr-xilinxivatet-amd
authored andcommitted
ON-13956: update trade_sim/trader_onload_ds_efvi
Use standard Linux headers for packet header definitions.
1 parent 98131dc commit 0f2404e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/tests/trade_sim/trader_onload_ds_efvi.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include <etherfabric/memreg.h>
4242
#include <etherfabric/capabilities.h>
4343
#include <etherfabric/checksum.h>
44-
#include <ci/net/ethernet.h>
4544
#include <onload/extensions.h>
4645
#include "utils.h"
4746

@@ -51,6 +50,7 @@
5150
#include <net/if.h>
5251
#include <sys/types.h>
5352
#include <sys/socket.h>
53+
#include <linux/if_ether.h>
5454
#include <netinet/in.h>
5555
#include <netinet/tcp.h>
5656
#include <ifaddrs.h>
@@ -62,6 +62,7 @@
6262
#define N_TX_BUFS 1u
6363
#define FIRST_TX_BUF 0u
6464
#define PKT_BUF_SIZE 2048
65+
#define PAGE_SIZE 4096
6566

6667
static bool cfg_delegated;
6768
static int cfg_rx_size = 300;
@@ -221,7 +222,7 @@ static void delegated_prepare(struct client_state* s)
221222
onload_delegated_send_tcp_update(&(s->ods), s->msg_len, 1);
222223
if( s->use_ctpio ) {
223224
/* for CPTIO we need to fill in the IP and TCP checksums */
224-
struct ci_ether_hdr* eth = ((void*) s->ods.headers);
225+
struct ethhdr* eth = ((void*) s->ods.headers);
225226
struct iphdr* ip4 = (void*) ((char*) eth + ETH_HLEN);
226227
struct tcphdr* tcp = (void*) (ip4 + 1);
227228

@@ -387,7 +388,7 @@ static void ef_vi_init(struct client_state* cs)
387388

388389
int bytes = N_TX_BUFS * PKT_BUF_SIZE;
389390
void* p;
390-
TEST( posix_memalign(&p, CI_PAGE_SIZE, bytes) == 0 );
391+
TEST( posix_memalign(&p, PAGE_SIZE, bytes) == 0 );
391392
TRY( ef_memreg_alloc(&cs->memreg, cs->dh,
392393
&cs->pd, cs->dh, p, bytes) );
393394
int i;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /