Skip to content

Commit b1436ea

Browse files
committed
reverted
1 parent 7e55f69 commit b1436ea

File tree

5 files changed

+24
-37
lines changed

5 files changed

+24
-37
lines changed

docs/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<<<<<<< HEAD
21
__pycache__
32
*.pyc
43

software/examples/l2_forward.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,4 @@ int main(int argc, const char* argv[]) {
182182
}
183183

184184
return 0;
185-
}
185+
}

software/include/enso/pipe.h

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -367,21 +367,21 @@ class RxPipe {
367367
* iterating over the batch will result in fewer bytes than
368368
* `available_bytes()`. After iterating over the batch, the total number of
369369
* bytes iterated over can be obtained by calling `processed_bytes()`.
370-
*
370+
*
371371
* @return The number of bytes available in the batch.
372372
*/
373373
uint32_t available_bytes() const { return available_bytes_; }
374374

375375
/**
376376
* @brief Returns maximum number of messages in the batch.
377-
*
377+
*
378378
* @return The maximum number of messages in the batch.
379379
*/
380380
int32_t message_limit() const { return message_limit_; }
381381

382382
/**
383383
* @brief Returns a pointer to the start of the batch.
384-
*
384+
*
385385
* @return A pointer to the start of the batch.
386386
*/
387387
uint8_t* buf() const { return buf_; }
@@ -533,7 +533,7 @@ class RxPipe {
533533

534534
/**
535535
* @brief Prefetches the next batch of bytes to be received on the RxPipe.
536-
*
536+
*
537537
* @warning Explicit prefetching from the application cannot be used in
538538
* conjunction with the `NextRxPipeToRecv` and `NextRxTxPipeToRecv`
539539
* functions. To use prefetching with these functions, compile the
@@ -573,28 +573,24 @@ class RxPipe {
573573

574574
/**
575575
* @brief Returns the context associated with the pipe.
576-
*
576+
*
577577
* Applications can use context to associate arbitrary pointers with a given
578578
* pipe that can later be retrieved in a different point. For instance, when
579579
* using Device::NextRxPipeToRecv(), the application may use the context to
580580
* retrieve application data associated with the returned pipe.
581-
*
581+
*
582582
* @see RxPipe::set_context()
583583
*
584584
* @return The context associated with the pipe.
585585
*/
586-
inline void* context() const {
587-
return context_;
588-
}
586+
inline void* context() const { return context_; }
589587

590588
/**
591589
* @brief Sets the context associated with the pipe.
592-
*
590+
*
593591
* @see RxPipe::context()
594592
*/
595-
inline void set_context(void* new_context) {
596-
context_ = new_context;
597-
}
593+
inline void set_context(void* new_context) { context_ = new_context; }
598594

599595
/**
600596
* The size of a "buffer quantum" in bytes. This is the minimum unit that can
@@ -636,9 +632,9 @@ class RxPipe {
636632

637633
friend class Device;
638634

639-
bool next_pipe_ = false; ///< Whether this pipe is the next pipe to be
640-
///< processed by the device. This is used in
641-
///< conjunction with NextRxPipe().
635+
bool next_pipe_ = false; ///< Whether this pipe is the next pipe to be
636+
///< processed by the device. This is used in
637+
///< conjunction with NextRxPipe().
642638
const enso_pipe_id_t kId; ///< The ID of the pipe.
643639
void* context_;
644640
struct RxEnsoPipeInternal internal_rx_pipe_;
@@ -822,26 +818,22 @@ class TxPipe {
822818

823819
/**
824820
* @brief Returns the context associated with the pipe.
825-
*
821+
*
826822
* Applications can use context to associate arbitrary pointers with a given
827823
* pipe that can later be retrieved in a different point.
828-
*
824+
*
829825
* @see TxPipe::set_context()
830826
*
831827
* @return The context associated with the pipe.
832828
*/
833-
inline void* context() const {
834-
return context_;
835-
}
829+
inline void* context() const { return context_; }
836830

837831
/**
838832
* @brief Sets the context associated with the pipe.
839-
*
833+
*
840834
* @see TxPipe::context()
841835
*/
842-
inline void set_context(void* new_context) {
843-
context_ = new_context;
844-
}
836+
inline void set_context(void* new_context) { context_ = new_context; }
845837

846838
/**
847839
* The size of a "buffer quantum" in bytes. This is the minimum unit that can
@@ -893,7 +885,6 @@ class TxPipe {
893885
}
894886

895887
friend class Device;
896-
friend RxTxPipe; // FIXME(sadok): Should not need this.
897888

898889
const enso_pipe_id_t kId; ///< The ID of the pipe.
899890
void* context_;
@@ -903,7 +894,6 @@ class TxPipe {
903894
uint32_t app_begin_ = 0; // The next byte to be sent.
904895
uint32_t app_end_ = 0; // The next byte to be allocated.
905896
uint64_t buf_phys_addr_;
906-
uint64_t buf_virt_addr_;
907897

908898
static constexpr uint32_t kBufMask = (kMaxCapacity + kQuantumSize) - 1;
909899
static_assert((kBufMask & (kBufMask + 1)) == 0,
@@ -1082,12 +1072,12 @@ class RxTxPipe {
10821072

10831073
/**
10841074
* @brief Returns the context associated with the pipe.
1085-
*
1075+
*
10861076
* Applications can use context to associate arbitrary pointers with a given
10871077
* pipe that can later be retrieved in a different point. For instance, when
10881078
* using Device::NextRxTxPipeToRecv(), the application may use the context to
10891079
* retrieve application data associated with the returned pipe.
1090-
*
1080+
*
10911081
* @see RxTxPipe::set_context()
10921082
*
10931083
* @return The context associated with the pipe.
@@ -1096,7 +1086,7 @@ class RxTxPipe {
10961086

10971087
/**
10981088
* @brief Sets the context associated with the pipe.
1099-
*
1089+
*
11001090
* @see RxTxPipe::context()
11011091
*/
11021092
inline void set_context(void* new_context) {
@@ -1295,4 +1285,4 @@ class PeekPktIterator : public MessageIteratorBase<PeekPktIterator> {
12951285

12961286
} // namespace enso
12971287

1298-
#endif // SOFTWARE_INCLUDE_ENSO_PIPE_H_
1288+
#endif // SOFTWARE_INCLUDE_ENSO_PIPE_H_

software/meson.build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ inc = include_directories('include')
33
subdir('include')
44
subdir('src')
55

6-
pcap_dep = dependency('pcap', version : '>=1.0')
7-
86
enso_lib = library('enso', project_sources, install: true,
97
include_directories: inc)
108
pkg_mod = import('pkgconfig')
119
pkg_mod.generate(enso_lib)
1210

13-
subdir('examples')
11+
subdir('examples')

software/src/mock_pcie.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ __consume_queue(struct RxEnsoPipeInternal* e,
216216
struct NotificationBufPair* notification_buf_pair, void** buf,
217217
bool peek = false) {
218218
std::cout << "Consume queue" << std::endl;
219-
(void)(e);
219+
(void)e;
220220
(void)notification_buf_pair;
221221
(void)peek;
222222

0 commit comments

Comments
 (0)