dma | DragonFly Mail Agent , a small Mail Transport Agent | Email library
kandi X-RAY | dma Summary
kandi X-RAY | dma Summary
dma is a small Mail Transport Agent (MTA), designed for home and office use. It accepts mails from locally installed Mail User Agents (MUA) and delivers the mails either locally or to a remote destination. Remote delivery includes several features like TLS/SSL support and SMTP authentication. dma is not intended as a replacement for real, big MTAs like sendmail(8) or postfix(1). Consequently, dma does not listen on port 25 for incoming connections.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dma
dma Key Features
dma Examples and Code Snippets
Community Discussions
Trending Discussions on dma
QUESTION
I am trying to receive messages in DMA mode, on a STM32L432KCU. The pins PA2 and PA3 are configured as DMA pins. The baudrate is 115200 and the global interrupt for USART2 is turned on. In the main function, I have the initialization of the peripherals:
...ANSWER
Answered 2022-Mar-25 at 11:45Try changing the order of the initialization procedures.
QUESTION
How can I find a difference between two previous values inside an array, if I say that I'm counting how many values do I need to insert to full fill the array? Assume that we have an array with 5
elements. If I specify index 0
, then I need to take index 4 - index 3
because they are the two previous elements. If I specify index 1
, then I need to take index 0 - index 4
. And if I specify index 4
, then I need to take index 4 - index 3
again.
I have written a C code for that and my question is...if there are a better way to minimize this C code?
...ANSWER
Answered 2022-Mar-24 at 01:29myArray
is a cyclic array. You want wrapping indexing, which is behavior we can get using %
operator:
QUESTION
Does anyone have any ideas on why these logs are giving these errors - Out of memory: kill process ... nginx invoked oom-killer?
Lately, our cms has been going down and we have to manually restart the server in AWS and we're not sure what is happening to cause this behavior. log errors
Here are the exact lines of code that repeated 33 times while the server was down:
...ANSWER
Answered 2022-Mar-11 at 08:12It's happening because your server is running out of memory. To solve this problem you have 2 options.
Update your Server's Ram or use SWAP (But upgrading Physical ram is recommended instead of using SWAP)
Limit Nginx ram use.
To limit nginx ram use open the /etc/nginx/nginx.conf
file and add client_max_body_size
under the http
configuration block. For example:
QUESTION
I would like to create objects having a variable-length array of elements, and have them be compatible in a base/derived-class sense. In C, one could put an indeterminate array at the end of a struct
and then just malloc the object to contain the full array:
ANSWER
Answered 2022-Mar-11 at 02:09As a low-level C++ developer, I understand exactly what you need, and sadly, there is no replacement for flexible array members in standard C++, with or without templates. You have to keep using flexible array members via compiler extensions.
They are not included in the language since in their current form, they are essentially a hack. They don't do well with inheritance or composition.
The problem with templates is that, the flexible array version has a common type of arrays of all sizes. That means you can place them in arrays, have non-template functions take them as parameters etc:
QUESTION
I have a cortex M3 system that executes some code on a buffer of data that is provided via DMA. There are 3 buffers: 1 for the continuous stream for the DMA, 1 to copy the streamed data at 50% point and 100%, and another to store a copy to be operated on.
The ISR copies the 1st half of the buffer once that buffer is half filled, and again the 2nd half when the buffer is fully filled.
While the lower half of the 1st buffer is streaming in again, I swap the 2nd buffer and the 3rd buffer, and operate on the most recently filled data. My concern arises from the pointer swap. It would result in 1 load instruction and 2 store instructions. If an ISR occurs I can end up with a memory leak and/or data loss. Is there an atomic way to swap these pointers? I'd like to avoid dropping the data and just waiting for the next iteration when the DMA is full again and also avoid disabling interrupts.
Also on the point of interrupts and data loss, lets say there is an audio stream and the processing done on the stream cannot keep up with the input rate. Do we drop the data? Is it similar for things like Ethernet controllers or USB controllers etc? I'm curious how this problem is tackled in other systems.
...ANSWER
Answered 2022-Mar-05 at 12:05Do you actually start really processing the data on the first buffer filled per DMA, or do you just copy the data (per memcpy()
I assume from your description) to other buffers, whatever the reason is to copy them all that much around.
Why would you copy at 50%/100%, someplace, and then have another buffer "to store a copy to operate on".
Especially, when you copy per memcpy()
as it sounds like, you even place more copying activity on the CPU, and have less CPU resources left to actually process the data itself.
Maybe you can even configure your incoming DMA to place the data already in proper double buffer memories. Or if you really need copying, setup a new DMA to do it.
To update the pointers, have an exclusive area around e.g. locking interrupts.
QUESTION
I would like to write a driver and software that:
the software asks for data every twenty seconds ,and the hardware writes data to the DMA buffer and raises an interrupt when it’s done.
Unfortunately I have no experience writing drivers,and I can't use the Xilinx IP core which already has Driver.
The PCIe IP Core I use is UltraScale+ Device Integrated Block for PCI Express (PCIe).
I have implemented a simple driver that can read the status register on FPGA. And I follow these steps to implement DMA:
...ANSWER
Answered 2022-Mar-01 at 09:30I wrote a tutorial to transfert data from FPGA to CPU RAM with PCIe some years ago but it's with a CycloneV.
In short:
- First you have to allocate a coherent buffer with :
QUESTION
I am first time using function pointers and ran into a weird problem. I am writing a code for STM32G4xx. The main idea is to transmit and receive data through LPUART. I have implemented simple FSM to handle TX and RX. LPUART configured in DMA interrupt mode. I have typedef the function pointer and declared the three function pointer variables (ISR handles) in main.h file as follow:
...ANSWER
Answered 2022-Feb-17 at 07:53As per @Lundin's suggestion, I have put a watchpoint on lpuart_dma_rx_tc_isr_clback
function pointer variable. It exposed the out of index bug in my code. The bug is inside while loop in main.c.
QUESTION
I have a Zynq SoC which runs a Linux system and would like to time the speed at which I can write to its SD card in C.
I have tried out clock()
and clock_gettime()
where for the latter, I have done the following:
ANSWER
Answered 2022-Feb-07 at 09:11The Linux Kernel often caches read write access to disk storage. That is, it returns from the write call and does the actual writing in the background. It does that transparently, so that if you would read the same file, just after writing, you would get the results you wrote, even if they are not yet transferred and written completely to disk.
To force a complete write you can call the fsync function. It blocks until all file IO for a specific file has completed. In your case a call to
QUESTION
I run FreeBSD-based kernel as QEMU/KVM guest.
I'm working on a FreeBSD-based OS kernel SCSI driver and have an issue with read
system call produces corrupted data.
To troubleshoot the problem I use the Kernel running in QEMU and would like to trace memory access performed by the DMA controller which is responsible for delivering data into the user-supplied buffer. In case of QEMU The controller is QEMU SCSI/ATA Disk
device. So I tried to set a watchpoint on a user supplied buffer
Example:
Setting the breakpoint on int sys_read(struct thread *td, struct read_args *uap)
I got some buffer arrived from the user:
ANSWER
Answered 2022-Jan-28 at 11:41The watchpoint handling provided for QEMU's gdbstub is really only intended to work with accesses done by the guest CPU, not for those done by DMA from emulated devices. I'm surprised it hits at all, and not surprised that the behaviour is a bit weird.
If you can repro this on a QEMU setup using purely emulation (ie not KVM, hvf or whpx), then my suggestion for debugging this would be to run QEMU itself in a host gdb, and use the host gdb to set a watchpoint on the host memory that corresponds to the relevant bit of guest memory. Unfortunately that requires some knowledge of QEMU internals to find the host memory, and generally to understand what's going on and relate what QEMU is doing to what the guest execution is.
Supplementary debugging tip: if you can take a 'snapshot' just before the bug is triggered, that gives you a shorter reproduce case which is "load from snapshot and trigger bug" rather than "boot entire guest OS and userspace then trigger bug". More detail in this blog post.
Supplementary debugging tip 2: if you take the "debug QEMU with host gdb" approach, you can use the reverse-debugger rr, which is very handy for memory-corruption bugs, because you can say "now execute backwards to whatever last touched this memory". More info in this post.
QUESTION
I am trying to realize DMA in Xilinx, using DMA Engine. FPGA guys give me an AXI DMA IP-Core with DMA support, so I need to write a driver, which will transfer data from kernel to user space buffer. Here you can find an example of the driver and app, which works so:
...ANSWER
Answered 2022-Jan-14 at 07:14You probably want to implement mmap
method of struct file_operations
. Consider:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dma
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page