Changeset 3764 in Sophya for trunk/AddOn/TAcq


Ignore:
Timestamp:
May 3, 2010, 9:11:20 AM (15 years ago)
Author:
ansari
Message:

Suppression du parametre taille des blocs pour transfert ethernet ds le code pour les classes PCIEToEthernet et EthernetReader, Reza 03/05/2010

Location:
trunk/AddOn/TAcq
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/acqparam_exemple.d

    r3760 r3764  
    4949#  @ethrnlink 4
    5050ethrnlink 4
    51 ## No de port TCP/IP et taille des blocs lors des transferts sur ethernet 
     51## No de port TCP/IP  
    5252#  @tcpportid 6912
    53 #  @ethtrbsz 1024
    5453tcpportid 6912
    55 ethtrbsz 1024
    5654#  Pour desactiver l'ecriture des fichiers FITS
    5755#  @nosavesigfits
  • trunk/AddOn/TAcq/brparam.cc

    r3760 r3764  
    134134
    135135  tcpportid=BRSPORTID;
    136   eth_transfer_blksz=1024;
    137136  pci2eth_fgdirect=false;
    138137  ethr_nlink = 0;
     
    192191
    193192  tcpportid=p.tcpportid;
    194   eth_transfer_blksz=p.eth_transfer_blksz;
    195193  pci2eth_fgdirect=p.pci2eth_fgdirect;
    196194  eths_targets=p.eths_targets;
     
    232230  // Mot cle pour le mode envoi-reception sur ethernet
    233231  tcpportid=conf.IParam("tcpportid",0,BRSPORTID);
    234   eth_transfer_blksz=(size_t)conf.IParam("ethtrbsz",0,1024);
    235232  if (conf.HasKey("pci2ethdirect"))  pci2eth_fgdirect = true;   // Transfer direct DMA -> Ethernet
    236233  if (conf.HasKey("ethrtargets")) {    // Machines destinations des paquets
     
    348345  }
    349346  if (eths_targets.size()>0)   {
    350     cout << " DMA->Ethernet NbTargets=" << eths_targets.size() << ((pci2eth_fgdirect)?" (DirectTransferMode) " : " " ) << " :" << endl;
     347    cout << " DMA->Ethernet NbTargets=" << eths_targets.size()
     348         << ((pci2eth_fgdirect)?" (DirectTransferMode) " : " " ) << " :";
    351349    for(size_t it=0; it<eths_targets.size(); it++) cout << eths_targets[it] << " , ";
    352350    cout << endl;
    353351  }
    354   cout << " EthernetRead NbSources (=NbLinks)= " << ethr_nlink << endl;
     352  cout << " TCP-PortId=" << tcpportid << " EthernetRead NbSources (=NbLinks)= " << ethr_nlink << endl;
    355353  if (fgdoProc>0)
    356354    os << " Monitoring  NMeanProc=" << nmeanProc << " StepProc=" << stepProc << " NMaxProc=" << nmaxProc << endl;
  • trunk/AddOn/TAcq/brparam.h

    r3760 r3764  
    160160  // ---- Variables specifiques em mode transfert DMA vers Ethernet
    161161  int tcpportid;     // No de port TCP/IP
    162   size_t eth_transfer_blksz;    //taille des blocs pour le transfert a travers ethernet
    163162  // Cote Send DMA -> Ethernet
    164163  bool pci2eth_fgdirect;   // true -> direct transfer DMA to Ethernet 
  • trunk/AddOn/TAcq/mfacq.cc

    r3761 r3764  
    295295  PCIEToEthernet pci2eth(vec_pciw, bpar.GetParams().GetEthTargets(), bpar.GetParams(), bpar.GetParams().tcpportid);
    296296  pci2eth.SetPrintLevel(1);
    297   pci2eth.SetEthSendBlockSize(bpar.GetParams().eth_transfer_blksz);
    298297  //  usleep(200);  attente au cas ou ...
    299298  pPcie2Eth=&pci2eth;
     
    348347  cout << "mfacq[3] Creating   EthernetReader thread object     " << endl;
    349348  EthernetReader ethrdr(mmgr, bpar.GetParams(), bpar.GetParams().tcpportid, false);
    350   ethrdr.SetEthRecvBlockSize(acpar.eth_transfer_blksz);
    351349
    352350  //  usleep(200);  attente au cas ou ...
  • trunk/AddOn/TAcq/racqueth.cc

    r3763 r3764  
    6464  }
    6565  totrdsnd_ = 0;
    66   SetEthSendBlockSize();
    6766  SetPrintLevel();
    6867}
     
    336335  for(size_t j=0; j<vskt.size(); j++) {
    337336    rc += vskt[j].SendAll((const char *)data, len);
    338     totrdsnd_ += eths_bsz_;
     337    totrdsnd_ += len;
    339338  }
    340339  vec_cntpaq_[fib]++;
    341340  return rc;
    342   /* 
    343   if (eths_bsz_<16) {
    344     for(size_t j=0; j<vskt.size(); j++) {
    345       rc += vskt[j].SendAll((const char *)data, len);
    346       totrdsnd_ += eths_bsz_;
    347     }
    348     vec_cntpaq_[fib]++;
    349     return rc;
    350   }
    351   size_t nblk = len/eths_bsz_;
    352   size_t fblk = len%eths_bsz_;
    353   size_t off = 0;
    354   if (nblk>0) {
    355     for(size_t i=0; i<nblk; i++) {
    356       for(size_t j=0; j<vskt.size(); j++) {
    357         rc += vskt[j].SendAll((const char *)data+off, eths_bsz_);
    358         totrdsnd_ += eths_bsz_;
    359       }
    360       off += eths_bsz_;
    361     }
    362   }
    363   if (fblk>0) {
    364     for(size_t j=0; j<vskt.size(); j++) {
    365       rc += vskt[j].SendAll((const char *)data+off, fblk);
    366       totrdsnd_ += fblk;
    367     }
    368   }
    369   vec_cntpaq_[fib]++;
    370   return rc;
    371   */
    372341}
    373342//------------------------------------------------------------------
     
    423392  }
    424393
    425   SetEthRecvBlockSize();
    426394  SetPrintLevel();
    427395}
     
    565533  vec_cntpaq_[fib]++;
    566534
    567   /*   
    568   if (ethr_bsz_<16) {
    569     rc += vsok_[fib].ReceiveAll(data, len);
    570   }
    571   else {
    572     size_t nblk = len/ethr_bsz_;
    573     size_t fblk = len%ethr_bsz_;
    574     size_t off = 0;
    575     if (nblk>0) {
    576       for(size_t i=0; i<nblk; i++)  {
    577         rc += vsok_[fib].ReceiveAll(data+off, ethr_bsz_);
    578         off += ethr_bsz_; 
    579       }
    580     }
    581     if (fblk>0) {
    582       rc += vsok_[fib].ReceiveAll(data+off, fblk);
    583     }
    584   }
     535  /*     
     536  size_t nblk = len/ethr_bsz_;
     537  size_t fblk = len%ethr_bsz_;
     538  size_t off = 0;
     539  if (nblk>0) {
     540    for(size_t i=0; i<nblk; i++)  {
     541      rc += vsok_[fib].ReceiveAll(data+off, ethr_bsz_);
     542      off += ethr_bsz_; 
     543    }
     544  }
     545  if (fblk>0) {
     546    rc += vsok_[fib].ReceiveAll(data+off, fblk);
     547  }
    585548  vec_cntpaq_[fib]++;
    586     */
     549  */
    587550
    588551  if (vec_cntpaq_[fib]%par_.MMgrNbPaquet() == 0) {
  • trunk/AddOn/TAcq/racqueth.h

    r3762 r3764  
    5757  inline void STOP() { stop_ = true; } 
    5858
    59   inline size_t SetEthSendBlockSize(size_t bsz=1024)
    60   { size_t rs=eths_bsz_;  eths_bsz_=bsz; return rs; }
    6159  inline int SetPrintLevel(int lev=0) { prtlev_=lev; return 0;}
    6260
     
    8078  uint_8 totrdsnd_;
    8179  bool fgdirectsend_;  //  true -> direct transfer of DMA data to ethernet
    82   size_t eths_bsz_;
     80
    8381  int prtlev_;
    8482};
     
    9492  inline void STOP() { stop_ = true; } 
    9593
    96   inline size_t SetEthRecvBlockSize(size_t bsz=1024)
    97   { size_t rs=ethr_bsz_;  ethr_bsz_=bsz; return rs; }
    9894  inline int SetPrintLevel(int lev=0) { prtlev_=lev; return 0;}
    9995
     
    141137  Byte* mmbufib_[MAXANAFIB];  // Pointeurs zone memoire de chaque fibre rendu par RAcqMemZoneMgr
    142138
    143   size_t ethr_bsz_;
    144139  int prtlev_;
    145140};
Note: See TracChangeset for help on using the changeset viewer.