[dpdk-dev] kni vs. pmd
Hi, Correct me if I'm wrong, but in a high-level perspective I see that kni is providing an option for applications to use their regular interfaces (e.g. sockets) and abstracts the usage of pmds. If this is somehow correct, are there any differences with regard to performance benefits that can be brought between directly using pmd apis and kni ? I see that kni is easier to use, however at first (no code inspection) look, it interfaces with the kernel which might have introduced some overhead. Cheers, Pepe -- To stop learning is like to stop loving.
[dpdk-dev] kni vs. pmd
Additional question: Apart from the possible fact that kni performs zero-copy in the driver layer, does this also apply on the sockets layer, or does the sockets operations (+ sys calls) are not avoided ? This is assuming that the application uses regular sockets to read/write to knis. Cheers, Pepe On Wed, Dec 11, 2013 at 7:12 AM, Jose Gavine Cueto wrote: > Hi, > > Correct me if I'm wrong, but in a high-level perspective I see that kni is > providing an option for applications to use their regular interfaces (e.g. > sockets) and abstracts the usage of pmds. > > If this is somehow correct, are there any differences with regard to > performance benefits that can be brought between directly using pmd apis > and kni ? > > I see that kni is easier to use, however at first (no code inspection) > look, it interfaces with the kernel which might have introduced some > overhead. > > Cheers, > Pepe > > > -- > To stop learning is like to stop loving. > -- To stop learning is like to stop loving.
[dpdk-dev] kni question
Hi, I would like to ask if kni was intentionally provided mainly for PMD API users/developers ? Most of the examples emphasizes how to use the kni devices by upper level applications with sockets, however I haven't seen any usage where PMD APIs being used to send packets to knis. Is this possible to send packets to kni using PMD APIs , or perhaps if this is already implemented would it be possible to modify to core port topology ? Thanks, PePe -- To stop learning is like to stop loving.
[dpdk-dev] Who can correct me about 82599 RSS Hash Function
I want calculate the NIC rss hash result by function,but the result is not right, I don't know where the wrong. struct mbf_cb{ uint32_t sip; uint32_t dip; uint16_t sport; uint16_t dport; }; static uint8_t test_rss[]={ 0x6d,0x5a,0x56,0xda,0x25,0x5b,0x0e,0xc2, 0x41,0x67,0x25,0x3d,0x43,0xa3,0x8f,0xb0, 0xd0,0xca,0x2b,0xcb,0xae,0x7b,0x30,0xb4, 0x77,0xcb,0x2d,0xa3,0x80,0x30,0xf2,0x0c, 0x6a,0x42,0xb7,0x3b,0xbe,0xac,0x01,0xfa, }; static uint8_t input_mask[]={ 0x01,0x02,0x04,0x08, 0x10,0x20,0x40,0x80, }; mcb.sip=rte_cpu_to_be_32(IPv4(66,9,149,187)); mcb.dip=rte_cpu_to_be_32(IPv4(161,142,100,80)); mcb.sport=rte_cpu_to_be_16(2794); mcb.dport=rte_cpu_to_be_16(1766); uint32_t compute_hash(uint8_t *input, int n) { int i,j,k; uint32_t result=0; uint32_t *lk; uint8_t rss_key[40]; memcpy(rss_key,test_rss,40); lk=(uint32_t *)rss_key; for(i=0;i