* Re: [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' has been queued to LTS release 17.11.1
@ 2018-01-29 14:44 Yuanhan Liu
0 siblings, 0 replies; 4+ messages in thread
From: Yuanhan Liu @ 2018-01-29 14:44 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Santosh Shukla, dpdk stable, dev
On Mon, Jan 29, 2018 at 02:26:46PM +0530, Pavan Nikhilesh wrote:
> Hi Yliu,
>
> On Sat, Jan 27, 2018 at 12:00:29AM +0800, Yuanhan Liu wrote:
> > On Wed, Jan 24, 2018 at 11:32:20PM +0800, Yuanhan Liu wrote:
> > > Hi,
> > >
> > > FYI, your patch has been queued to LTS release 17.11.1
> > >
> > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > > It will be pushed if I get no objections before 01/26/18. So please
> > > shout if anyone has objections.
> >
> > I met an build error with this one:
>
> This is due to map file having improper tag i.e.
>
> http://dpdk.org/dev/patchwork/patch/32510/
>
> +
> +DPDK_18.04 {
>
> Fixed while applying.
>
> + global:
> +
> + rte_octeontx_pchan_map;
> +
> +};
>
> Ferruh fixed it while applying.
Hi Pavan,
Not really. The reason it failed to build is this patch is targeted for
stable release while it references above symbol that introduced in another
patch that will not be cherry-picked to stable release.
So could you do a backport, without introducing above external symbol?
I'm wondering you could hide it internally?
DPDK_18.04 won't exist for v17.11.1 after all.
Thanks.
--yliu
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1
@ 2018-01-24 15:31 Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' " Yuanhan Liu
0 siblings, 1 reply; 4+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/26/18. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c4b60502e7135b683f48de568698281b42dd83f6 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 28 Nov 2017 23:45:53 +0000
Subject: [PATCH] kni: fix build with kernel 4.15
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit d291fb3a8d162161897636387910637bbe9cbf17 ]
build error:
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2809:2:
error: implicit declaration of function ‘setup_timer’;
did you mean ‘sk_stop_timer’? [-Werror=implicit-function-declaration]
setup_timer(&adapter->watchdog_timer, &igb_watchdog,
^~~~~~~~~~~
sk_stop_timer
cc1: all warnings being treated as errors
error observed whed CONFIG_RTE_KNI_KMOD_ETHTOOL config option enabled.
Because Linux removed setup_timer macros for kernel version >= 4.15
Linux: 513ae785c63c ("timer: Remove setup_*timer() interface")
Replaced setup_timer with timer_setup for new kernel versions.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 41 ++++++++++++++++++++++
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 +++
2 files changed, 45 insertions(+)
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index 99338c5..e0f427a 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -137,11 +137,20 @@ static void igb_clean_all_tx_rings(struct igb_adapter *);
static void igb_clean_all_rx_rings(struct igb_adapter *);
static void igb_clean_tx_ring(struct igb_ring *);
static void igb_set_rx_mode(struct net_device *);
+#ifdef HAVE_TIMER_SETUP
+static void igb_update_phy_info(struct timer_list *);
+static void igb_watchdog(struct timer_list *);
+#else
static void igb_update_phy_info(unsigned long);
static void igb_watchdog(unsigned long);
+#endif
static void igb_watchdog_task(struct work_struct *);
static void igb_dma_err_task(struct work_struct *);
+#ifdef HAVE_TIMER_SETUP
+static void igb_dma_err_timer(struct timer_list *);
+#else
static void igb_dma_err_timer(unsigned long data);
+#endif
static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *);
static struct net_device_stats *igb_get_stats(struct net_device *);
static int igb_change_mtu(struct net_device *, int);
@@ -2806,6 +2815,12 @@ static int __devinit igb_probe(struct pci_dev *pdev,
/* Check if Media Autosense is enabled */
if (hw->mac.type == e1000_82580)
igb_init_mas(adapter);
+#ifdef HAVE_TIMER_SETUP
+ timer_setup(&adapter->watchdog_timer, &igb_watchdog, 0);
+ if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA)
+ timer_setup(&adapter->dma_err_timer, &igb_dma_err_timer, 0);
+ timer_setup(&adapter->phy_info_timer, &igb_update_phy_info, 0);
+#else
setup_timer(&adapter->watchdog_timer, &igb_watchdog,
(unsigned long) adapter);
if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA)
@@ -2813,6 +2828,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
(unsigned long) adapter);
setup_timer(&adapter->phy_info_timer, &igb_update_phy_info,
(unsigned long) adapter);
+#endif
INIT_WORK(&adapter->reset_task, igb_reset_task);
INIT_WORK(&adapter->watchdog_task, igb_watchdog_task);
@@ -4543,9 +4559,15 @@ static void igb_spoof_check(struct igb_adapter *adapter)
/* Need to wait a few seconds after link up to get diagnostic information from
* the phy */
+#ifdef HAVE_TIMER_SETUP
+static void igb_update_phy_info(struct timer_list *t)
+{
+ struct igb_adapter *adapter = from_timer(adapter, t, phy_info_timer);
+#else
static void igb_update_phy_info(unsigned long data)
{
struct igb_adapter *adapter = (struct igb_adapter *) data;
+#endif
e1000_get_phy_info(&adapter->hw);
}
@@ -4594,9 +4616,15 @@ bool igb_has_link(struct igb_adapter *adapter)
* igb_watchdog - Timer Call-back
* @data: pointer to adapter cast into an unsigned long
**/
+#ifdef HAVE_TIMER_SETUP
+static void igb_watchdog(struct timer_list *t)
+{
+ struct igb_adapter *adapter = from_timer(adapter, t, watchdog_timer);
+#else
static void igb_watchdog(unsigned long data)
{
struct igb_adapter *adapter = (struct igb_adapter *)data;
+#endif
/* Do the rest outside of interrupt context */
schedule_work(&adapter->watchdog_task);
}
@@ -4854,9 +4882,15 @@ dma_timer_reset:
* igb_dma_err_timer - Timer Call-back
* @data: pointer to adapter cast into an unsigned long
**/
+#ifdef HAVE_TIMER_SETUP
+static void igb_dma_err_timer(struct timer_list *t)
+{
+ struct igb_adapter *adapter = from_timer(adapter, t, dma_err_timer);
+#else
static void igb_dma_err_timer(unsigned long data)
{
struct igb_adapter *adapter = (struct igb_adapter *)data;
+#endif
/* Do the rest outside of interrupt context */
schedule_work(&adapter->dma_err_task);
}
@@ -10051,6 +10085,12 @@ int igb_kni_probe(struct pci_dev *pdev,
igb_init_mas(adapter);
#ifdef NO_KNI
+#ifdef HAVE_TIMER_SETUP
+ timer_setup(&adapter->watchdog_timer, &igb_watchdog, 0);
+ if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA)
+ timer_setup(&adapter->dma_err_timer, &igb_dma_err_timer, 0);
+ timer_setup(&adapter->phy_info_timer, &igb_update_phy_info, 0);
+#else
setup_timer(&adapter->watchdog_timer, &igb_watchdog,
(unsigned long) adapter);
if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA)
@@ -10058,6 +10098,7 @@ int igb_kni_probe(struct pci_dev *pdev,
(unsigned long) adapter);
setup_timer(&adapter->phy_info_timer, &igb_update_phy_info,
(unsigned long) adapter);
+#endif
INIT_WORK(&adapter->reset_task, igb_reset_task);
INIT_WORK(&adapter->watchdog_task, igb_watchdog_task);
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index e38a756..443a3f2 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3941,4 +3941,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#define HAVE_PCI_ENABLE_MSIX
#endif
+#if defined(timer_setup) && defined(from_timer)
+#define HAVE_TIMER_SETUP
+#endif
+
#endif /* _KCOMPAT_H_ */
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' has been queued to LTS release 17.11.1
2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
2018-01-26 16:00 ` Yuanhan Liu
0 siblings, 1 reply; 4+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Santosh Shukla, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/26/18. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3ab8effa1fd5b07c88688ff14e816e0a314d7778 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Tue, 19 Dec 2017 23:31:45 +0530
Subject: [PATCH] event/octeontx: fix Rx adapter port id mapping
[ upstream commit 9b4298339652c5f4c3a1391ed26caa5bbb26c158 ]
When octeontx event dev receives a packet for the event Rx adapter, the
mbuf port id should contain the appropriate ethdev id instead of
internal channel info.
Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
drivers/event/octeontx/Makefile | 2 +-
drivers/event/octeontx/ssovf_worker.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
index fdf1b73..2604412 100644
--- a/drivers/event/octeontx/Makefile
+++ b/drivers/event/octeontx/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
CFLAGS += -I$(RTE_SDK)/drivers/net/octeontx/
-LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx
+LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx -lrte_pmd_octeontx
LDLIBS += -lrte_bus_pci
LDLIBS += -lrte_bus_vdev
diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h
index bf76ac8..4c9a4c4 100644
--- a/drivers/event/octeontx/ssovf_worker.h
+++ b/drivers/event/octeontx/ssovf_worker.h
@@ -53,7 +53,7 @@ enum {
/* SSO Operations */
static __rte_always_inline struct rte_mbuf *
-ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
+ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_info)
{
struct rte_mbuf *mbuf;
octtx_wqe_t *wqe = (octtx_wqe_t *)(uintptr_t)work;
@@ -69,7 +69,7 @@ ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
mbuf->data_len = mbuf->pkt_len;
mbuf->nb_segs = 1;
mbuf->ol_flags = 0;
- mbuf->port = port_id;
+ mbuf->port = rte_octeontx_pchan_map[port_info >> 4][port_info & 0xF];
rte_mbuf_refcnt_set(mbuf, 1);
return mbuf;
}
@@ -89,7 +89,7 @@ ssows_get_work(struct ssows *ws, struct rte_event *ev)
ev->event = sched_type_queue | (get_work0 & 0xffffffff);
if (get_work1 && ev->event_type == RTE_EVENT_TYPE_ETHDEV) {
ev->mbuf = ssovf_octeontx_wqe_to_pkt(get_work1,
- (ev->event >> 20) & 0xF);
+ (ev->event >> 20) & 0x7F);
} else {
ev->u64 = get_work1;
}
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' has been queued to LTS release 17.11.1
2018-01-24 15:32 ` [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' " Yuanhan Liu
@ 2018-01-26 16:00 ` Yuanhan Liu
2018-01-29 8:56 ` Pavan Nikhilesh
0 siblings, 1 reply; 4+ messages in thread
From: Yuanhan Liu @ 2018-01-26 16:00 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Santosh Shukla, dpdk stable
On Wed, Jan 24, 2018 at 11:32:20PM +0800, Yuanhan Liu wrote:
> Hi,
>
> FYI, your patch has been queued to LTS release 17.11.1
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 01/26/18. So please
> shout if anyone has objections.
I met an build error with this one:
error: ‘rte_octeontx_pchan_map ’ undeclared (first use in this function)
This patch is then dropped. If you think it's needed for 17.11.1 LTS
release, please do a backport. And sorry for the late notice: it was
my fault, I should have done the build before sending it out.
--yliu
>
> Thanks.
>
> --yliu
>
> ---
> >From 3ab8effa1fd5b07c88688ff14e816e0a314d7778 Mon Sep 17 00:00:00 2001
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Date: Tue, 19 Dec 2017 23:31:45 +0530
> Subject: [PATCH] event/octeontx: fix Rx adapter port id mapping
>
> [ upstream commit 9b4298339652c5f4c3a1391ed26caa5bbb26c158 ]
>
> When octeontx event dev receives a packet for the event Rx adapter, the
> mbuf port id should contain the appropriate ethdev id instead of
> internal channel info.
>
> Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> ---
> drivers/event/octeontx/Makefile | 2 +-
> drivers/event/octeontx/ssovf_worker.h | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
> index fdf1b73..2604412 100644
> --- a/drivers/event/octeontx/Makefile
> +++ b/drivers/event/octeontx/Makefile
> @@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
> CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
> CFLAGS += -I$(RTE_SDK)/drivers/net/octeontx/
>
> -LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx
> +LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx -lrte_pmd_octeontx
> LDLIBS += -lrte_bus_pci
> LDLIBS += -lrte_bus_vdev
>
> diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h
> index bf76ac8..4c9a4c4 100644
> --- a/drivers/event/octeontx/ssovf_worker.h
> +++ b/drivers/event/octeontx/ssovf_worker.h
> @@ -53,7 +53,7 @@ enum {
> /* SSO Operations */
>
> static __rte_always_inline struct rte_mbuf *
> -ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
> +ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_info)
> {
> struct rte_mbuf *mbuf;
> octtx_wqe_t *wqe = (octtx_wqe_t *)(uintptr_t)work;
> @@ -69,7 +69,7 @@ ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
> mbuf->data_len = mbuf->pkt_len;
> mbuf->nb_segs = 1;
> mbuf->ol_flags = 0;
> - mbuf->port = port_id;
> + mbuf->port = rte_octeontx_pchan_map[port_info >> 4][port_info & 0xF];
> rte_mbuf_refcnt_set(mbuf, 1);
> return mbuf;
> }
> @@ -89,7 +89,7 @@ ssows_get_work(struct ssows *ws, struct rte_event *ev)
> ev->event = sched_type_queue | (get_work0 & 0xffffffff);
> if (get_work1 && ev->event_type == RTE_EVENT_TYPE_ETHDEV) {
> ev->mbuf = ssovf_octeontx_wqe_to_pkt(get_work1,
> - (ev->event >> 20) & 0xF);
> + (ev->event >> 20) & 0x7F);
> } else {
> ev->u64 = get_work1;
> }
> --
> 2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' has been queued to LTS release 17.11.1
2018-01-26 16:00 ` Yuanhan Liu
@ 2018-01-29 8:56 ` Pavan Nikhilesh
0 siblings, 0 replies; 4+ messages in thread
From: Pavan Nikhilesh @ 2018-01-29 8:56 UTC (permalink / raw)
To: Yuanhan Liu, Santosh Shukla, dpdk stable; +Cc: dev
Hi Yliu,
On Sat, Jan 27, 2018 at 12:00:29AM +0800, Yuanhan Liu wrote:
> On Wed, Jan 24, 2018 at 11:32:20PM +0800, Yuanhan Liu wrote:
> > Hi,
> >
> > FYI, your patch has been queued to LTS release 17.11.1
> >
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 01/26/18. So please
> > shout if anyone has objections.
>
> I met an build error with this one:
This is due to map file having improper tag i.e.
http://dpdk.org/dev/patchwork/patch/32510/
+
+DPDK_18.04 {
Fixed while applying.
+ global:
+
+ rte_octeontx_pchan_map;
+
+};
Ferruh fixed it while applying.
Regards,
Pavan.
>
> error: ‘rte_octeontx_pchan_map ’ undeclared (first use in this function)
>
> This patch is then dropped. If you think it's needed for 17.11.1 LTS
> release, please do a backport. And sorry for the late notice: it was
> my fault, I should have done the build before sending it out.
>
> --yliu
> >
> > Thanks.
> >
> > --yliu
> >
> > ---
> > >From 3ab8effa1fd5b07c88688ff14e816e0a314d7778 Mon Sep 17 00:00:00 2001
> > From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > Date: Tue, 19 Dec 2017 23:31:45 +0530
> > Subject: [PATCH] event/octeontx: fix Rx adapter port id mapping
> >
> > [ upstream commit 9b4298339652c5f4c3a1391ed26caa5bbb26c158 ]
> >
> > When octeontx event dev receives a packet for the event Rx adapter, the
> > mbuf port id should contain the appropriate ethdev id instead of
> > internal channel info.
> >
> > Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> > ---
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-29 14:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29 14:44 [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' has been queued to LTS release 17.11.1 Yuanhan Liu
-- strict thread matches above, loose matches on Subject: below --
2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' " Yuanhan Liu
2018-01-26 16:00 ` Yuanhan Liu
2018-01-29 8:56 ` Pavan Nikhilesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).