OpenCores
URL https://opencores.org/ocsvn/fade_ether_protocol/fade_ether_protocol/trunk

Subversion Repositories fade_ether_protocol

[/] [fade_ether_protocol/] [trunk/] [stable_jumbo_frames_version/] [linux/] [receiver2t.c] - Diff between revs 18 and 19

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 18 Rev 19
Line 29... Line 29...
int frs[3]={-1,-1,-1};
int frs[3]={-1,-1,-1};
int active[3]={0,0,0};
int active[3]={0,0,0};
int leave[3]={0,0,0};
int leave[3]={0,0,0};
pthread_t ucmd_thread;
pthread_t ucmd_thread;
double tend=0.0;
double tend=0.0;
 
#define nic0 "eth0"
 
 
void * user_cmd_thread(void * a1)
void * user_cmd_thread(void * a1)
{
{
  uint16_t cmd;
  uint16_t cmd;
  int i;
  int i;
Line 87... Line 88...
{
{
  struct l3_v1_buf_pointers bp;
  struct l3_v1_buf_pointers bp;
  struct l3_v1_slave sl[3] = {
  struct l3_v1_slave sl[3] = {
    {
    {
      .mac = {0xde, 0xad, 0xba, 0xbe, 0xbe,0xef},
      .mac = {0xde, 0xad, 0xba, 0xbe, 0xbe,0xef},
      .devname = "eth0"
      .devname = nic0
    },
    },
    {
    {
      .mac = {0xde, 0xad, 0xba, 0xbe, 0xbe,0xe1},
      .mac = {0xde, 0xad, 0xba, 0xbe, 0xbe,0xe1},
      .devname = "eth0"
      .devname = nic0
    },
    },
    {
    {
      .mac = {0xde, 0xad, 0xba, 0xbe, 0xbe,0xe2},
      .mac = {0xde, 0xad, 0xba, 0xbe, 0xbe,0xe2},
      .devname = "eth0"
      .devname = nic0
    }
    }
  };
  };
  int i,j;
  int i,j;
  int res;
  int res;
  int blen[3];
  int blen[3];
Line 140... Line 141...
  //Start the transmission
  //Start the transmission
  for(i=0;i<=2;i++) {
  for(i=0;i<=2;i++) {
    if(active[i]) {
    if(active[i]) {
      res = ioctl(frs[i],L3_V1_IOC_GETMAC,&sl[i]);
      res = ioctl(frs[i],L3_V1_IOC_GETMAC,&sl[i]);
      printf("Result of get for slave %d : %d\n",i,res);
      printf("Result of get for slave %d : %d\n",i,res);
 
      if(res<0) {
 
        printf("I couldn't bind Ethernet device %s\n",sl[i].devname);
 
        exit(1);
 
      }
    } else {
    } else {
      leave[i]=1;
      leave[i]=1;
    }
    }
  }
  }
  //Start the second thread, which uses user commands
  //Start the second thread, which uses user commands

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.