Re: [dpdk-dev] About the data payload of rte_mbuf?

2018-12-05 Thread Shyam Shrivastav
And if just payload length is required one can get by subtracting (ip-hdr-len + tcp-offset) from total length in ip header ... On Thu, Dec 6, 2018 at 11:18 AM Shyam Shrivastav wrote: > > As per my understanding > > payload = (uint8_t *)tcp_hdr + (tcp_hdr->data_off <&

Re: [dpdk-dev] About the data payload of rte_mbuf?

2018-12-05 Thread Shyam Shrivastav
As per my understanding payload = (uint8_t *)tcp_hdr + (tcp_hdr->data_off << 2); should be payload = (uint8_t *)tcp_hdr + (tcp_hdr->data_off >> 4) << 2); Note that data offset is 4 most significant bits of the byte, refer tcp header On Thu, Dec 6, 2018 at 9:15 AM bai bakari <912873...@qq.com

Re: [dpdk-dev] [dpdk-users] IPV4/IPV6 TCP/UDP Pseudo Header Checksum APIs

2018-10-23 Thread Shyam Shrivastav
These fixes/modifications should include the upper level APIs, rte_ipv4_udptcp_cksum and rte_ipv6_udptcp_cksum. Even for ipv4 following API is more/really useful if changed to take mbufs rte_ipv4_udptcp_cksum(const struct ipv4_hdr *ipv4_hdr, const void *l4_hdr) I can not use it in present form a

Re: [dpdk-dev] IPV4/IPV6 TCP/UDP Pseudo Header Checksum APIs

2018-10-19 Thread Shyam Shrivastav
s bug? > > > > *发件人:* Shyam Shrivastav [mailto:shrivastav.sh...@gmail.com] > *发送时间:* 2018年10月20日 13:23 > *收件人:* lidejun > *抄送:* users ; dev@dpdk.org; Lichunhe (Cloud Networking) < > lichu...@huawei.com>; Wangliefeng > *主题:* Re: [dpdk-dev] IPV4/IPV6 TCP/UDP Pseud

Re: [dpdk-dev] IPV4/IPV6 TCP/UDP Pseudo Header Checksum APIs

2018-10-19 Thread Shyam Shrivastav
18 at 10:42 AM Shyam Shrivastav < shrivastav.sh...@gmail.com> wrote: > that is correct , pseudo header doesn't include ipv4 options or ipv6 > extension headers .. > > On Sat, Oct 20, 2018 at 9:02 AM lidejun wrote: > >> Has anybody used the following two APIs ca

Re: [dpdk-dev] IPV4/IPV6 TCP/UDP Pseudo Header Checksum APIs

2018-10-19 Thread Shyam Shrivastav
that is correct , pseudo header doesn't include ipv4 options or ipv6 extension headers .. On Sat, Oct 20, 2018 at 9:02 AM lidejun wrote: > Has anybody used the following two APIs calculating ipv4&ipv6 tcp/udp > pseudo header checksum? > > 1.rte_ipv4_phdr_cksum > > 2.rte_ipv6_phdr_cksum >

Re: [dpdk-dev] Build DPDK for different target machine.

2018-10-19 Thread Shyam Shrivastav
I am doing same but including dpdk libraries with application, you can do same. Other thing to try, copy the shared libraries from the build machine into targets instead of building them on targets. On Fri, Oct 19, 2018 at 9:55 PM Shubhachint, Chaitanya < chaitanya.shubhach...@netscout.com> wrote:

Re: [dpdk-dev] Why rte_pipeline.c only support forwarding to same table in different entries?

2018-06-07 Thread Shyam Shrivastav
Looking at code, another change might make this work. Make sure that default entry action of each table points to next table except for last one which normally should be drop Please look at if (lookup_miss_mask != 0) handling in rte_pipeline_run () . On Thu, Jun 7, 2018 at 12:49 PM, hongbo li

Re: [dpdk-dev] rte_hash thread safe

2018-04-24 Thread Shyam Shrivastav
You can look at hash table support under librte_table, we are using it for tcp stateful and syncache table (16 bytes key), supports optimized burst look ups, pretty good performance at line rate with up to half a billion entries in syn cache lru table and 33 million in flows ext table. However the

Re: [dpdk-dev] Segmentation fault when creating a hash table in the example of pipeline (ROUTING type)

2018-04-19 Thread Shyam Shrivastav
I have been using librte_pipeline, librte_table though only acl and hash_key16 part, and firewall part of ip_pipeline in my project for quite sometime. I have never used or worked on other parts of ip_pipeline app like routing. Obviously issue is due to bad memory access at some point. Here are my

Re: [dpdk-dev] how to build 'example' folder in dpdk-2.2.0?

2017-06-08 Thread Shyam Shrivastav
For linux http://dpdk.org/doc/guides/linux_gsg/index.html http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html http://dpdk.org/doc/guides/linux_gsg/build_sample_apps.html On Fri, Jun 9, 2017 at 8:31 AM, Sam wrote: > hi all, > > I want to build example(DPDK_HOME/example/*) in dpdk, and to have a

Re: [dpdk-dev] Defining multiple actions based on a field value for the same table lookup in ip_pipeline application

2017-05-18 Thread Shyam Shrivastav
; two different miss actions based on some decision criteria(input port in my > case). > Miss ->Case 1: Add entry to table if portid = 1 > ->Case 2: Drop if portid = 2 > > On Thu, May 18, 2017 at 7:34 PM, Shyam Shrivastav < > shrivastav.sh...@gmail.com> wro

Re: [dpdk-dev] Defining multiple actions based on a field value for the same table lookup in ip_pipeline application

2017-05-18 Thread Shyam Shrivastav
For each table a lookup hit and miss function can be registered, have a look at rte_pipeline_run(struct rte_pipeline *p) for the semantics On Thu, May 18, 2017 at 5:53 PM, Nidhia Varghese wrote: > Hi all, > > I am trying to design a pipeline where the table lookup has to do the > actions as foll

Re: [dpdk-dev] [dpdk-users] Fwd: Sharing tables among pipelines

2017-05-10 Thread Shyam Shrivastav
Something I have gathered reading through code if it helps, ip_pipeline is designed such that user side cli (_fe) runs in master pipeline and sends conf requests to various other packet processing pipelines (_be) which handle such requests at intervals. These can run on same or different threads(co

Re: [dpdk-dev] Printing statistics on running passthrough pipeline in ip_pipeline application

2017-04-20 Thread Shyam Shrivastav
Enable flags in dpdk/config/common_base and recompile CONFIG_RTE_*_STATS_COLLECT=y {* for PIPELINE,PORT,TABLE ...} On Fri, Apr 21, 2017 at 11:58 AM, Nidhia Varghese < nidhiavarghes...@gmail.com> wrote: > Hi, > > I am running ip_pipeline application using ip_pipeline.cfg file. How can I > see

Re: [dpdk-dev] [PATCH v2] pipeline_firewall: Fix for port range filtering

2017-03-24 Thread Shyam Shrivastav
> Firewall ACL definition need to use same input index for source and > > destination ports as these are 16 bits and would fit in one ACL > > field of 32 bits. This is required as per librte_acl API. Without this > > UDP/TCP source and destination ports filtering (and for that > > matter ICMP type/

Re: [dpdk-dev] Fixed : ip_pipeline firewall port range filtering

2017-03-20 Thread Shyam Shrivastav
g] On Behalf Of Shyam Shrivastav > > Sent: Sunday, March 19, 2017 4:11 PM > > To: dev@dpdk.org > > Cc: Shyam Shrivastav > > Subject: [dpdk-dev] Fixed : ip_pipeline firewall port range filtering > > > > Found the issue,was debugging acl library while issue was wi

[dpdk-dev] Fixed : ip_pipeline firewall port range filtering

2017-03-19 Thread Shyam Shrivastav
, .offset = sizeof(struct ether_hdr) + SIZEOF_QINQ_HEADER + sizeof(struct ipv4_hdr) + On Sat, Mar 18, 2017 at 9:58 PM, Shyam Shrivastav < shrivastav.sh...@gmail.com> wrote: > I took older versions dpdk-stable-16.07.2 & dpdk-16.04(al

Re: [dpdk-dev] ip_pipeline firewall port range filtering

2017-03-18 Thread Shyam Shrivastav
ACLs? Looks like I have to go through ACL compilation/clasify code which looks quite difficult :( On Fri, Mar 17, 2017 at 12:31 PM, Shyam Shrivastav < shrivastav.sh...@gmail.com> wrote: > Hi > > I am trying to just allow tcp dest port 80 packets using ip_pipeline > firewal

[dpdk-dev] ip_pipeline firewall port range filtering

2017-03-17 Thread Shyam Shrivastav
Hi I am trying to just allow tcp dest port 80 packets using ip_pipeline firewall, configured as under pipeline> p 1 firewall add priority 1 ipv4 0.0.0.0 0 0.0.0.0 0

[dpdk-dev] ip_pipeline firewall : fragmented ipv4 packets handling

2017-03-16 Thread Shyam Shrivastav
Again sending this issue as no response on original post. As per my understanding if we are supporting ACL on tcp/usp port ranges then ipv4 packets must be reassembled before checking against ACL, then fragmented if required during forwarding. So there are three cases 1) My understanding is wrong

Re: [dpdk-dev] DPDK17.02 flow classification can not take effect

2017-03-10 Thread Shyam Shrivastav
I am using 16.11 and noticed the same thing, mbuf->packet_type is not populated == 0 . On Thu, Mar 9, 2017 at 12:57 PM, Chillance Zen wrote: > previous 16.07 works well , when I examine the rte_mbuf->packet_type,I can > get the well-corresponded packet type. after migrating code to 17.02 ,I > w

[dpdk-dev] ip_pipeline firewall : fragmented packets filtering

2017-03-10 Thread Shyam Shrivastav
Hi All Filtering based on TCP/UDP fields like src/dest port range works correctly only on non-fragmented packets , that means reassembly must be done before packets hit firewall rules table. Also packets must be fragmented before transmission if larger than port mtu. This is unsupported currently

Re: [dpdk-dev] ip_pipeline firewall customization

2017-03-09 Thread Shyam Shrivastav
Hi Singh Please find my comments inline > > [Jasvinder] - You need to set the right proto field and accordingly the > mask in the above rule. You can keep src/dst ip addresses intact. Proto > field defines the protocol used in the data portion of the IP datagram and > can be find here >

Re: [dpdk-dev] ip_pipeline firewall customization

2017-03-09 Thread Shyam Shrivastav
o a separate queue .Another is explicitly filtering them before or after firewall table look up, firewall table is supposed to be only for ipv4/ipv6 packets have to work/think more on this On Thu, Mar 9, 2017 at 5:13 PM, Shyam Shrivastav wrote: > Hi Cristian > > Please see my comment

Re: [dpdk-dev] ip_pipeline firewall customization

2017-03-09 Thread Shyam Shrivastav
Hi Cristian Please see my comments inline (in blue) > b) Make required changes in pipeline_firewall_msg_req_add_handler if > > portid is -1, that is table entry action to be .action = > > RTE_PIPELINE_ACTION_DROP. > > > > You don't really need to do this for implementing a drop action. You

[dpdk-dev] ip_pipeline firewall customization

2017-03-08 Thread Shyam Shrivastav
Hi All I am using ip_pipeline firewall as base for our project, need comments/suggestions/corrections regarding following 1) We can not configure firewall rule to drop packets, as portid is mandatory in command. I am planning to allow this for our requirement with following code changes a)