Re: [PATCH][net-next] net: qualcomm: rmnet: remove unused variable priv

2017-08-31 Thread Subash Abhinov Kasiviswanathan
- struct rmnet_priv *priv; - - priv = netdev_priv(rmnet_dev); netdev_dbg(rmnet_dev, "Setting up device %s\n", rmnet_dev->name); rmnet_dev->netdev_ops = _vnd_ops; Thanks for fixing this. Acked-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org>

Re: [PATCH net-next 3/3 v11] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-30 Thread Subash Abhinov Kasiviswanathan
Subash, keep in mind that since I applied your v11 patches already you will need to send me relative fixes and changes at this point, rather than resubmit the series. Thank you. Thanks for the heads up David. Will do. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is

Re: [PATCH net-next 3/3 v11] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-30 Thread Subash Abhinov Kasiviswanathan
General comment; other drivers that do similar things (macvlan, ipvlan) use the term "port" to refer to what I think you're calling a "rmnet_real_dev_info". Maybe that's a shorter or less confusing term. Could be renamed later too, if you wanted to do so. Hi Dan I'll rename it to rmnet_port.

[PATCH net-next 3/3 v11] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-29 Thread Subash Abhinov Kasiviswanathan
consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet.txt | 82 drivers/net/ethernet/qualcomm/Kconfig | 2 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/et

[PATCH net-next 2/3 v11] net: arp: Add support for raw IP device

2017-08-29 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h

[PATCH net-next 0/3 v11] Add support for rmnet driver

2017-08-29 Thread Subash Abhinov Kasiviswanathan
hange comment near MAP type definition as mentioned by Dan. Refactor some code. v10->v11: Allow RMNET to compile as a module as mentioned by David Subash Abhinov Kasiviswanathan (3): net: ether: Add support for multiplexing and aggregation type net: arp: Add support for raw IP device dr

[PATCH net-next 1/3 v11] net: ether: Add support for multiplexing and aggregation type

2017-08-29 Thread Subash Abhinov Kasiviswanathan
Define the Qualcomm multiplexing and aggregation (MAP) ether type 0x00F9. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_ether

Re: [PATCH net-next 0/3 v10] Add support for rmnet driver

2017-08-29 Thread Subash Abhinov Kasiviswanathan
On 2017-08-29 19:12, David Miller wrote: Sigh, I had to revert. You only allow RMNET to take on the values 'y' and 'n'. You must allow for it to be 'm' and modular as well. Hi David I'll fix this now. Sorry about the cover letter. I'll explain it better in subsequent submission. --

[PATCH net-next 3/3 v10] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-29 Thread Subash Abhinov Kasiviswanathan
consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet.txt | 82 drivers/net/ethernet/qualcomm/Kconfig | 2 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/et

[PATCH net-next 0/3 v10] Add support for rmnet driver

2017-08-29 Thread Subash Abhinov Kasiviswanathan
k(). v9->v10: Fix the locking scheme as mentioned by David. Change comment near MAP type definition as mentioned by Dan. Refactor some code. Subash Abhinov Kasiviswanathan (3): net: ether: Add support for multiplexing and aggregation type net: arp: Add support for raw IP device driver

[PATCH net-next 1/3 v10] net: ether: Add support for multiplexing and aggregation type

2017-08-29 Thread Subash Abhinov Kasiviswanathan
Define the Qualcomm multiplexing and aggregation (MAP) ether type 0x00F9. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_ether

[PATCH net-next 2/3 v10] net: arp: Add support for raw IP device

2017-08-29 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h

Re: [PATCH net-next 1/3 v9] net: ether: Add support for multiplexing and aggregation type

2017-08-28 Thread Subash Abhinov Kasiviswanathan
On 2017-08-28 16:22, Dan Williams wrote: On Thu, 2017-08-24 at 22:39 -0600, Subash Abhinov Kasiviswanathan wrote: Define the multiplexing and aggregation (MAP) ether type 0x00F9. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed

Re: [PATCH net-next 3/3 v9] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-28 Thread Subash Abhinov Kasiviswanathan
In these code paths where you are the writer, you have to rely upon the RTNL mutex (or some other mutual exclusion mechanism) to protect the update operation. RCU locking itself does not provide this. So you should use something like rcu_dereference_rtnl() or similar. So this would be

[PATCH net-next 2/3 v9] net: arp: Add support for raw IP device

2017-08-24 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h

[PATCH net-next 3/3 v9] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-24 Thread Subash Abhinov Kasiviswanathan
consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet.txt | 82 + drivers/net/ethernet/qualcomm/Kconfig | 2 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/et

[PATCH net-next 1/3 v9] net: ether: Add support for multiplexing and aggregation type

2017-08-24 Thread Subash Abhinov Kasiviswanathan
Define the multiplexing and aggregation (MAP) ether type 0x00F9. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_ether.h | 1 +

[PATCH net-next 0/3 v9] Add support for rmnet driver

2017-08-24 Thread Subash Abhinov Kasiviswanathan
le. Change the way rmnet devices are freed. Instead of using a workqueue to unregister devices individually, go through the list and free all devices within the rtnl_lock(). Subash Abhinov Kasiviswanathan (3): net: ether: Add support for multiplexing and aggregation type net: arp: Add support for

Re: [PATCH net-next 3/3 v7] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-24 Thread Subash Abhinov Kasiviswanathan
+ +CFLAGS_rmnet.o := -I$(src) You do not need this CFLAGS rule, the local include files are included using "" double quotes so it uses the local directory always. Hi David I'll remove this. +static void rmnet_free_later(struct work_struct *work) +{ + struct rmnet_free_work *fwork; +

[PATCH net-next 2/3 v8] net: arp: Add support for raw IP device

2017-08-22 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h

[PATCH net-next 1/3 v8] net: ether: Add support for multiplexing and aggregation type

2017-08-22 Thread Subash Abhinov Kasiviswanathan
Define the multiplexing and aggregation (MAP) ether type 0x00F9. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_ether.h | 1 +

[PATCH net-next 3/3 v8] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-22 Thread Subash Abhinov Kasiviswanathan
consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet.txt | 82 drivers/net/ethernet/qualcomm/Kconfig | 2 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/et

[PATCH net-next 0/3 v8] Add support for rmnet driver

2017-08-22 Thread Subash Abhinov Kasiviswanathan
obot for an unused file. v7->v8: Use a smaller value for ETH_P_MAP as mentioned by David. Change netdev_info to netdev_dbg as mentioned by Andew. Fix comments from Stephen regarding netdev_priv and sparse related errors of using 0 as NULL Subash Abhinov Kasiviswanathan (3): net: ether: Add sup

Re: [PATCH net-next 3/3 v5] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-21 Thread Subash Abhinov Kasiviswanathan
+ priv = netdev_priv(rmnet_dev); + memset(priv, 0, sizeof(struct rmnet_priv)); Netdev private area is always zero on creation. See alloc_netdev(). + if (!rmnet_dev) + return 0; Do not confuse 0 with NULL. Did you run sparse? + + priv =

Re: [PATCH net-next 1/3 v7] net: ether: Add support for multiplexing and aggregation type

2017-08-21 Thread Subash Abhinov Kasiviswanathan
+#define ETH_P_MAP 0xDA1A /* Multiplexing and Aggregation Protocol +* NOT AN OFFICIALLY REGISTERED ID ] +*/ Hi Subash This list is sorted. So this entry should go earlier. +

[PATCH net-next 1/3 v7] net: ether: Add support for multiplexing and aggregation type

2017-08-21 Thread Subash Abhinov Kasiviswanathan
Define the multiplexing and aggregation (MAP) ether type 0xDA1A. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_ether.h | 4 +++-

[PATCH net-next 2/3 v7] net: arp: Add support for raw IP device

2017-08-21 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h

[PATCH net-next 3/3 v7] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-21 Thread Subash Abhinov Kasiviswanathan
consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet.txt | 82 drivers/net/ethernet/qualcomm/Kconfig | 2 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/et

[PATCH net-next 0/3 v7] Add support for rmnet driver

2017-08-21 Thread Subash Abhinov Kasiviswanathan
obot for an unused file. Subash Abhinov Kasiviswanathan (3): net: ether: Add support for multiplexing and aggregation type net: arp: Add support for raw IP device drivers: net: ethernet: qualcomm: rmnet: Initial implementation Documentation/networking/rmnet.txt | 82 dr

[PATCH net-next 1/3 v6] net: ether: Add support for multiplexing and aggregation type

2017-08-18 Thread Subash Abhinov Kasiviswanathan
Define the multiplexing and aggregation (MAP) ether type 0xDA1A. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_ether.h | 4 +++-

[PATCH net-next 2/3 v6] net: arp: Add support for raw IP device

2017-08-18 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h

[PATCH net-next 3/3 v6] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-18 Thread Subash Abhinov Kasiviswanathan
consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet.txt | 82 drivers/net/ethernet/qualcomm/Kconfig | 2 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/et

[PATCH net-next 0/3 v6] Add support for rmnet driver

2017-08-18 Thread Subash Abhinov Kasiviswanathan
eld on real_dev on rx_handler registration only. Modifiy the flow control struct. Remove the unused ethernet mode handling. Subash Abhinov Kasiviswanathan (3): net: ether: Add support for multiplexing and aggregation type net: arp: Add support for raw IP device drivers: net: ethernet: qualcomm:

Re: [PATCH net-next 3/3 v5] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-17 Thread Subash Abhinov Kasiviswanathan
I'm probably forgetting a bit of the original context. Say you have one of these "network devices in IP mode". What happens with the device *before* you attach an rmnet child? Can it pass traffic before that point at all, or does the modem expect MAP already? Hi Dan All traffic needs to be

Re: [PATCH net-next 2/3 v4] net: arp: Add support for raw IP device

2017-08-16 Thread Subash Abhinov Kasiviswanathan
diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h index cf73510..d6650e2 100644 --- a/include/uapi/linux/if_arp.h +++ b/include/uapi/linux/if_arp.h @@ -59,6 +59,7 @@ #define ARPHRD_LAPB 516 /* LAPB */ #define ARPHRD_DDCMP517

[PATCH net-next 2/3 v5] net: arp: Add support for raw IP device

2017-08-16 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h

[PATCH net-next 0/3 v5] Add support for rmnet driver

2017-08-16 Thread Subash Abhinov Kasiviswanathan
ove debug and custom logging and switch to standard netdevice log. Remove module parameters. Refactor and change some code style issues. v4->v5: Rename some structs and variables. Move the initializer before the for loop start. Put the arp type in correct sequence. Subash Abhinov Kasiviswanatha

[PATCH net-next 3/3 v5] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-16 Thread Subash Abhinov Kasiviswanathan
consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet.txt | 82 drivers/net/ethernet/qualcomm/Kconfig | 2 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/et

[PATCH net-next 1/3 v5] net: ether: Add support for multiplexing and aggregation type

2017-08-16 Thread Subash Abhinov Kasiviswanathan
Define the multiplexing and aggregation (MAP) ether type 0xDA1A. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_ether.h | 4 +++-

Re: [PATCH net-next 3/3 v4] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-16 Thread Subash Abhinov Kasiviswanathan
+struct rmnet_phys_ep_conf_s { The name is cryptic. Why "_s"? + +struct rmnet_vnd_private_s { Again, cryptic. + struct rmnet_logical_ep_conf_s local_ep; + u32 msg_enable; +}; Hi Jiri The _s was to indicate struct. I'll remove that. +rx_handler_result_t

Re: [PATCH net-next 3/3 v4] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-16 Thread Subash Abhinov Kasiviswanathan
> +static int rmnet_unregister_real_device(struct net_device *dev) > +{ > + int config_id = RMNET_LOCAL_LOGICAL_ENDPOINT; > + struct rmnet_logical_ep_conf_s *epconfig_l; > + struct rmnet_phys_ep_conf_s *config; > + > + ASSERT_RTNL(); > + > + netdev_info(dev, "Removing device %s\n",

[PATCH net-next 2/3 v4] net: arp: Add support for raw IP device

2017-08-15 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h

[PATCH net-next 1/3 v4] net: ether: Add support for multiplexing and aggregation type

2017-08-15 Thread Subash Abhinov Kasiviswanathan
Define the multiplexing and aggregation (MAP) ether type 0xDA1A. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/uapi/linux/if_ether.h | 4 +++-

[PATCH net-next 3/3 v4] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-15 Thread Subash Abhinov Kasiviswanathan
consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet.txt | 82 drivers/net/ethernet/qualcomm/Kconfig | 2 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/et

[PATCH net-next 0/3 v4] Add support for rmnet driver

2017-08-15 Thread Subash Abhinov Kasiviswanathan
ove debug and custom logging and switch to standard netdevice log. Remove module parameters. Refactor and change some code style issues. Subash Abhinov Kasiviswanathan (3): net: ether: Add support for multiplexing and aggregation type net: arp: Add support for raw IP device drivers: net:

Re: [PATCH net-next 1/1 v3] drivers: net: rmnet: Initial implementation

2017-08-14 Thread Subash Abhinov Kasiviswanathan
+ */ +void rmnet_egress_handler(struct sk_buff *skb, + struct rmnet_logical_ep_conf_s *ep) +{ + struct rmnet_phys_ep_conf_s *config; + struct net_device *orig_dev; + int rc; + + orig_dev = skb->dev; + skb->dev = ep->egress_dev; + +

[PATCH net-next v3] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-18 Thread Subash Abhinov Kasiviswanathan
only. v1->v2: Take reference to socket after match as suggested by Eric v2->v3: Add comment before break Fixes: 5425077d73e0c ("net: ipv6: Add early demux handler for UDP unicast") Reported-by: David Ahern <d...@cumulusnetworks.com> Signed-off-by: Subash Abhinov Kasiviswanat

Re: [PATCH net-next v2] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-17 Thread Subash Abhinov Kasiviswanathan
+ break; I think break here should remove ? Hi Yuan This is similar to __udp4_lib_demux_lookup where we need to check if the first socket is an exact match or break since chains maybe long. -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a

[PATCH net-next v2] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-17 Thread Subash Abhinov Kasiviswanathan
only. v1->v2: Take reference to socket after match as suggested by Eric Fixes: 5425077d73e0c ("net: ipv6: Add early demux handler for UDP unicast") Reported-by: David Ahern <d...@cumulusnetworks.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> Cc

[PATCH net-next] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-17 Thread Subash Abhinov Kasiviswanathan
ckets only. Fixes: 5425077d73e0c ("net: ipv6: Add early demux handler for UDP unicast") Reported-by: David Ahern <d...@cumulusnetworks.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- net/ipv6/udp.c | 21 + 1 file changed, 13 ins

Re: ipv6 udp early demux breaks udp_l3mdev_accept=0

2017-04-16 Thread Subash Abhinov Kasiviswanathan
Can you try this --- net/ipv6/udp.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index b793ed1..0e307e5 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -46,6 +46,7 @@ #include #include #include +#include

Re: ipv6 udp early demux breaks udp_l3mdev_accept=0

2017-04-15 Thread Subash Abhinov Kasiviswanathan
It should be fixed for 4.12. Basically, __udp6_lib_demux_lookup needs to be more like __udp4_lib_demux_lookup Hi David Would it be possible for you to test this with udp_l3mdev_accept=0 diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index b793ed1..0e307e5 100644 --- a/net/ipv6/udp.c +++

Re: ipv6 udp early demux breaks udp_l3mdev_accept=0

2017-04-14 Thread Subash Abhinov Kasiviswanathan
On 2017-04-14 16:23, David Ahern wrote: Subash: My understanding of early demux is that it should only match connected sockets (src/sport + dst/dport are all set). The ipv6 udp early demux code added in 5425077d73e0c is doing a generic socket lookup which does not require an exact match and

Re: [PATCH net-next 1/1 v3] drivers: net: rmnet: Initial implementation

2017-04-14 Thread Subash Abhinov Kasiviswanathan
+https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/\ +dataservices/tree/rmnetctl Don't split URL better to have long line. diff --git a/drivers/net/rmnet/Kconfig b/drivers/net/rmnet/Kconfig Since this is Qualcomm and Ethernet specific, maybe better to put in

Re: [PATCH net-next 1/1 v3] drivers: net: rmnet: Initial implementation

2017-04-14 Thread Subash Abhinov Kasiviswanathan
No, please use standard facilities in order to do debug logging. +static struct rmnet_logical_ep_conf_s *_rmnet_get_logical_ep Dont use "_" at the start of a name without purpose +static int rmnet_associate_network_device(struct net_device *dev) I would expect to see here you making

[PATCH net-next 1/1 v3] drivers: net: rmnet: Initial implementation

2017-04-13 Thread Subash Abhinov Kasiviswanathan
consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet.txt| 83 + drivers/net/Kconfig | 2 + drivers/net/Makefile | 1 + drivers/net/rmnet/Kconfig | 23 ++ drive

[PATCH net-next 0/1 v3] drivers: net: Add support for rmnet driver

2017-04-13 Thread Subash Abhinov Kasiviswanathan
fixed config for ingress and egress. Subash Abhinov Kasiviswanathan (1): drivers: net: rmnet: Initial implementation Documentation/networking/rmnet.txt| 83 + drivers/net/Kconfig | 2 + drivers/net/Makefile | 1 + drivers/net/rmnet/Kconfig

Re: net/ipv4: use-after-free in ipv4_mtu

2017-04-05 Thread Subash Abhinov Kasiviswanathan
Interesting. I might had too many beers tonight, but ... refcount was removed in 2860583fe840 many months later -static void rt_init_metrics(struct rtable *rt, struct fib_info *fi) -{ - if (fi->fib_metrics != (u32 *) dst_default_metrics) { - rt->fi = fi; -

Re: [PATCH net-next 1/1 v2] net: rmnet_data: Initial implementation

2017-03-31 Thread Subash Abhinov Kasiviswanathan
Yeah, seems quite a bit like VLAN (from a workflow perspective, not quite as much from a protocol one) and I think the same workflow could work for this too. Would be nice to eventually get qmi_wwan onto the same base, if possible (though we'd need to preserve the 802.3 capability somehow for

Re: [PATCH net-next 1/1 v2] net: rmnet_data: Initial implementation

2017-03-24 Thread Subash Abhinov Kasiviswanathan
(re-sending from an address that's actually subscribed to netdev@...) The first thing that jumps out at me is "why isn't this using rtnl_link_ops?" To me (and perhaps I'm completely wrong) the structure here is a lot like VLAN interfaces.  You have a base device (whether that's a netdev or not)

Re: [PATCH 0/2] net: usb: qmi_wwan: add qmap mux protocol support

2017-03-24 Thread Subash Abhinov Kasiviswanathan
On 2017-03-24 07:22, Daniele Palmas wrote: This patch adds support for qmap mux protocol available in recent Qualcomm based modems. The qmap mux protocol can be used for multiplexing data packets in order to have multiple ip streams through the same physical device. Two new sysfs files are

[PATCH net-next v5] net: Add sysctl to toggle early demux for tcp and udp

2017-03-23 Thread Subash Abhinov Kasiviswanathan
due to compilation with IPV6={m,n} Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> Suggested-by: Eric Dumazet <eduma...@google.com> Cc: Stephen Hemminger <step...@networkplumber.org> Cc: Tom Herbert <t...@herbertland.com> Cc: David Miller <da...@da

Re: [PATCH net-next v4] net: Add sysctl to toggle early demux for tcp and udp

2017-03-22 Thread Subash Abhinov Kasiviswanathan
This doesn't build with ipv6 as a module: net/built-in.o: In function `proc_tcp_early_demux': sysctl_net_ipv4.c:(.text+0x145cfc): undefined reference to `tcp_v6_early_demux_configure' net/built-in.o: In function `proc_udp_early_demux': sysctl_net_ipv4.c:(.text+0x145d4c): undefined reference to

[PATCH net-next v4] net: Add sysctl to toggle early demux for tcp and udp

2017-03-22 Thread Subash Abhinov Kasiviswanathan
of adding conditional as suggested by Stephen. v2->v3: Read once in callers to avoid issues due to compiler optimizations. Also update commit message with the tests. v3>v4: Store and use read once result instead of querying pointer again incorrectly. Signed-off-by: Subash Abhinov Kasivis

[PATCH net-next v3] net: Add sysctl to toggle early demux for tcp and udp

2017-03-21 Thread Subash Abhinov Kasiviswanathan
of adding conditional as suggested by Stephen. v2->v3: Read once in callers to avoid issues due to compiler optimizations. Also update commit message with the tests. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> Suggested-by: Eric Dumazet <eduma...@google.com&g

Re: [PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp

2017-03-18 Thread Subash Abhinov Kasiviswanathan
Less than 1% performance improvement in a benchmark doesn't justify the complexity of the patch. Eric's hypothesis was that an unconnected UDP socket may show issues because of cache misses in look-ups due to so many different sources. This should be fairly easy to benchmark by randomly setting

Re: [PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp

2017-03-18 Thread Subash Abhinov Kasiviswanathan
All these hypotheses are quite testable, and it should be obvious that if a patch is supposed to improve performance there should be some effort to quantify the impact. Hi Tom I ran a single stream unconnected UDPv4 test on an ARM64 system and I see a slight increase in performance (782 ->

Re: [PATCH net-next] ipv6: Implement optimized IPv6 masked address comparison for ARM64

2017-03-17 Thread Subash Abhinov Kasiviswanathan
That's clearly not right - I'm not sure quite what undefined behaviour assumption convinces GCC to optimise the whole thing away> While the pointer casting is a bit ghastly, I don't actually think that GCC is taking advantage of undefined behaviour here, rather it looks like you have a

[PATCH net-next] ipv6: Implement optimized IPv6 masked address comparison for ARM64

2017-03-16 Thread Subash Abhinov Kasiviswanathan
eck if generic version is used and ARM64 to verify that ARM64 version is used. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- arch/alpha/include/asm/Kbuild | 1 + arch/arc/include/asm/Kbuild| 1 + arch/arm/include/asm/Kbuild| 1 + arch/arm6

Re: [PATCH net-next 1/1 v2] net: rmnet_data: Initial implementation

2017-03-14 Thread Subash Abhinov Kasiviswanathan
I believe that this code should be a part of that driver, not a generic code in net/ ok, so? Hi Jiri I will move it to drivers/net and rename it to rmnet. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation

Re: [PATCH net-next 1/1 v2] net: rmnet_data: Initial implementation

2017-03-13 Thread Subash Abhinov Kasiviswanathan
On 2017-03-13 02:54, Jiri Pirko wrote: Mon, Mar 13, 2017 at 08:43:09AM CET, subas...@codeaurora.org wrote: RmNet Data driver provides a transport agnostic MAP (multiplexing and Why "data"? Why not just "rmnet"?? Btw, what is "RmNet". Google does not give me much. Is it some priprietady

[PATCH net-next 1/1 v2] net: rmnet_data: Initial implementation

2017-03-13 Thread Subash Abhinov Kasiviswanathan
in a single consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet_data.txt | 82 +++ include/uapi/linux/Kbuild |1 + include/uapi/linux/if_arp.h |1 + include/uapi/linux/if_e

[PATCH net-next 0/1 v2] net: Add support for rmnet_data driver

2017-03-13 Thread Subash Abhinov Kasiviswanathan
;v2: Change datatypes and remove config IOCTL as mentioned by David. Also fix checkpatch issues and remove some unused code. Subash Abhinov Kasiviswanathan (1): net: rmnet_data: Initial implementation Documentation/networking/rmnet_data.txt | 82 +++ include/uapi/linux/Kbu

Re: [PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp

2017-03-09 Thread Subash Abhinov Kasiviswanathan
Well, then you need to make sure ipprot->early_demux is read once in the callers, like ip_rcv_finish(), otherwise compiler could read it twice and we could deref a NULL pointer. ipprot = rcu_dereference(inet_protos[protocol]); if (ipprot && ipprot->early_demux) { ipprot->early_demux(skb);

Re: [PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp

2017-03-09 Thread Subash Abhinov Kasiviswanathan
On 2017-03-09 20:42, Tom Herbert wrote: On Thu, Mar 9, 2017 at 7:31 PM, Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> wrote: Certain system process significant unconnected UDP workload. It would be preferrable to disable UDP early demux for those systems and enable it for TC

[PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp

2017-03-09 Thread Subash Abhinov Kasiviswanathan
Certain system process significant unconnected UDP workload. It would be preferrable to disable UDP early demux for those systems and enable it for TCP only. v1->v2: Change function pointer instead of adding conditional as suggested by Stephen. Signed-off-by: Subash Abhinov Kasiviswanat

[PATCH net-next] net: Add sysctl to toggle early demux for tcp and udp

2017-03-09 Thread Subash Abhinov Kasiviswanathan
Certain system process significant unconnected UDP workload. It would be preferrable to disable UDP early demux for those systems and enable it for TCP only. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> Suggested-by: Eric Dumazet <eduma...@google.com> ---

[PATCH net-next v2] net: ipv6: Add early demux handler for UDP unicast

2017-03-08 Thread Subash Abhinov Kasiviswanathan
ed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- net/ipv6/udp.c | 59 ++ 1 file changed, 59 insertions(+) diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 221825a..8497077 100644 --- a/net/ipv6/udp.c +++ b/ne

Re: [PATCH net-next 1/1] net: rmnet_data: Initial implementation

2017-03-08 Thread Subash Abhinov Kasiviswanathan
Inside the kernel you should use "u32", "u16", "u8", etc. for purely internal things, and for datastructures exported to userspace you should use "__u32", "__u16", "__u8". Furthermore, if the members have specific endianness you should properly use the "__le32", "__le16", "__be32", "__be16" etc.

Re: [PATCH net-next] net: ipv6: Add early demux handler for UDP unicast

2017-03-08 Thread Subash Abhinov Kasiviswanathan
for the servers with large unconnected workloads in that case? Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- + + if (dst) + dst = dst_check(dst, 0); IPv6 uses a cookie to validate dst, not 0. I'll update this and send v2. -- Qu

[PATCH net-next] net: ipv6: Add early demux handler for UDP unicast

2017-03-08 Thread Subash Abhinov Kasiviswanathan
for UDPv6, we avoid the redundant lookups. This also helped to improve the performance (800Mbps -> 870Mbps) on a CPU limited system in a single stream UDPv6 receive test with 1450 byte sized datagrams using iperf. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> ---

[PATCH net-next 0/1] net: Add support for rmnet_data driver

2017-02-23 Thread Subash Abhinov Kasiviswanathan
. Subash Abhinov Kasiviswanathan (1): net: rmnet_data: Initial implementation Documentation/networking/rmnet_data.txt | 82 +++ include/uapi/linux/Kbuild |1 + include/uapi/linux/if_arp.h |1 + include/uapi/linux/if_ether.h |3 +- include/uapi

[PATCH net-next 1/1] net: rmnet_data: Initial implementation

2017-02-23 Thread Subash Abhinov Kasiviswanathan
in a single consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet_data.txt | 82 +++ include/uapi/linux/Kbuild |1 + include/uapi/linux/if_arp.h |1 + include/uapi/linux/if_e

[RFC PATCH net-next 1/1] net: rmnet_data: Initial implementation

2017-02-08 Thread Subash Abhinov Kasiviswanathan
in a single consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- Documentation/networking/rmnet_data.txt | 82 +++ include/uapi/linux/Kbuild |2 + include/uapi/linux/if_arp.h |1 + include/uapi/linux/if_e

[RFC PATCH net-next 0/1] net: Add support for rmnet_data driver

2017-02-08 Thread Subash Abhinov Kasiviswanathan
. Physical transports include USB, HSIC, PCIe and IP accelerator. rmnet_data driver helps to decode these packets and queue them to network stack (and encode and transmit it to the physical device). Subash Abhinov Kasiviswanathan (1): net: rmnet_data: Initial implementation Documentation

[PATCH net] net: Check for fullsock in sock_i_uid()

2016-11-01 Thread Subash Abhinov Kasiviswanathan
sock_i_uid() acquires the sk_callback_lock which does not exist for sockets in TCP_NEW_SYN_RECV state. This results in errors showing up as spinlock bad magic. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> Cc: Eric Dumazet <eduma...@google.com> --- net/cor

[PATCH net-next] net: xfrm: Change u32 sysctl entries to use proc_douintvec

2016-09-06 Thread Subash Abhinov Kasiviswanathan
proc_dointvec limits the values to INT_MAX in u32 sysctl entries. proc_douintvec allows to write upto UINT_MAX. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- net/xfrm/xfrm_sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ne

[RFC PATCH] xfrm: Add option to reset oif in xfrm lookup

2016-07-25 Thread Subash Abhinov Kasiviswanathan
transform. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/net/netns/xfrm.h | 1 + net/ipv4/xfrm4_policy.c | 3 ++- net/ipv6/xfrm6_policy.c | 3 ++- net/xfrm/xfrm_sysctl.c | 8 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/

[RFC] tun: Support VIRTIO_NET_HDR_F_DATA_VALID in tun_get_user

2016-06-24 Thread Subash Abhinov Kasiviswanathan
be redundant. Pass the hint to kernel to skip checksum validation if VIRTIO_NET_HDR_F_DATA_VALID is set from userspace. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- drivers/net/tun.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/tun.c b/d

[RFC] Handle error writing UINT_MAX to u32 fields

2016-06-09 Thread Subash Abhinov Kasiviswanathan
d argument Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- include/linux/sysctl.h | 2 ++ kernel/sysctl.c| 32 net/xfrm/xfrm_sysctl.c | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/include/li

[iproute PATCH] ss: Remove unused argument from kill_inet_sock

2016-05-09 Thread Subash Abhinov Kasiviswanathan
addr is not used here. Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- misc/ss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index deefc96..5cda728 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -2232,8 +2232,7 @@

RE: [net PATCH 2/2] ipv4/GRO: Make GRO conform to RFC 6864

2016-04-01 Thread Subash Abhinov Kasiviswanathan
| For transmit we can leave the IP ID code as is. For receive we should not be | snooping into the IP ID for any frames that have the DF bit set as devices | that have adopted RFC 6864 on their transmit path will end up causing issues. Currently, GRO does not coalesce TCP packets originating

[PATCH net v2 RESEND] xfrm: Fix crash observed during device unregistration and decryption

2016-03-23 Thread Subash Abhinov Kasiviswanathan
a.org.au> Signed-off-by: Jerome Stanislaus <jero...@codeaurora.org> Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- net/xfrm/xfrm_input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index ad7

[PATCH net v2] xfrm: Fix crash observed during device unregistration and decryption

2016-03-22 Thread Subash Abhinov Kasiviswanathan
a.org.au> Signed-off-by: Jerome Stanislaus <jero...@codeaurora.org> Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org> --- net/xfrm/xfrm_input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index ad7

[PATCH net] esp: Fix crash observed during device unregistration and decryption

2016-03-19 Thread Subash Abhinov Kasiviswanathan
an unhandled page fault exception. Fix this by holding on to device reference when queueing packets asynchronously and releasing the reference on call back return. Suggested-by: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org

<    1   2   3